sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Poor error message when spawning a future returned by an async fn that takes an owned value as reference
Labels: A-diagnostics,A-lifetimes,A-borrow-checker,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,D-terse,S-has-mcve

Let's consider [this snippet](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5545059d2100141c2c6a21fe5bd870b9):

```rust
async fn test(a: &str) {
    println!("{}", a)
}

#[tokio::main]
async fn main() {
    let owned = "Hello!".to_string();
    tokio::spawn(test(&owned));
}
```

If we try to compile it, we'll get the following error:

```text
error[E0597]: `owned` does not live long enough
 --> src/main.rs:8:23
  |
8 |     tokio::spawn(test(&owned));
  |                  -----^^^^^^-
  |                  |    |
  |                  |    borrowed value does not live long enough
  |                  argument requires that `owned` is borrowed for `'static`
9 | }
  | - `owned` dropped here while still borrowed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.
error: could not compile `playground`

To learn more, run the command again with --verbose.
```

The intent here is quite clear: I have ownership of `owned`, I want to pass it to `test` and then call `tokio::spawn` on the resulting future. The error message, though, does not point the user in the right direction.
The issue is indeed about lifetimes, but `owned` is never used again - therefore it'd make sense for the compiler to push the user into creating an async block that takes ownership of `owned` and gives back a `'static` future. E.g.

```rust
async fn test(a: &str) {
    println!("{}", a)
}

#[tokio::main]
async fn main() {
    let owned = "Hello!".to_string();
    let fut = async move {
        test(&owned).await;
    };
    tokio::spawn(fut);
}
```
Repository: neovim
Issue: Pop-up menu location does not shift depending on width to window edge
Labels: bug

I'm on the v0.5.0 nightly (macOS 11.1, Terminal) and notice that large pop-up windows still get truncated at the right edge of the terminal window. 

<img width="584" alt="Screenshot 2021-01-15 at 21 44 59" src="https://user-images.githubusercontent.com/20085376/104821069-9d472e00-5839-11eb-95bb-70305718e84a.png">

