sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Support oversized content in url_launcher android webview
Labels: c: new feature,platform-android,p: url_launcher,package,c: proposal,P3,team-android,triaged-android

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

I have developed an app with a repository of resources (local files and web URLs). Users may tap on a widget to view these resources. Web URL resources are viewed with `url_launcher`. On Android, if a resources is an image, like [example URL](https://i.natgeofe.com/n/548467d8-c5f1-4551-9f58-6817a8d2c45e/NationalGeographic_2572187_square.jpg)
the context expands beyond the extents of the viewport. This issue does not impact iOS or web.
## Proposal
Update the Android implementation to zoom the viewport to fit oversized content. This is the default behavior in Chrome and the iOS implementation of `url_launcher`.

I've implemented the following solution in my local environment and tested against various web content in my app on an Android physical device.

Use wide viewport if viewport width is not defined in metadata. Load content in overview mode (zoom out to fit content) if wider than viewport.

https://developer.android.com/reference/android/webkit/WebSettings#setUseWideViewPort(boolean)
https://developer.android.com/reference/android/webkit/WebSettings#setLoadWithOverviewMode(boolean) 

Code:
https://github.com/flutter/plugins/compare/main...kevinvanleer:feature/fit-oversized-content?expand=1
<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: pytorch
Issue: Feature request: Tests for `int` should be tests for `numbers.Integral`
Labels: feature,triaged,module: numpy,module: python frontend

### 🐛 Describe the bug

Some code, such as that in `BatchSampler`, tests whether a value, e.g. `batch_size` is an integer with `isinstance(batch_size, int)`.

This fails in a case like this:
```py
for batch_size in np.logspace(1, 4, 7, dtype=int):
    # train a model with this batch size
```
because even though `batch_size` behaves just like an int, it's not an _instance_ of int.

The specific error in this case highlights that some logic is not quite right:
```
ValueError: batch_size should be a positive integer value, but got batch_size=10
```

Note that the issue isn't related to `np.logspace` specifically, just any int taken from any NumPy array:
```py
assert isinstance(np.array([1])[0], int) == False
assert isinstance(np.array([1])[0], numbers.Integral) == True
```

It would be better to replace `isinstance(batch_size, int)` with `isinstance(batch_size, numbers.Integral)`.

Unless there's something I don't understand, this is probably a good general rule for the whole codebase. Typically these numbers are then passed to `range()` or `slice()` which have the requirement of `Integral`, _not_ the narrower requirement of `int`.



### Versions

PyTorch version: 1.12.1+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.10.7 (main, Sep  7 2022, 15:22:19) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090
Nvidia driver version: 516.94
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy==0.971
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.3
[pip3] torch==1.12.1+cu116
[pip3] torchaudio==0.12.1+cu116
[pip3] torchvision==0.13.1+cu116
[conda] Could not collect

cc @mruberry @rgommers @albanD
Repository: youtube-dl
Issue: Twitter multi-video posts
Labels: request


Twitter added a new feature which allows you to upload multiple videos to one post. 

https://twitter.com/PrimeTobirama/status/1577759019724333058 an example post 

When you attempt to download from this URL it will only download the first video instead of all 4.
Repository: pytorch
Issue: `torch.special.round` doesn't support the same dtypes as `torch.round`
Labels: triaged,module: special

### 🐛 Describe the bug

`torch.special.round` is declared as an alias of `torch.round` in the `OpInfo`. But they behave differently (due to a bug?):

```py
In [2]: torch.special.round(torch.tensor([2], dtype=torch.short))
RuntimeError: "round_vml_cpu" not implemented for 'Short'

In [3]: torch.round(torch.tensor([2], dtype=torch.short))
Out[3]: tensor([2], dtype=torch.int16)

In [4]: torch.tensor([2], dtype=torch.short).round()
Out[4]: tensor([2], dtype=torch.int16)
```

The error message is from `AT_DISPATCH_SWITCH`. I haven't looked into why it happens.

Aliases are tested in `test_variant_consistency_eager`, but that test only checks against `torch.float` and `torch.cfloat` (see `_variant_ops`). So we didn't notice. If I allow testing for all dtypes there, I get the same error:

```py
# old:
# _variant_ops = partial(
#     ops, dtypes=OpDTypes.supported, allowed_dtypes=(torch.float, torch.cfloat)
# )
# new:
_variant_ops = partial(
    ops, dtypes=OpDTypes.supported
)
```

```bash
# run after allowing all types in _variant_ops
python -m pytest test/test_ops.py -k test_variant_consistency_eager_round -vv  --capture=no 
```

output:
```
FAILED test/test_ops.py::TestCommonCPU::test_variant_consistency_eager_round_cpu_int16 - RuntimeError: "round_vml_cpu" not implemented for 'Short'
FAILED test/test_ops.py::TestCommonCPU::test_variant_consistency_eager_round_cpu_int32 - RuntimeError: "round_vml_cpu" not implemented for 'Int'
FAILED test/test_ops.py::TestCommonCPU::test_variant_consistency_eager_round_cpu_int64 - RuntimeError: "round_vml_cpu" not implemented for 'Long'
FAILED test/test_ops.py::TestCommonCPU::test_variant_consistency_eager_round_cpu_int8 - RuntimeError: "round_vml_cpu" not implemented for 'Char'
FAILED test/test_ops.py::TestCommonCPU::test_variant_consistency_eager_round_cpu_uint8 - RuntimeError: "round_vml_cpu" not implemented for 'Byte'

FAILED test/test_ops.py::TestCommonCUDA::test_variant_consistency_eager_round_cuda_int16 - RuntimeError: "round_cuda" not implemented for 'Short'
FAILED test/test_ops.py::TestCommonCUDA::test_variant_consistency_eager_round_cuda_int32 - RuntimeError: "round_cuda" not implemented for 'Int'
FAILED test/test_ops.py::TestCommonCUDA::test_variant_consistency_eager_round_cuda_int64 - RuntimeError: "round_cuda" not implemented for 'Long'
FAILED test/test_ops.py::TestCommonCUDA::test_variant_consistency_eager_round_cuda_int8 - RuntimeError: "round_cuda" not implemented for 'Char'
FAILED test/test_ops.py::TestCommonCUDA::test_variant_consistency_eager_round_cuda_uint8 - RuntimeError: "round_cuda" not implemented for 'Byte'
```

### Versions

master (82d9592f1ba)

cc @mruberry @kshitij12345
Repository: go
Issue: gccgo: ICE compiling method value with anonymous recursive interface
Labels: NeedsFix

```
$ cat x.go
package main

type I interface{ m() interface{ I } }

var _ = I(nil).m

func main() {}

$ gccgo -o x x.go
gccgo: internal compiler error: Segmentation fault signal terminated program go1
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
```

/cc @ianlancetaylor @griesemer
Repository: go
Issue: gccgo: miscompilation of anonymous, recursive interfaces appearing in separate compilation units
Labels: NeedsFix

Program below should run and exit silently, but gccgo it prints a failure. (It prints a failure with cmd/compile too, but cmd/compile fails in the single-package case even: #56057.)

```
$ go run -compiler=gccgo x.go
FAIL:
*interface { a.i }
*interface { b.i }

$ head -20 go.mod x.go a/a.go b/b.go
==> go.mod <==
module m

go 1.20

==> x.go <==
package main

import (
	"fmt"
	"m/a"
	"m/b"
)

func main() {
	if a.X != b.X {
		fmt.Printf("FAIL:\n%T\n%T\n", a.X, b.X)
	}
}

==> a/a.go <==
package a

type i interface{ M() interface{ i } }

var X interface{} = (*interface{ i })(nil)

==> b/b.go <==
package b

type i interface{ M() interface{ j } }
type j interface{ M() interface{ i } }

var X interface{} = (*interface{ i })(nil)
```

/cc @ianlancetaylor @griesemer
Repository: go
Issue: gccgo: spurious "duplicate method" error with anonymous, recursive interfaces
Labels: NeedsFix

The following package should type check, but gccgo rejects it with a "duplicate method" error:

```
$ cat q.go
package main

type (
	a interface { m() interface { a; b } }
	b interface { m() interface { a; b } }
)

var _ = new(interface{ a }) == new(interface{ b })

func main() {}

$ gccgo q.go
q.go:4:39: error: duplicate method ‘m’
    4 |         a interface { m() interface { a; b } }
      |                                       ^
```

/cc @ianlancetaylor
Repository: vscode
Issue: Separated select and focus on delete in file explorer
Labels: file-explorer,polish

[![Image from Gyazo](https://i.gyazo.com/4194f0f3a4a62b7fd0bcdf894647eb71.gif)](https://gyazo.com/4194f0f3a4a62b7fd0bcdf894647eb71)

Steps:
1. Multiselect 3 different files in the file explorer. 
2. Right-click on a file that is different from the current focused file and pick delete from the context menu.
3. You get a weird state where focus and selection are on different files. :bug:

Notice that if you right-click the currently focused file in step 2 instead, then the select/focus end up on the same entry
[![Image from Gyazo](https://i.gyazo.com/6adcef46418365de86d1423ad04c161f.gif)](https://gyazo.com/6adcef46418365de86d1423ad04c161f)
Repository: go
Issue: gccgo: spurious "invalid recursive alias" error on anonymous, recursive interfaces
Labels: NeedsFix

gccgo accepts:

```
type I interface { M() interface { I } }
```

but it rejects:

```
type (
    I interface { M() U }
    U = interface { I }
)
```

go/types accepts both.

/cc @ianlancetaylor
Repository: pytorch
Issue: Add `maximize` support to LBFGS optimizer
Labels: module: optimizer,triaged,actionable

As per title.
This is lower priority than the other optimizers in https://github.com/pytorch/pytorch/issues/68052 and so is not being worked on right now by the core team.

cc @vincentqb @jbschlosser
Repository: pytorch
Issue: Add complex support for SparseAdam and LBFGS optimizers
Labels: module: optimizer,triaged,module: complex,actionable

As per title
These optimizers are less high priority than the other in https://github.com/pytorch/pytorch/issues/65711 and so are not being worked on by the core team right now.
Feel free to pick this up if you're interested.

cc @vincentqb @jbschlosser @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved
Repository: go
Issue: x/pkgsite: support rich formatting for vuln details
Labels: pkgsite,UX,vulncheck or vulndb

Either support a basic markdown or https://go.dev/doc/comment style syntax.
If `go/doc/comment` is used, both terminal friendly text output & html formatting are supported
(i.e. govulncheck doesn't need to implement its line wrapping logic

At least, URLs need to be linkified.
For example, in https://pkg.go.dev/vuln/GO-2022-0535 the vulnerability description contains a link
but it is presented as a text, so the link is not clickable.

Not sure if this FR belongs to x/vulndb, x/vuln, or x/pkgsite though.

cc @neild who inspired me :-)
Repository: rust
Issue: `PartialEq` impl for `IpAddr` causes `SIGBUS` on `mips-unknown-linux-gnu`
Labels: A-LLVM,O-MIPS,T-compiler,C-bug,I-miscompile

I tried this code on `mips-unknown-linux-gnu` through `cargo-cross`:

```rust
use std::net::{IpAddr, Ipv4Addr};

fn main() {
    let value = IpAddr::V4(Ipv4Addr::new(31, 41, 59, 26));
    assert_eq!(&value, &value);
}
```

```
cross run --target mips-unknown-linux-gnu --verbose
```

I expected to see this happen: the program exits successfully.

Instead, this happened: `qemu: uncaught target signal 10 (Bus error) - core dumped`

This is truly baffling because:

1. This is extremely plain code, just a struct in an enum.
2. This is crashing in the implementation of `PartialEq` which has been generated by a derive.
3. Removing the outer `IpAddr` does not cause a crash.
4. Far more complex code runs successfully.

If this is a problem with `cargo-cross` instead, I would be happy to move the bug to the corresponding repo.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: x86_64-pc-windows-msvc
release: 1.64.0
LLVM version: 14.0.6
```
Repository: pytorch
Issue: Jetson JIT: Memory Leak on inference after optimize_for_inference
Labels: oncall: jit

### 🐛 Describe the bug

After investigating a memory leak that happens only on one hardware platform, I found that torch::jit::optimize_for_inference induces a change in the torchscript that causes a memory leak on Jetson devices.

Running on the same libtorch compiled from source on Windows, Mac and Linux with the same optimisation applied does not cause any memory leak.

To reproduce, you can run a small model such as Retinaface that is traced, with and without torch::jit::optimize_for_inference.

I have attached two torchscript code files below. bad causes the memory leak and good does not.
[good___torch_mangle_205.txt](https://github.com/pytorch/pytorch/files/9721370/good___torch_mangle_205.txt)
-> torch::jit::optimize_for_inference ->
[bad___torch_mangle_205.txt](https://github.com/pytorch/pytorch/files/9721373/bad___torch_mangle_205.txt)

Only obvious change I can see is conv + relu fusion.
The only significant difference to the other working platforms I can find is: Jetson uses CUDA 10.2 / CUDNN 8.0, Jetson is ARM64, Jetson has shared GPU memory.

### Versions

1.12.1 and 1.13.0-dev2022.08.13
Repository: vscode
Issue: API for using  file quick open
Labels: feature-request,api,quick-open

## Feature Request
Add api that lets extension show the file quick open UI to the user and get back the URI of the file that the user selected.

I imagine this API working like the existing `showOpenDialog` api, expect that will show a the quick open UI instead of the system file dialog (or the simple dialog)

Potential use cases:

- In Markdown, add a command that let users insert a link to an image that they select from quick open (#162809)
- In Jupyter notebooks, let users add image attachment to notebook using quick open
- In JS/TS and other languages, let users import a file that they select from quick open

This was previously requested in #37852, however making extensions implement this themselves will result in inconsistent UX and poor performance 

I've tried using the `workbench.action.quickOpen` command but this command does not return the selected file
Repository: pytorch
Issue: `conv_transpose` is not similar to `nn.grad.conv_input` when `output_padding` is passed with non-default values.
Labels: module: nn,triaged,actionable

### 🐛 Describe the bug

```python
import torch
import torch.nn as nn

device = 'cuda'
t = torch.rand(2, 2, 4, 4, device=device)
w = torch.rand(2, 2, 4, 5, device=device)
b = None

stride = (3, 2)
padding = (1, 2)
dilation = (4, 4)
output_padding = (2, 3)  # Errors with `RuntimeError: grad_output[2:] shape[4, 4] must be equal to output size 4 5`

# output_padding = 0  # Works if we don't specify a non-default output_padding
groups = 2

actual = torch.conv_transpose2d(t, w, b, groups=groups, stride=stride, padding=padding, dilation=dilation, output_padding=output_padding)

expected = nn.grad.conv2d_input(actual.shape, w, t, stride, padding,dilation, groups)

torch.testing.assert_close(actual, expected)
```

We try to use `grad.conv2d_input` as reference for Complex support for conv_transpose, but it fails for samples when `output_padding` is passed with non-default value. `nn.grad.conv2d_input` doesn't take that argument (probably doesn't require it).

### Versions

master

cc @albanD @mruberry @jbschlosser @walterddr @saketh-are
Repository: godot
Issue: [Bullet] Wrong contact count from PhysicsDirectBodyState which is provided by _integrate_forces
Labels: bug,topic:physics,regression

### Godot version

3.5 stable

### System information

Ubuntu 22.04

### Issue description

This is related to Bullet physics
Having problem with porting project from Godot 3.3.2 to Godot 3.5, the `PhysicsDirectBodyState` that is provided by `RigidBody._integrate_forces()` is unable to correctly determine collision count anymore.
It's working fine for most of the time, but the problem is it's not really consistent, and not having collision information where in reality the  collision clearly happens makes this method quite unhelpful.


### Steps to reproduce

The best to use reproduction sample but will describe steps that were made in order to prepare it

1. Create a static body for a floor, it should be concave polygon with ramps as well as flat surfaces
2. Create RigidBody for the character, set "Custom integrator" to true and Contacts Reported to 2
3. Use this script for the RigidBody
```
const MAX_SPEED = 2.0
const ACCELERATION = 15.0
var steering_force: Vector3 = Vector3()

var nmbOfCollisions: int = 0 


func _integrate_forces(state):
	nmbOfCollisions = state.get_contact_count();
	print("Collisions count: ", nmbOfCollisions)
	
	var normalizedSteeringForce = steering_force.normalized();
	var delta = state.get_step();
	var lv = state.get_linear_velocity();
	var velV = Vector3(0,lv.y,0);
	var velH = Vector3(lv.x, 0, lv.z)
	
	# workaround since state.get_total_gravity() returns 0,0,0
	var gravity : Vector3 = Vector3(0, -9.8, 0) * delta 
	
	
	var canSteer = nmbOfCollisions > 0 and steering_force.length_squared() > 0.0
	if canSteer:
		velH += normalizedSteeringForce * ACCELERATION * delta
		if velH.length() > MAX_SPEED:
			velH = velH.normalized() * MAX_SPEED
	
	velV += gravity
	state.set_linear_velocity(velH + velV);


func _process(delta: float) -> void:
	steering_force = Vector3()
	if Input.is_action_pressed("forward"):
		steering_force.z = 1.0
	if Input.is_action_pressed("backward"):
		steering_force.z = -1.0
	if Input.is_action_pressed("left"):
		steering_force.x = 1.0
	if Input.is_action_pressed("right"):
		steering_force.x = -1.0
	if nmbOfCollisions > 0:
		if Input.is_action_just_pressed("jump"):
			apply_central_impulse(Vector3(0,3.5,0))
```
4. Ensure you have proper input mapping in project setting
5. Put the character on the level, try to move and jump, at some point you should see you wont be able to move since collision with ground is not detected

With reproduction sample
1. It's enough to start it
2. there are also two buttons in top left that can be used to play with it more
    - one position player in position where he is able to move again
    - the other puts him above flat surface - but after the fall collision is not detected
 
![collision-count](https://user-images.githubusercontent.com/6129594/194246881-0293b6ea-1e38-48a6-9fe4-da1f2223cfe5.gif)


### Minimal reproduction project

[collisionissue35.zip](https://github.com/godotengine/godot/files/9722333/collisionissue35.zip)
Repository: next.js
Issue: Importing pages from a symlinked folder does not work anymore
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```
Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.10.0
      npm: 8.19.2
      Yarn: 1.22.15
      pnpm: 7.13.0
    Relevant packages:
      next: 12.3.2-canary.21
      eslint-config-next: 12.3.1
      react: 18.2.0
      react-dom: 18.2.0
```

### What browser are you using? (if relevant)

Version 105.0.5195.125 (Official Build) (arm64)

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

We have used symlinks to symlink pages from a shared folder so that we can reuse most of the pages in our application between different builds. This has worked until we updated nextjs to version 12.2.5, and from then on (even with latest canary) it has stopped working in routes that are dynamic. 

When we navigate to a dynamic route it ends up sending us to a 404 page instead of the dynamic page. But a static route works as expected. 

We needed to change the webpack config so that symlinks dont resolve. Without it, the symlinks don't work at all

We know that this is not intended behavior or not something we should do, but at the moment this is the best way possible for us to not have duplicate code for two different builds. And this worked perfectly before 12.2.5

update 02.11.22: Still happends with next 13

### Expected Behavior

The dynamic page should load and show us the correct page.

### Link to reproduction

https://github.com/aulonm/next-symlink-bug

### To Reproduce

- `npm i`
- `npm run dev`
- Go to `http://localhost:3000/test` (static page, returns `this works`)
- Go to `http://localhost:3000/test/fail` (dynamic page, should return `this should work`, but returns `404`)
Repository: go
Issue: encoding/base64: document if (*Encoding).Decode arguments may overlap
Labels: Documentation,NeedsInvestigation

[base64.Decoding.Decode](https://pkg.go.dev/encoding/base64#Encoding.Decode) accepts two byte-slices. As encoded base64 is never smaller than the decoded data, it would be possible to save allocations by giving the same argument for both - that is, to store the decoded data in the same slice as the original base64 data. If the encoding is invalid, this might of course result in garbage ending up in that buffer. But that is often fine.

The documentation doesn't explicitly state that this is allowed. [Empirically, it seems to work](https://go.dev/play/p/upUKnTvFsf0), but I'd feel more comfortable doing it, if it was documented. Could we document that it is allowed and what happens if the user does it? If we want to preserve the flexibility of disallowing it, should we document that it is not allowed?

A similar question arises for

- `base64.(*Encoding).Encode`, though in that case it seems less useful to do so, as the encoded data is likely larger than the input
- `encoding/{ascii85,base32.(*Encoding),hex}.{Decode,Encode}`