sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: `implementation of Debug is not general enough` when making async block into `&dyn Future  + Send`
Labels: A-lifetimes,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,WG-async,fixed-by-next-solver

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
use std::{any::Any, fmt, future::Future};

pub trait Foo {
    type Item;
}

impl<F, I> Foo for F
where
    Self: FnOnce() -> I,
    I: fmt::Debug,
{
    type Item = I;
}

async fn foo_item<F: Foo>(_: F) -> F::Item {
    unimplemented!()
}

pub fn foo() {
    let fut = async {
        let callback = || -> Box<dyn Any> { unimplemented!() };

        // Using plain fn instead of a closure fixes the error, 
        // though you obviously can't capture any state...
        // fn callback() -> Box<dyn Any> {
        //     todo!()
        // }

        foo_item(callback).await;
    };

    // Removing `+ Send` bound also fixes the error,
    // though at the cost of loosing `Send`ability...
    let fut: &(dyn Future<Output = ()> + Send) = &fut as _;
}

```

[Link to playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=575b4cb3dfe4136ff5b3388661b96c81)

I expected to see this compile.

Instead, this happened:

I've hit the "implementation of `Debug` is not general enough" when trying to make the async block into a trait object with `Send` bound.

<details>
<summary>Compile error output</summary>

```
   Compiling playground v0.0.1 (/playground)
error: implementation of `Debug` is not general enough
  --> src/lib.rs:34:50
   |
34 |     let fut: &(dyn Future<Output = ()> + Send) = &fut as _;
   |                                                  ^^^^ implementation of `Debug` is not general enough
   |
   = note: `(dyn Any + '0)` must implement `Debug`, for any lifetime `'0`...
   = note: ...but `Debug` is actually implemented for the type `(dyn Any + 'static)`
```

</details>

One interesting detail is that this works only with closure syntax, if you use vanilla `fn`, then there is no error, also removing `+ Send` bound on the resulting trait object removes the error.

### 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.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1
```

This is also reproducible in playground with `beta` and `nightly` channels:
- `1.54.0-beta.3 (2021-07-20 3a5d335d1192975c94fc)`
- `1.55.0-nightly (2021-07-22 027187094ee05011d660)`


Sorry, I couldn't come up with a more descriptive issue name, if anyone can improve it, I'd be grateful for your edits.

Potentially related issues:
- https://github.com/rust-lang/rust/issues/71723
- https://github.com/rust-lang/rust/issues/60658
Repository: pytorch
Issue: [feature request] Function to broadcast right
Labels: triaged,enhancement,needs design,module: viewing and reshaping

Standard broadcasting appends unit dimensions on the left.

In some situations it is convenient to broadcast on the right, so a manual function for this purpose would be useful.

Example:

`B` values (one per example in batch).
We'd like to expand them to a (potentially dynamic number of dimensions) shape `BxD1xD2...`, where this shape comes from another tensor or as a tuple.

Currently, this is possible with some slicing hacks and expand calls, but a more straightforward, idiomatic way would be helpful (and probably lead to simpler job of exporting/tracing/scripting)
Repository: flutter
Issue: [camera] Allow for customization of video and audio codec format
Labels: c: new feature,p: camera,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

## Use case

We are developing a cross-platform social-media app based on user-created video content. We're using `camera` plugin for video recording and `video_player` for playback. 

We encountered the following problem:
1. user records a video using `camera` plugin with default configuration on Android device
2. other user tries to play this video on iOS device using `video_player` plugin
3. `video_player` throws an PlatformException

