sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Incorrect suggestion to add a bound where another bound is needed
Labels: A-diagnostics,T-compiler

<!--
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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=54c331139ff05068f86c61f4f685ea52

```rust
trait Parser {
    type Error;
}

trait Enhancer {
    type Parser: Parser;
}

impl<E, P> Parser for E
where
    E: Enhancer<Parser = P>,
    // Uncomment this line to make this compile
    // P: Parser,
{
    type Error = <<Self as Enhancer>::Parser as Parser>::Error;
}
```

The current output is:

```
error[E0277]: the trait bound `P: Enhancer` is not satisfied
  --> src/lib.rs:15:5
   |
15 |     type Error = <<Self as Enhancer>::Parser as Parser>::Error;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Enhancer` is not implemented for `P`
   |
note: required because of the requirements on the impl of `Parser` for `P`
  --> src/lib.rs:9:12
   |
9  | impl<E, P> Parser for E
   |            ^^^^^^     ^
help: consider further restricting type parameter `P`
   |
11 |     E: Enhancer<Parser = P>, P: Enhancer
   |                            ^^^^^^^^^^^^^
```

<!-- The following is not always necessary. -->
It might not be possible to get the hint so at the very least, I would expect no hint instead of the wrong one. But ideally, the output should look like:

```
error[E0277]: the trait bound `P: Parser` is not satisfied
  --> src/lib.rs:15:5
   |
15 |     type Error = <<Self as Enhancer>::Parser as Parser>::Error;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Parser` is not implemented for `P`
   |
note: required because of the requirements on the impl of `Parser` for `P`
  --> src/lib.rs:9:12
   |
9  | impl<E, P> Parser for E
   |            ^^^^^^     ^
help: consider further restricting type parameter `P`
   |
11 |     E: Enhancer<Parser = P>, P: Parser
   |                            ^^^^^^^^^^^
```
(Note the proposed bound is `Parser`, not `Enhancer` anymore).

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

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. The output might also be
different depending on the Edition.
-->
Tested on:
- rustc 1.53.0 (53cb7b09b 2021-06-17)
- rustc 1.55.0-nightly (2f391da2e 2021-07-14)

Possible similar issues:
- #81689
- #58231
Repository: pytorch
Issue: Broadcasting documentation diverges from implementation
Labels: module: docs,module: bootcamp,triaged

## 🐛 Bug

Broadcasting documentation diverges from implementation.

## To Reproduce