As far as I understood, when the popup does not fit width-wise, the expected behaviour is that the pop-up should move to the left of the cursor (see also #13085 ).
Repository: next.js
Issue: next/image images don't load/appear on Apple Watch browser
Labels: Upstream,bug,Image (next/image),linear: next

**What version of Next.js are you using?**

10.0.5

**What version of Node.js are you using?**

Vercel default

**What browser are you using?**

WebKit/Safari

**What operating system are you using?**

Apple Watch

**How are you deploying your application?**

Vercel, repl.it, etc

**Describe the Bug**

Using the web browser on Apple Watch (links sent in Messages/Mail open this way), images using next/image never show up.

**Expected Behavior**

Images should appear as normal, ideally loading at the width of the Apple Watch screen (320 CSS pixels, across all Apple Watch models).

**To Reproduce**

- Use next/image
- Load site on Apple Watch browser
- Images don't appear—only their alt text
- This happens regardless of the meta tag for disabling layout adaptions (`<meta name="disabled-adaptions" content="watch" />`, source https://developer.apple.com/videos/play/wwdc2018/239?time=256)

Try on your own Watch (message the link to yourself): https://next-image-apple-watch.lachlanjc.repl.co or https://next-image-apple-watch.vercel.app

Source code of site: https://vercel.com/lachlanjc/csb-5tn6t/leyjos8un/source?f=src%2Fpages%2Findex.js


The repro app:
![IMG_0813](https://user-images.githubusercontent.com/5074763/104822172-ac64b680-580e-11eb-8abf-a36535a79306.PNG)
![IMG_0814](https://user-images.githubusercontent.com/5074763/104822171-ac64b680-580e-11eb-9c03-7f89efc73af4.PNG)

The repro app works as expected in other browsers, including Safari on macOS & iOS:
<img width="1440" alt="Screen Shot 2021-01-16 at 3 12 04 PM" src="https://user-images.githubusercontent.com/5074763/104822524-14b49780-5811-11eb-9a7c-89dec1f6bbf0.png">
Repository: rust
Issue: Poor diagnostics for [T, N] turbofish instead of [T; N]
Labels: C-enhancement,A-diagnostics,T-compiler

Minimal example:

```rust
fn main() {
    drop::<[(), 0]>([]);
}
```

([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4f71238582d5427dafcae07a57f66b0a))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error: unmatched angle bracket
 --> src/main.rs:2:11
  |
2 |     drop::<[(), 0]>([]);
  |           ^ help: remove extra angle bracket

error: expected one of `;` or `]`, found `,`
 --> src/main.rs:2:15
  |
2 |     drop::<[(), 0]>([]);
  |               ^ expected one of `;` or `]`

error: aborting due to 2 previous errors

error: could not compile `playground`

To learn more, run the command again with --verbose.

```

Here, there actually isn't an unmatched angle bracket; the issue is that `[(), 0]` isn't a type, and that it should be `[(); 0]`. There might be other cases where this mistake causes awkward errors that might need fixing too, but this is just what I found.
Repository: rust
Issue: `#[derive(...)]` doesn't invalidate tokens for nested items
Labels: C-bug,A-proc-macros

Reproduction:
```rust
// check-pass
// aux-build:test-macros.rs

#![feature(stmt_expr_attributes)]
#![feature(proc_macro_hygiene)]

#[macro_use]
extern crate test_macros;

#[derive(PartialEq, Eq)]
struct S {
    field: [u8; #[print_attr] {
        #[cfg(FALSE)] { 10 }
        #[cfg(not(FALSE))]  { 11 }
    }],
}

fn main() {}
```

`#[derive]` will fully configure the item `S` and remove `#[cfg(FALSE)] { 10 }` before outputting the item or passing it to `PartialEq` and `Eq`.
`#[print_attr]` however will print tokens for both `cfg` cases because its input tokens are not invalidated and are stale.

Fix:
- `#[derive]` should walk the whole input item and invalidate tokens for all nested nodes, not only for the item itself.
- Attribute macros should be ready to face input with no tokens and use `CanSynthesizeMissingTokens::Yes`.

cc @Aaron1011
Repository: rust
Issue: no_implicit_prelude attribute is not validated properly with unused_attributes lint
Labels: A-attributes,A-lints,T-compiler,C-bug

The `no_implicit_prelude` attribute can only be applied to modules and the crate root. However, it seems to be silently ignored in all other positions:

```rust
#[no_implicit_prelude]
fn f() {
    #[no_implicit_prelude]
    {
        #[no_implicit_prelude]
        let s = String::new(); // OK
    }
}
```

I expected to see this happen: The UNUSED_ATTRIBUTES lint should trigger for all positions where it is ignored (with a future-incompatible note, since this should never have been allowed), possibly transitioned to a hard error in the future.

Instead, this happened: Attribute is ignored without a warning.

NOTE: There is [a test](https://github.com/rust-lang/rust/blob/8a6518427e11e6dd13d6f39663b82eb4f810ca05/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs#L399-L416) which checks this, but it is only firing because there is already a crate-level `no_implicit_prelude` attribute.

`rustc 1.51.0-nightly (c97f11af7 2021-01-10)`
Repository: vscode
Issue: API registerCallHierarchyProvider does not work as expected and flakily
Labels: under-discussion,callhierarchy

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version:  1.52.1
- OS Version: MacOs 10.15.6

Steps to Reproduce:
I have an extension (repo here:[https://github.com/coolcorexix/jsx-viewer-extension](https://github.com/coolcorexix/jsx-viewer-extension)) that use `vscode.languages.registerCallHierarchyProvider` to process the JSX tree in a file. When I  call the 'peekHierarchyCall' action in a `plaintext` file it works stably and always jump to the breakpoint of `TestHierarchyProvider` (path: `src/vscode-components/test-hierachy-provider.ts`).

But in the context of `ts/tsx/js/jsx` files, **about half of the time** it use another unexpected Hierarchy Provider and does not jump to code of the `test-hierachy-provider.ts` file. I wonder if this is a buggy behaviour or is there any default provider in VsCode app that run on some conditions that I am not aware of.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: go
Issue: plugin: doesn't work well with modules, requires coordinating dependency versions
Labels: Unfortunate,NeedsDecision

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.6 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes.


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/usr/local/go/bin/"
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ua/go/pkg/mod"
GONOPROXY="github.ibm.com/*"
GONOSUMDB="github.ibm.com/*"
GOOS="linux"
GOPATH="/home/ua/go"
GOPRIVATE="github.ibm.com/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build393178232=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
We have an app using a lot of Golang plugins developed by many teams. It works very well with Golang Dep.(https://github.com/golang/dep) because you do not need to care any compatibility issues caused by the new packages of the plugins and all those in the vendor directory because they are all independent.
While when we migrate to Go Modules, there are various compatibility issues. For most scenarios, we need to refine the shared projects and then we have to change all plugins developed by many teams. The workload is huge.
Though finally, we can fix the problem with various ways, the cost is too big so that we have to go back to Golang Dep.

### What did you expect to see?
Like with Golang Dep, if we can build the GoLang plugin successfully, then we can load the plugin with the main app and all plugins can work together without any issue.


### What did you see instead?
Right now, when we successfully build a GoLang plugin, it does not mean the plugin can be loaded and it does not mean it can work with other plugins. There will be various "different version of package" issues.
Repository: yt-dlp
Issue: [Help needed] Merging pending changes from youtube-dl
Labels: help-wanted,solved-upstream

Upstream commits that have not been merged

-----

- [ ] [[jsinterp] Improve parsing](https://github.com/ytdl-org/youtube-dl/commit/295736c9cba714fb5de7d1c3dd31d86e50091cf8)
	* The changes [appear to be pointless?](https://github.com/yt-dlp/yt-dlp/issues/21#issuecomment-1435794447)
- [ ] [[ITV] Overhaul ITV extractor](https://github.com/ytdl-org/youtube-dl/commit/384f632e8a9b61e864a26678d85b2b39933b9bae)
	* Need help!
	* related https://github.com/yt-dlp/yt-dlp/issues/5570
- [ ] [[feat] Add support to external downloader aria2p](https://github.com/ytdl-org/youtube-dl/commit/33db85c571304bbd6863e3407ad8d08764c9e53b)
	* We partially have a different implementation, but is broken. Need to fix it
	* No need to use `aria2p`, we can achieve same with `websockets` directly
- [ ] [[fd/dash] `range` for mpd fragments](<https://github.com/ytdl-org/youtube-dl/commit/bec9180e8904a12c55cfa838b0541879d16bf20f>)
  - Related: https://github.com/yt-dlp/yt-dlp/pull/8711
- [ ] [[ie] range for mpd](<https://github.com/ytdl-org/youtube-dl/commit/4eaeb9b2c680ed097770ce976c3b37a1b05c0800>)
  - Related: https://github.com/yt-dlp/yt-dlp/pull/8711
- [ ] [[ie] Correctly resolve base-url in manifest](<https://github.com/ytdl-org/youtube-dl/commit/1fd8f802b836cc1e8bf87b2dbe02decd6a980cb6>)
  - Related: https://github.com/yt-dlp/yt-dlp/issues/8269
- [ ] [[utils] `base` for `int_or_none`](<https://github.com/ytdl-org/youtube-dl/commit/acc383b9e3c2d454121c22570c901dd2c689dc26>)
- [ ] [[fd/external] Rework ffmpeg detection](<https://github.com/ytdl-org/youtube-dl/commit/21792b88b791b16e3ab0a0fb2e26e5bb8a4e2ff3>)
- [ ] [[test:download] Support `playlist_maxcount` expected value](https://github.com/ytdl-org/youtube-dl/commit/c2766cb80ee9add4d2d2d94b1878e7884c63ceaf)
Repository: flutter
Issue: No easy way of running devicelab tests locally with a local engine
Labels: a: tests,team,engine,P2,c: tech-debt,team-engine,triaged-engine

It's possible to run `dart bin/run.dart -a --local-engine=android_debug_unopt_arm64` in /dev/devicelab, but the device lab tests themselves can do a combination of `flutter run (--debug)` and `flutter run --release`. Since one engine configuration can only do one runtime mode at a time, the best I can come up with is running one configuration, then locally remove all the successful tests from manifest.yaml, then continue where it was blocked last time with the next needed engine. 

We should make it easier to run tests locally.
Repository: godot
Issue: Spotlight and Omni light cull masks do not work in GLES2
Labels: enhancement,topic:rendering

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.2.4 beta 6

**OS/device including version:**
Linux Mint 20

**Issue description:**
Although light cull masks are known to be broken for directional lights, I was trying them for spot lights and omnis. It turns out that the light cull masks don't seem to work in GLES2 but do in GLES3.

![Screenshot from 2021-01-17 14-51-48](https://user-images.githubusercontent.com/21999379/104846674-979e2680-58d3-11eb-87a8-1ab51deb9263.png)

**Steps to reproduce:**
* Create a scene with a box on e.g. layer 5 only.
* Light with a spot light.
* Set the spot light cull mask to only show on layer 4.
* The box is still lit in GLES2, but is unlit in GLES3.

**Minimal reproduction project:**
[light_cull_mask_test.zip](https://github.com/godotengine/godot/files/5826264/light_cull_mask_test.zip)
Run the project in GLES2, switch to GLES3 and run.

**Notes**
This may be by design, but I wanted to add an issue in case there wasn't one already for future reference. Might be something that can be fixed.
Repository: TypeScript
Issue: Error inheriting class B from class A that contains a method that takes a parameter of type B and returns this when decorated with multiple mixins
Labels: Bug

# Bug Report

I'm sorry for the long title but the issue is not easy to translate into words. Let me start a minimal code example.

```ts
type Constructor<T = {}> = new (...args: any[]) => T;

class A {
  foo(b: B): this {
    return this;
  }
}

function MixinA<T extends Constructor<A>>(Base: T) {
  return class MixinA extends Base {};
}

function MixinB<T extends Constructor<A>>(Base: T) {
  return class MixinB extends Base {};
}

class B extends MixinB(MixinA(A)) {}  // ERROR 
```

The error that's being given is:  `Type 'B' recursively references itself as a base type`

In my opinion this error doesn't make sense or am I mistaken? The error disappears when I 
a) remove the use of class B from the `foo` method
b) remove the `this` return type from the `foo` method
c) Only decorate class A with 1 mixin. For some reason the error disappears when only one mixin is used.
d) change the required mixin constructor type to `any`: `function MixinA<T extends Constructor<any>>(...) {...}`

The first 2 options are not viable as they are incompatible with my use case and option d looses type safety within the mixin implementations.


### 🔎 Search Terms

mixins recursively references itself

### 🕗 Version & Regression Information

When testing in the playground it seems like this error occurred between versions 3.6.2 and 3.7.5

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=3.7.5#code/C4TwDgpgBAwg9gOwM7AE4FcDGw6oDwAqUAvFAN4C+AfCVAhAO5QAUAdOwIaoDmSAXFA4IQAbQC6AShI0CAbgCwAKCWYANhyRIoAQXJKoUAGZw4zAEYCAQhIHAAFgEstZfQaioIwdKgRR7ThUUDCiUQ5UVDdARsB0QoAFkHAA8HBG1CKAgk4AgEABMteGQ0LBx8bSoqZksNCAECKRcg909vXzUNLUSUtMzs3IKoGqRoSkCwpUjo4FjfbtTLDKyc-MLEFAxsXDwKquG6qAa9Zo8vHygOzQTkhb6Vwf3yCnGlFXUryzuBrpuES2Z5mlmNoJI0wkA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts

type Constructor<T = {}> = new (...args: any[]) => T;

class A {
  foo(b: B): this {
    return this;
  }
}

function MixinA<T extends Constructor<A>>(Base: T) {
  return class MixinA extends Base {};
}

function MixinB<T extends Constructor<A>>(Base: T) {
  return class MixinB extends Base {};
}

class B extends MixinB(MixinA(A)) {}  // ERROR 
```

### 🙁 Actual behavior

Error `Type 'B' recursively references itself as a base type. ts(2310)`

### 🙂 Expected behavior

No error
Repository: flutter
Issue: Make customized transitions between pages easy to implement
Labels: c: new feature,framework,a: animation,f: routes,c: proposal,P3,team-framework,triaged-framework

## Use case

In my Flutter app, I want to have full control over the transition animations between pages.

When I display a new page (with `Navigator.push()` or `Navigator.pushNamed()`), I need an easy way to:
- customize the animation of the new page (that's pretty much already the case)
- customize the animation of the page that is about to be hidden

When I close the current page to go back to the previous page (with `Navigator.pop()`), I need an easy way to:
- customize the animation of the page that is about to be closed
- customize the animation of the page in the background

## Proposal

This is something very easy to implement in native Android, but surprisingly, almost impossible in Flutter.

Would it be then possible to do something like this (I'll use the `pushNamed()` function, since I use named routes in my app):

```Dart
Navigator.of(context).pushNamed(
    "/myRoute",
    arguments: myArguments,
    animation: (animation, child) => SlideTransition(             // animation for the upcoming page
        position: animation.drive(...)
        child: child),
    secondaryAnimation: (animation, child) => SlideTransition(    // animation for the page about to be hidden
        position: animation.drive(...)
        child: child),
);
```
And pretty much the same when I close a page:

```Dart
Navigator.of(context).pushNamed(
    "someDataReturnedToPreviousPage",
    animation: (animation, child) => SlideTransition(             // animation for the closing page
        position: animation.drive(...)
        child: child),
    secondaryAnimation: (animation, child) => SlideTransition(    // animation for the page in the background
        position: animation.drive(...)
        child: child),
);
```

It's important to note that, sometimes, I need to have different animations between push and pop, and I also need differents pop animations, for example if the user submit a form (that pops the current page to go to the previous page), or just go back to the previous page without submitting anything.

That would help a lot and makes things way much easier to understand and implement, compared to the current implementation.
Repository: scrcpy
Issue: Support for off screen keyboard
Labels: keyboard

When typing on keyboard from computer it is not necessary to have soft keyboard visible on device screen
Repository: node
Issue: Attaching a `request` handler turns off the CONNECT protocol in HTTP2
Labels: http2

* **Version**: v15.6.0
* **Platform**: `Linux solus 5.10.5-167.current #1 SMP PREEMPT Thu Jan 7 14:51:28 UTC 2021 x86_64 GNU/Linux`
* **Subsystem**: http2

### What steps will reproduce the bug?

```js
const http2 = require('http2');

const server = http2.createServer({
    settings: {
        enableConnectProtocol: true
    },
    allowHTTP1: true
});

server.on('stream', (stream, headers) => {
    console.log('got stream:', headers[':method']);
});

// Set this to `false` and it will work
if (true) {
	server.on('request', (request, response) => {
		console.log('got request:', request.method);
	});
}

server.listen(0, error => {
    if (error) {
        throw error;
    }

	const session = http2.connect(`http://localhost:${server.address().port}`);

	const request = session.request({
		':method': 'CONNECT',
		':authority': 'example.com:443'
	});

	request.once('response', (headers, flags, rawHeaders) => {
		console.log('client headers:', headers);
	});

	request.resume();
	request.once('end', () => {
		session.close();
		server.close();
	});
});
```

### How often does it reproduce? Is there a required condition?

Always.

### What is the expected behavior?

```
got stream: CONNECT
```

### What do you see instead?

```
got stream: CONNECT
client headers: [Object: null prototype] {
  ':status': 405,
  date: 'Sun, 17 Jan 2021 18:33:37 GMT',
  [Symbol(nodejs.http2.sensitiveHeaders)]: []
}
```
Repository: godot
Issue: Rapidly pressing enter to confirm AcceptDialog freezes game (possible Popup issue?)
Labels: bug,topic:gui

**Godot version:**
v3.2.4.beta5.official


**OS/device including version:**
Windows 10


**Issue description:**
-_Button_ is pressed which causes _AcceptDialog_.popup()
-then if you immediately press enter on keyboard: _AcceptDialog_ Confirmed() (since focus goes directly to the OK button)
-then immediately press the _Button_ to popup the _AcceptDialog_ again
-immediately press enter again to confirm _AcceptDialog_
-rinse and repeat until...
game freezes (doesn't take long)


**Steps to reproduce:**
Add a button
Add an AcceptDialog
On button press, AcceptDialog.popup()
Load scene
-Rapidly click the button and press enter, the game will freeze (it does on my computer and godot version).

**Minimal reproduction project:**
[AcceptDialogBug.zip](https://github.com/godotengine/godot/files/5826604/AcceptDialogBug.zip)
*note, I have it set to popup_centered() but tested it with popup() and it still happens so that doesn't change anything