Details of the `video_player` exception does not matter here, but after quite painful debugging session we managed to track the problem down: `AMR` audio codec used by Android `MediaRecorder` happens to be unavailable on iOS devices.
(exact error code: https://www.osstatus.com/search/results?platform=all&framework=all&search=1885696621)

We managed to hotfix this issue by forking the `plugins` repo and hard-coding `AAC` audio format in `MediaRecorder` configurations. Our fork: https://github.com/Utopia-USS/plugins
Fix is in `MediaRecorderBuilder.java:60`:
```
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
```

## Proposal

`camera` currently allows for configuring `ImageFormatGroup` for taking photos. I propose a similar thing for audio: `AudioFormatGroup` (this also can be extended to video formats but this seems to be currently less of a problem).

Based on quick research, I can propose following initial format groups:
- null - existing behavior, selected based on system preference
- AAC LC - supported for recording and playback on every android device and every modern iOS device (seems to be auto-selected on iOS)
- AMR - supported for recording and playback on every android device (seems to be auto-selected on Android)

All formats should be documented so that users can easily select format compatible with their use-case.
Other formats seem to be require more consideration because of either lack of wider cross-platform encoding support (like FLAC), or container support (like PCM - cannot be used in mpeg-4 container used by the plugin)

Sources:
https://developer.android.com/guide/topics/media/media-formats#audio-formats
https://stackoverflow.com/a/1761586

Usage proposal:
```
final controller = CameraController(
  //...
  audioFormatGroup: AudioFormatGroup.AAC,
);
```

What should be the default configuration? We have 2 options:
- existing behavior (null):
  - pros:
    - backward compatibility
    - system will always choose a supported encoding format - no compatibility issues on recording side
  - cons:
    - hard to debug issues in cross-platform playback
- AAC
  - pros:
     - supported for encoding and decoding basically everywhere
     - consistent format across all platforms
  - cons:
     - breaking change
     - may be unsupported in some edge cases

If you approve this feature, I'm willing to help with creating a PR for android support, but I'd need support on iOS side.
Repository: pytorch
Issue: Runtime Error: Expected a 'cuda' device type for generator but found 'cpu' in google colab
Labels: needs reproduction,triaged

I get this error while trying to run my training code (Yolact) in google colab. Note that this occured a couple of weeks ago and I had run the same training code succesfully several times before. I tried this command as well, however still get the error:
torch.set_default_tensor_type('torch.cuda.FloatTensor').
Repository: pytorch
Issue: AttributeError: module 'torch.jit' has no attribute '_script_if_tracing'
Labels: oncall: jit

In my work, i meet sunch a erroe: AttributeError: module 'torch.jit' has no attribute '_script_if_tracing', 
my torch and torchvision as this:
torch                     1.7.1+cu110              pypi_0    pypi
torchvision               0.8.2+cu110              pypi_0    pypi
what should i do to resolve this problem!
Looking forward to your reply



cc @gmagogsfm
Repository: pytorch
Issue: [docs] Change code snippet formatting to be directly copy-pasteable into REPL or into source files
Labels: module: docs,triaged,enhancement,needs design

Currently https://pytorch.org/docs/stable/sparse.html has snippets like below. This requires first removing the angle brackets before trying out the code. I propose to remote the brackets prefix, and have the outputs prefixed by `#` (then also the snippets could probably use Python syntax highlighting).

This is already done in other places, e.g. https://pytorch.org/tutorials/intermediate/parametrizations.html

Existing:
```  
>>> i = [[0, 1, 1],
         [2, 0, 2]]
>>> v =  [3, 4, 5]
>>> s = torch.sparse_coo_tensor(i, v, (2, 3))
>>> s
tensor(indices=tensor([[0, 1, 1],
                       [2, 0, 2]]),
       values=tensor([3, 4, 5]),
       size=(2, 3), nnz=3, layout=torch.sparse_coo)
>>> s.to_dense()
tensor([[0, 0, 3],
        [4, 0, 5]])
```

Proposed:
```python
i = [[0, 1, 1],
         [2, 0, 2]]
v =  [3, 4, 5]
s = torch.sparse_coo_tensor(i, v, (2, 3))
print(s)
#tensor(indices=tensor([[0, 1, 1],
#                       [2, 0, 2]]),
#       values=tensor([3, 4, 5]),
#       size=(2, 3), nnz=3, layout=torch.sparse_coo)
print(s.to_dense())
#tensor([[0, 0, 3],
#        [4, 0, 5]])
```

Also then these snippets could be made re-runnable by documentation building process (to account for changed print formatting and for checking that results have not changed), e.g. comment lines after print() commands could be considered as generated automatically.

cc @brianjo @mruberry
Repository: rust
Issue: rustc: native on znver2 CPU picks znver1 for target-cpu
Labels: A-LLVM,C-bug,A-target-feature

I have a Ryzen 7 PRO 4750U on my laptop which gcc sees as `march=znver2`:

```
$ gcc -march=native -Q --help=target
The following options are target specific:
  -m128bit-long-double                  [enabled]
  -m16                                  [disabled]
  -m32                                  [disabled]
  -m3dnow                               [disabled]
  -m3dnowa                              [disabled]
  -m64                                  [enabled]
  -m80387                               [enabled]
  -m8bit-idiv                           [disabled]
  -m96bit-long-double                   [disabled]
  -mabi=                                sysv
  -mabm                                 [enabled]
  -maccumulate-outgoing-args            [disabled]
  -maddress-mode=                       long
  -madx                                 [enabled]
  -maes                                 [enabled]
  -malign-data=                         compat
  -malign-double                        [disabled]
  -malign-functions=                    0
  -malign-jumps=                        0
  -malign-loops=                        0
  -malign-stringops                     [enabled]
  -mandroid                             [disabled]
  -march=                               znver2
...
```

However, rustc sees this CPU as `march=znver1`:

```
$ rustc --print target-cpus
Available CPUs for this target:
    native         - Select the CPU of the current host (currently znver1).
```

### Meta

`rustc --version --verbose`:
```
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-unknown-linux-gnu
release: 1.53.0
LLVM version: 12.0.1
```
Repository: youtube-dl
Issue: youtube-dl modify output template "%%(artist)s" behaviour
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x ] I'm asking a question
- [ x] I've looked through the README and FAQ for similar questions
- [ x] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