The [broadcasting documentation](https://pytorch.org/docs/stable/notes/broadcasting.html#general-semantics) stipulates two conditions to determine if two tensors are broadcastable:

> 1. Each tensor has at least one dimension.
> 2. When iterating over the dimension sizes, starting at the trailing dimension, the dimension sizes must either be equal, one of them is 1, or one of them does not exist.

The first rule seems to explicitly target 0d tensors, because all other tensors fulfill it by default. Yet 0d tensors are actually broadcastable with every other tensor:

```python
>>> a = torch.empty(())
>>> b = torch.empty((1, 2, 3, 4))
>>> c, _ = torch.broadcast_tensors(a, b)
>>> c.shape
torch.Size([1, 2, 3, 4])
```

## Pitch

If we strictly go by the documentation, 0d tensors should not be broadcastable with anything. This would go against `numpy` as well as the array API behavior. 

Thus, IMO we should remove the first rule completely. Since for 0d tensors all dimensions do not exist, rule 2. is sufficient to explain the current behavior.


cc @brianjo @mruberry
Repository: excalidraw
Issue: Keybindings do not work with non English language
Labels: discussion

`Ctrl+Z` works fine if i'm using English layout but Russian language does not work. 
I guess that does not work because app is listening for `key`. I can suggest checking `code` property if that's the case.
Repository: terminal
Issue: Can the Settings UI indicate when a profile is dynamic 
Labels: Help Wanted,Product-Terminal,Issue-Task,Priority-3,Area-SettingsUI


I thought we were going to be adding that text to the SUI at some point, but clearly we forgot to do that.

_Originally posted by @zadjii-msft in https://github.com/microsoft/terminal/issues/8270#issuecomment-882519058_
Repository: pytorch
Issue: Investigate fairscale's use of storage APIs and find alternatives
Labels: triaged,ezyang's list

fairscale's implementation makes extensive use of private storage APIs. Examples:

* https://github.com/facebookresearch/fairscale/blob/782714a8c59da07e2fd4b0dd27d50e3a6ee9fbf4/fairscale/nn/data_parallel/fully_sharded_data_parallel.py#L1922-L1937
* https://github.com/facebookresearch/fairscale/blob/782714a8c59da07e2fd4b0dd27d50e3a6ee9fbf4/fairscale/utils/reduce_scatter_bucketer.py#L41-L57

This has made landing https://github.com/pytorch/pytorch/pull/59671 more complicated. I'd like to see if there is some way to implement this functionality equivalently without making explicit reference to storage. For now, I am just manually fixing these call sites.

cc @kurtamohler
Repository: terminal
Issue: Ability to identify pane ids
Labels: Area-UserInterface,Product-Terminal,Issue-Task

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement
If features are going to be added that rely on the user providing a pane id, e.g. `focus-pane $id` or `swap-panes -s $sid -t $tid` it would be helpful to have a command (perhaps `identify-pane`) that identifies what the ids of each pane are. This would require making the currently internal `_id` public, or choosing some other method of identifying each pane.

This might look like (briefly?) showing the id centered in each pane (excuse the paint mockup)

![image](https://user-images.githubusercontent.com/6185249/126178368-02cf3e06-703c-49e5-9836-19104cb7f130.png)


<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: godot
Issue: Mac HTML export doesn't recognize action key release if Command is pressed
Labels: bug,platform:web,platform:macos,topic:input,topic:export

### Godot version

v3.3.2stable

### System information

MacBook Air M1, HTML export

### Issue description

We're using `Input.get_action_strength` to get player's movement on a web game and found out that, if the Command key is pressed, the method does not update to zero when the key is released. In fact, the input is not recognized at all. Only when the Cmd is realeased we get an InputEvent.
It only happens on Mac HTML export, tested on Chrome, Safari and Firefox.

Since Cmd + Key are shortcuts, I wonder if the browser or the OS is somehow masking these inputs, but I expected it to parse either both pressing and releasing or neither.
Shift + Key and Option + Key get both inputs, Control + Key gets neither.

### Steps to reproduce

1. Register a key to an action on Project Settings (or use the default ui_left, etc)
2. Pressing Cmd, press down the action key = this input is recognized
3. With Cmd down, release the action key = this input is not
4. Release Cmd  = this input is recognized

### Minimal reproduction project

Here's a small project I used to confirm the issue, using default actions ui_up, ui_down, ui_left, ui_right:
[Mac HTML Input.zip](https://github.com/godotengine/godot/files/6842026/Mac.HTML.Input.zip)

I've also uploaded it to itch.io: https://jpdurigan.itch.io/mac-html-action-issue
The password is godot
Repository: flutter
Issue: Add controller property to CupertinoFormSection
Labels: framework,f: cupertino,c: proposal,team-design,triaged-design

I just swapped out a couple of `ListView`s with `CupertinoFormSection`s in my app so as to make it look more native.

To programmatically scroll to the top of a `ListView` from time to time, I passed  a `ScrollController` into the `ListView`.

Unfortunately, the `CupertinoFormSection` doesn't let me pass in my `ScrollController`.
Repository: youtube-dl
Issue: gettr support
Labels: site-support-request

<!--

######################################################################
  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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://gettr.com/post/p4m2t0
- Single video: https://gettr.com/post/p4iahp
- Playlist: N/A

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

This is a new social media launch on july-21
<img width="934" alt="2021-07-19-11_32_56" src="https://user-images.githubusercontent.com/6951562/126186990-213abb0a-2e4a-4725-b967-9c67695ac8a3.png">
Repository: frp
Issue: Exit if login fails while reconnecting
Labels: proposal

<!-- From Chinese to English by machine translation, welcome to revise and polish. -->

I would like an option to make `frpc` to exit when it fails to reconnect.

<!--A clear and concise description of the solution you want. -->

- I thought that `login_fail_exit` would do this, but it does not.
- I submitted a PR to make `login_fail_exit` do this, but what I want is not actually the intended behavior of `login_fail_exit` https://github.com/fatedier/frp/pull/2483

<!--A clear and concise description of any alternative solutions or features you have considered. -->

I would add a new option (maybe `reconnect_login_fail_exit`?) that would make `frpc` exit when it fails to login while reconnecting.

<!--Implementation steps for the solution you want. -->

**Application scenarios of this function**

We need to authenticate our `frpc` clients when they connect to `frps`. We cannot use a single shared token for this purpose, and we do not want to maintain the infrastructure needed to support OIDC authentication. Instead, we have implemented our own authentication system using a [server plugin for Login](https://github.com/fatedier/frp/blob/dev/doc/server_plugin.md#login).

We have a script that generates a JWT and stores it in the environment, and then starts `frpc`. Our `frpc.ini` contains the following line:

```
meta_jwt = {{ .Envs.JWT }}
```

When the client tries to log in, the JWT is passed over to our server plugin, which validates it and allows the login to succeed.

However, the JWT is only valid for a short time. When `frpc` attempts to reconnect, it uses the same JWT as when it was initially started. The JWT is now expired. Our server plugin rejects the login and our tunnel never comes back up, because `frpc` just keeps trying with the same expired token.

Instead of retrying forever, we would like a way to make `frpc` exit when the login fails when reconnecting. Then our script can regenerate the JWT and restart `frpc`, and it will be able to connect again.

<!--Make a clear and concise description of the application scenario of the solution you want. -->
Repository: transformers
Issue: Feature Request: El-Attention
Labels: New model

# 🚀 Feature request
I've looked into the paper titled "[EL-Attention: Memory Efficient Lossless Attention for Generation](https://arxiv.org/abs/2105.04779)".
It proposes a method for calculating attention that forgoes creating multi-head attention from the hidden state. This saves computational time and frees memory. 

## Motivation
El-attention seems to have no downsides, and promises significant memory and performance gains during training and inference. 

## Your contribution
The main difficulty may be in that it requires being added directly in to each model's attention mechanism code, or requires a ton of new subclasses for each part of each model. Maybe an easier solution to this would be a pipeline to use custom  attention mechanism code.
Repository: neovim
Issue: events: provide v:event on TextChanged when text is put
Labels: enhancement,events

Currently, there is a `TextYankPost` event to detect when text is yanked or deleted. It is useful to have similar events to detect when text is put in the buffer (for example, with `p` or `:m`).

`TextPutPre` and `TextPutPost` were mentioned in <https://github.com/neovim/neovim/pull/4448/>.

I don't know if `TextPutPre` is really necessary.

`TextPutPost` should be triggered in the [`do_put` function](https://github.com/neovim/neovim/blob/v0.5.0/src/nvim/ops.c#L2809-L2816), after updating the `'[` and `']` markers.

## Motivation

I wrote a plugin to highlight text when it is pasted from the clipboard. It uses the [paste handler](https://neovim.io/doc/user/lua.html#vim.paste%28%29) to detect when something is pasted ([code](https://github.com/ayosec/hltermpaste.vim/blob/0.2/lua/hltermpaste.lua#L1-L24)). However, there is no way to detect when a user put something using a command (for example, `"xp` to put contents of the register `x`).

With the `TextPutPost` autocommand event, it will possible to handle those cases. 

Also, it can be useful to include a default implementation for this event, similar to [`vim.highlight.on_yank()`](https://neovim.io/doc/user/lua.html#vim.highlight.on_yank%28%29) for `TextYankPost`.
Repository: rust
Issue: Explicit non-'static lifetimes ignored in explicit closure argument types
Labels: A-lifetimes,A-closures,T-compiler,C-bug

I tried this code: https://godbolt.org/z/Pdj46T1v5

```rust
pub fn f<'a>(_: &'a i32, _: impl FnOnce(&mut &mut &'a i32)) {}

pub fn g<'a>(p: &'a i32) {
    f(p, |_: &mut &mut &'a i32| {})
}
```

I expected an error along the lines of "expected `&mut &mut &i32`, got `&mut &mut &'a i32`." Instead, rustc accepts this program.
The following modification does *not* compile with the expected error.
```rust
pub fn f<'a>(_: &'a i32, _: impl FnOnce(&mut &mut &'a i32)) {}

pub fn g<'a>(p: &'a i32) {
    f(p, |x: &mut &mut &'a i32| {
        let _: &mut &mut &'a i32 = x;
    })
}
```
Repository: flutter
Issue: [web] webui Tests are using body.append(scene) which fails to repro shadow dom issues
Labels: team,platform-web,P2,team-web,triaged-web

Tests need to be updated to use a new api to add and remove scenes from scenehost to mirror actual runtime.
Repository: rust
Issue: Confusing error when accidentally inserting `-` in some lines
Labels: A-diagnostics,A-parser,T-compiler,D-papercut,D-verbose


Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
fn do_something(opt1: Option<()>, opt2: Option<()>) {
-   let a = opt1.map(|_| {
        if let Some(_) = opt {
    
        }
    });
}
```
https://play.rust-lang.org/?gist=710a6e61334a9cff89667599564d0a42

The current output is:

```rust
   Compiling playground v0.0.1 (/playground)
error[E0425]: cannot find value `opt` in this scope
 --> src/lib.rs:6:26
  |
6 |         if let Some(_) = opt {
  |                          ^^^ help: a local variable with a similar name exists: `opt1`

error[E0658]: `let` expressions in this position are experimental
 --> src/lib.rs:5:5
  |
5 |   -   let a = opt1.map(|_| {
  |  _____^
6 | |         if let Some(_) = opt {
7 | |     
8 | |         }
9 | |     });
  | |______^
  |
  = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
  = help: you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`

error: expected expression, found statement (`let`)
 --> src/lib.rs:5:5
  |
5 |   -   let a = opt1.map(|_| {
  |  _____^
6 | |         if let Some(_) = opt {
7 | |     
8 | |         }
9 | |     });
  | |______^
  |
  = note: variable declaration using `let` is a statement

error[E0600]: cannot apply unary operator `-` to type `bool`
 --> src/lib.rs:5:1
  |
5 | / -   let a = opt1.map(|_| {
6 | |         if let Some(_) = opt {
7 | |     
8 | |         }
9 | |     });
  | |______^ cannot apply unary operator `-`

error: aborting due to 4 previous errors
```

The last error is the closest one to the actual error.


I know this looks quite contrived but it actually happened to my twice today (new keyboard haha)

Thanks!
Repository: rust
Issue: Missing trait implementation error follows one possible implmentation too greedily
Labels: A-diagnostics,T-compiler

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=94f9614f6312ae589082c677072bfcd5

```rust
trait Producer<T> {
    fn gen(&mut self) -> T;
}

struct Cloner<T>(T);

impl <T: Clone> Producer<T> for Cloner<T> {
    fn gen(&mut self) -> T {
        self.0.clone()
    }
}

impl <T, F: FnMut() -> T> Producer<T> for F {
    fn gen(&mut self) -> T {
        self()
    }
}

fn foo(mut producer: impl Producer<String>) {
    println!("{}", producer.gen());
}

fn main() {
    // actual bug: 8 should have been "8".to_owned()
    foo(Cloner(8));
}
```

The current output (on stable and nightly) is:

```rust
error[E0277]: expected a `FnMut<()>` closure, found `Cloner<{integer}>`
  --> src/main.rs:24:9
   |
19 | fn foo(mut producer: impl Producer<String>) {
   |                           ---------------- required by this bound in `foo`
...
24 |     foo(Cloner(8));
   |         ^^^^^^^^^ expected an `FnMut<()>` closure, found `Cloner<{integer}>`
   |
   = help: the trait `FnMut<()>` is not implemented for `Cloner<{integer}>`
   = note: wrap the `Cloner<{integer}>` in a closure with no arguments: `|| { /* code */ }`
   = note: required because of the requirements on the impl of `Producer<String>` for `Cloner<{integer}>`
```

While this is one possible cause for this issue, a "simpler" cause is that the value inside `Cloner` is not a `String` but an integer. The last line of the error message kind of hints at this, but the bulk of the error is completely unrelated.

I occasionally run into this issue in my codebase, and I'm always confused for a few minutes until I get what's going on. It's a lot harder to figure out in a non-minimal example!

I get the sense that the error message generator or the type solver picks the `FnMut` implementation too greedily for some reason and then spends effort explaining why it doesn't work.

Removing the `FnMut` implementation yields a better error message:

```rust
error[E0277]: the trait bound `Cloner<{integer}>: Producer<String>` is not satisfied
  --> src/main.rs:26:9
   |
21 | fn foo(mut producer: impl Producer<String>) {
   |                           ---------------- required by this bound in `foo`
...
26 |     foo(Cloner(8));
   |         ^^^^^^^^^ the trait `Producer<String>` is not implemented for `Cloner<{integer}>`
   |
   = help: the following implementations were found:
             <Cloner<T> as Producer<T>>`
```

Ideally the output for the original code would be a combination of both or only the "simpler" case, even though that's hard to define.
Repository: flutter
Issue: [web] Detecting the click on "done" in the virtual keyboard in iOS
Labels: a: text input,engine,platform-web,good first issue,P2,customer: arias,team-web,triaged-web

At the moment, there's no proper way to detect the click on "done" in a virtual keyboard. All we receive is a "blur" event on the text field, which is indistinguishable from other "blur" causes.

We may be able to detect this by checking the new focus target. If it's `<body>` then the user most likely clicked "done" on the virtual keyboard. That is because iOS doesn't blur text fields when the user taps on random parts of the page. The only ways to blur are: click "done" or click some other focusable element (e.g. another text field).
Repository: angular
Issue: Accessibility conformance compile-time checks
Labels: feature,area: compiler,Accessibility,feature: under consideration

### Which @angular/* package(s) are relevant/releated to the feature request?

compiler-cli, compiler

### Description

Introduce compile-time conformance checks to guard against accessibility anti-patterns (similar to https://github.com/angular/angular/issues/42690).

### Proposed solution

The Angular compiler can perform extra checks on the user application to guard against common pitfalls. We already have the available parsing and reporting infrastructure, and there's work happening in the direction of expanding the number of compile-time checks.

A few possible candidates for helpful a11y conformance rules are:
- Check for alt text on templates and that alt text is not repetitive (images with "image" in the text)
- Page title defined in the TitleService is unique to each route (or not empty).
- Check that ARIA attributes, props and respective values are valid (one example is the known values for "role" as described in https://github.com/angular/angular/issues/754)
- Ensures that the heading, anchor and button elements have content in it
- Forms should have labels and associated controls

### Alternatives considered

An alternative is to delegate these checks to linters, such as eslint or codelyzer, which have some coverage for these rules. Even though this would reduce maintenance, we'd also be limited to only applications using the linting tooling and have explicitly enabled these checks.