Hello dear community.
I wanted to ask the following question: How to modify the behaviour of the output template "%%(artist)s".

The intended way it works is following (afaik): extract all artists of the song, which in my case when I would like to use the following output syntax: 
"--output "X:/MUSIC/%%(artist)s %%(album)s %%(release_year)/%%(playlist_index)s %%(artist)s %%(track)s.%%(ext)s""
creates multiple folders depending on the featuring track artists. The same thing happens if there are mutiple songs from multiple different years, for each year new directory is created. 
I tried to use other tags like %%(creator)s or %%(album_artist)s but it doesnt work.
The best possible result I would like to achieve is to extract the following information ( pic related ):
![image](https://user-images.githubusercontent.com/74107254/126880909-7b5d1de4-3608-4001-b301-14ce87fe3d94.png)
Main artist + album release year. Would it be possible to implement %%(album_release_year)s option and %%(main_album_artist)s output tag? Maybe there is a option like this but I didn't read the documentation well enough....🙄.

Thanks upfront to anyone who will put any effort to reply to this thread.
Greetings.

p.s
When trying to use --write-info-json it shows multiple artists as "artist" but on the album website it only shows the main artist. 🙄
Repository: godot
Issue: Particle jitter on low speed scale, when the SceneTree is paused or when process mode is Disabled due to interpolation
Labels: bug,topic:rendering,confirmed,topic:particles

### Godot version

cf8e9fd

### System information

W10

### Issue description

When you set `speed_scale` of particles to low value, e.g. 0.1, this happens:
![jitter](https://user-images.githubusercontent.com/2223172/126882581-865ac071-b712-40a7-94e4-ab7bdf043813.gif)


### Steps to reproduce

1. Add GPUParticles2D
2. Add some material etc.
3. Set `time_scale` to 0.1

### Minimal reproduction project

_No response_
Repository: go
Issue: x/tools/gopls: conflicting interfaces states in 'missing method' error instead of 'ambiguous'
Labels: NeedsInvestigation,gopls,Tools

#### What did you do?

[play.golang.org/p/9aHL-z_QbuL](https://play.golang.org/p/9aHL-z_QbuL)

Here is the code as well:

```go
package main

var _ ConflictingDog = (*Huski)(nil)

type Huski struct {
	Dog
	Barker
}

type ConflictingDog interface {
	Dog
	Barker
}

type Dog interface {
	Bark()
}

type Barker interface {
	Bark()
}
```

#### What did you expect to see?

A gopls  error suggesting there is a conflict or ambiguity because the interface `DogBarker` have a conflicting `Bark()` method from the two interfaces `Dog` and `Barker`. The error can be on the variable `var _ ConflictingDog = (*Huski)(nil)` as it is on play.golang.org, or perhaps on the interface `DogBarker` directly although I'm not sure about side consequences of this.

#### What did you see instead?

```
cannot use (*Huski)(nil) (value of type *Huski) as ConflictingDog value in variable declaration: missing method Bark compiler(InvalidIfaceAssign)
```


#### Build info

```
golang.org/x/tools/gopls v0.7.0
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
    golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    golang.org/x/sys@v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
    golang.org/x/tools@v0.1.3-0.20210608163600-9ed039809d4c h1:Pv9gNyJFYVdpUAVZYJ1BDSU4eGgXQ+0f3DIGAdolO5s=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.2.0 h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
    mvdan.cc/gofumpt@v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
```

#### Extra info

- Gopls log attached: [gopls.log](https://github.com/golang/go/files/6873414/gopls.log)
- Use case: when composing several interfaces and forgetting there is a conflict, the current gopls error is rather misleading and I spent quite some time before figuring it out

Thanks!!
Repository: godot
Issue: v3.3.2 stable mono official (C#) - Cannot Override SetCell Method in TileMap - It is specified in the summary above the method that we should be able to do so.
Labels: bug,topic:dotnet

### Godot version

v.3.3.2 stable mono official

### System information

Windows 10 GLES3

### Issue description

It is not possible to Override the SetCell method in TileMap, even though it is specified in the summary above the method that we should be able to do so, so we can add custom logic to it:
![image](https://user-images.githubusercontent.com/2093814/126892616-93d71e77-f519-45e4-bdab-c8105d883922.png)

Trying to override the Method gives the following error:
![image](https://user-images.githubusercontent.com/2093814/126892580-a10188a9-20e3-4cb0-939f-caba3d292ab1.png)

Which shows that it's none of the types which will enable the method to be overridden.


### Steps to reproduce

1. Create a new project.
2. Add TileMap node to the project
3. Add a .cs script to the TileMap node
4. Try to override SetCell() in the .cs script

This gives the following error: 
"'TileMap.SetCell(int, int, int, bool, bool, bool, Vector2?)': cannot override inherited member 'TileMap.SetCell(int, int, int, bool, bool, bool, Vector2?)' because it is not marked virtual, abstract, or override"

### Minimal reproduction project

[CannotOverrideSetTileInTilemap.zip](https://github.com/godotengine/godot/files/6873562/CannotOverrideSetTileInTilemap.zip)
Repository: godot
Issue: Calling `get_tree.quit(0)` does not quit the Godot editor if fonts exist and are imported at the same time
Labels: bug,topic:import

### Godot version

3.3.stable

### System information

Docker https://hub.docker.com/r/barichello/godot-ci

### Issue description

In the attached test project I'm trying to enable the Parrot addon from the already-enabled addon "pluginsenabler". (This is a hacky workaround for a proposal for enabling plugins from the cli which I will create after this issue)

To be able to correctly enable the plugin, Godot's EditorFileSystem first has to scan all classes. This is done when starting the project in the editor the first time. A file first_run.txt is created and when the filesystem scan is done, it tries to quit godot.

Which works on my mac, but not using the Docker image https://hub.docker.com/r/barichello/godot-ci (which should basically mimic Godot on a stripped-down Linux).

After removing the ttf fonts in Parrot's contrib directory, it strangely works. Adding an otf font again results in the error.

### Steps to reproduce

Start the container and mount the game directory into it. 

Go to the game directory in the container and run 

    godot -e --no-window

This will show "Scan complete. Quitting", but will not quit.

Remove the fonts from the parrot contrib folder

    rm addons/parrot/contrib/*.ttf

Restore project.godot from the test project and remove the file `first_run.txt` and restart the scan:

    godot -e --no-window

Now it works.

### Minimal reproduction project

[testfont.zip](https://github.com/godotengine/godot/files/6873780/testfont.zip)
Repository: pytorch
Issue: Clarify sparse COO tensor coalesce behavior wrt overflow + how to binarize a sparse tensor
Labels: module: sparse,module: docs,triaged

https://pytorch.org/docs/stable/sparse.html#sparse-uncoalesced-coo-docs does not explain what would be the behavior if passed sparse tensor dtype does not fit the accumulated values (e.g. it is torch.bool). Will it do the saturation properly? Or will it overflow during coalescing?

Basically, I would like to binarize a sparse tensor, e.g. to clamp all nonzero values by 1. How can I do that? I've tried `S > 0`, `S.clamp(max = 1)`, `S.to(torch.bool)`.

Only the latter seems to work.

cc @brianjo @mruberry @nikitaved @pearu @cpuhrsch @IvanYashchuk
Repository: godot
Issue: Vulkan: VoxelGI shows artifacts on highly reflective materials
Labels: bug,topic:rendering,topic:3d

### Godot version

Godot 4 nightly build

### System information

Windows 10 v20H2, Intel i7 6700, Nvidia GTX1080, 16GB RAM

### Issue description

Voxel GI consistently shows a wavy lined artifact in dark reflections on highly reflective materials. This is most obvious on metallic materials with very low roughness, and far less obvious on metallic materials with average roughness and non-metallic materials with very low roughness.

### Steps to reproduce

These artifacts will be visible in the darker parts of a reflection on any mirror-like material with low roughness.
Here it is on a highly reflective metallic gold:
![VoxelGI_LinedReflections_01](https://user-images.githubusercontent.com/70243134/126900169-eadbd669-8054-4bef-aaa5-0b3e5bdd48d9.JPG)

It is also visible (to a far lesser degree) on rougher reflective materials (in this case a fully metallic material) with roughness+normal maps:
![VoxelGI_LinedReflections_02](https://user-images.githubusercontent.com/70243134/126900193-6dfcd516-d247-4544-8615-8d3eb4cdfa3c.JPG)


### Minimal reproduction project

A small reproduction project with 3 monkey meshes and 3 planes enclosed in a VoxelGI domain. Each plane has a differing material, from left to right:
1. A highly reflective plastic
2. A rough metal
3. A highly reflective metal. The effect is most obvious here.

**Please open Main_Scene** first. The project can be found below:
[Voxel GI Reflection Artifacts.zip](https://github.com/godotengine/godot/files/6873929/Voxel.GI.Reflection.Artifacts.zip)
Repository: youtube-dl
Issue: ERROR: No video formats found
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

I have tried several Pyrogram bots that uses youtube-dl module to download songs from Youtube. But all of them are getting this error. I guess it's problem from the youtube-dl side, is it going to be fixed soon?
Repository: godot
Issue: Redundant assignement of `textures_to_storage[i]->used_in_compute`
Labels: bug,topic:rendering

### Godot version

4.0 ff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63

### Issue description

https://github.com/godotengine/godot/blob/ff0b5f8fa1be4ccd5b8de1d9d49f8a4b71439f63/drivers/vulkan/rendering_device_vulkan.cpp#L7549-L7558