sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Diagnostic for `dyn Self` could be more specific
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,D-papercut

Code ([play]):

```rust
trait S {
    fn f() -> dyn Self;
}
```

[play]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6f2a1b502460a961d6e5f33abace4dcd

Current diagnostic (1.34.0-nightly 2019-02-15 eac09088e1a8fc8a2930):

```
error[E0411]: expected trait, found self type `Self`
 --> src/lib.rs:2:19
  |
2 |     fn f() -> dyn Self;
  |                   ^^^^ `Self` is only available in impls, traits, and type definitions
```

@Moongoodboy-K on IRC points out that it might be more helpful for the
diagnostic to say something like,

> expected trait, found concrete type `Self`
>
> (help: `Self` refers to the concrete type implementing this trait)

(For context: while I’ve since learned that this code is pretty far from
valid, the intent was to find a way to use `Self`-types while preserving
object-safety. My intuition was that it should suffice to return the
receiver’s vtable from the function, which suggested to me the syntax
`dyn Self`. Using simply `fn f() -> dyn S` is object-safe but loses the
self-typing, which might matter if given something like `dyn S + Send`.)
Repository: rust
Issue: Tracking issue for LinkedList cursors
Labels: A-collections,T-libs-api,B-RFC-implemented,C-tracking-issue,Libs-Tracked

This is a tracking issue for the RFC "Linked list cursors" (rust-lang/rfcs#2570).

**Steps:**

- [x] Implement the RFC (#68123)
- [ ] Update documentation, add examples
- [ ] Stabilization PR ([see instructions on forge][stabilization-guide])

[stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html
[doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation

**Unresolved questions:**

- [ ]  Only for linked lists?
Repository: node
Issue: http server.headersTimeout keeps the socket open after timeout
Labels: http

* **Version**: v11.6.0
* **Platform**: Darwin Mariuss-MBP-2.lan 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64
* **Subsystem**: http

In case timeout is reached for `server.headersTimeout`, node keeps the socket open until it receives data or `server.timeout` is reached. 

I believe this issue causes dropped connections / 502 errors on AWS ALB (load balancer), because it tries to send data and socket closes immediately after data is received.

I have set `server.headersTimeout = 10 * 1000` and ran tcpdump to confirm.

![image](https://user-images.githubusercontent.com/11269671/52915905-29fdb000-32e2-11e9-87b8-6c72b04c0b35.png)

As you can see in the dump, 24 seconds has passed, data was received, acknowledged and socket closed after data was received.

I expected socket to be closed after 10 seconds has passed without data.
Repository: node
Issue: http socket might get reset instead of normal close while handling timeout
Labels: help wanted,http

* **Version**: v10.15.1
* **Platform**: Linux 0fe3a1d57e94 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 GNU/Linux
* **Subsystem**: http,net

We were experiencing unexpected dropped connections between AWS ALB and nodejs application resulting in 502 errors from load balancer.

Managed to replicate a condition when nodejs abnormally closes socket with RST packet instead of normal FIN packets.

Here's exact conditions:
```
server.timeout = 10 * 1000;
server.keepAliveTimeout = 0;
```

![image](https://user-images.githubusercontent.com/11269671/52916312-6501e280-32e6-11e9-9dab-f37d2223c625.png)

We kept doing requests to the same connection every 10 seconds to trigger the condition.

Note that data was received and acknowledged, but instead of handling data or closing socket in a normal way nodejs reset the tcp connection.
Repository: TypeScript
Issue: tsconfig - Ignore errors by ids
Labels: Suggestion,Awaiting More Feedback

I know that all errors in TypeScript are optional, it'd be nice if we could declare which error ids we want to ignore.

I.E. In the `tsconfig.json`:

```json
{
   "compilerOptions":{
      "ignoreErrors":[2403,2686,...]
   }
}
```

The reason I say this is because a lot of these errors are just irratating... Like the error:

```
'L' refers to a UMD global, but the current file is a module. Consider adding an import instead.
```

This isn't an actual type error. It's a code style suggestion, and is entirely subjective unlike invalid type errors. I find many little 'errors' like this and they are deeply frustrating, as they just fill the error log with rubbish... Allow us to define which error ids we want to ignore, and this won't happen.
Repository: godot
Issue: KinematicBody2D: test_move breaks when parent is offset from (0, 0)
Labels: documentation,topic:physics

**Godot version:**
3.1 beta 4

**OS/device including version:**
Windows 10


**Issue description:**
When a kinematic body 2d's parent does not have the position (0, 0), test_move behaves incorrectly.


**Steps to reproduce:**
Open attached project. Play the LevelBase scene by itself. Notice that it works normally. Now change LevelBase's position and test again. Notice that the platformer character will no longer behave correctly, such as refusing to jump, fast falling off ledges, etc. These have to do with the test_move checks in Player.gd, which is basic platforming logic.
you can also test
 in TestRoom.tscn, and see how it impacts the game in Main.tscn.

**Minimal reproduction project:**
[Spectrum.zip](https://github.com/godotengine/godot/files/2874021/Spectrum.zip)
Repository: go
Issue: runtime: adopt mesh allocation technique?
Labels: ExpertNeeded,NeedsInvestigation,FeatureRequest,compiler/runtime

I recently came across [Mesh: Compacting Memory Management for C/C++ Applications](https://arxiv.org/abs/1902.04738). From the paper:

> It introduces Mesh, a novel memory allocator that acts as a plug-in replacement for malloc. Mesh combines remapping of virtual to physical pages (meshing) with randomized allocation and search algorithms to enable safe and effective compaction without relocation for C/C++.

The results look quite promising:
> […] it reduces the memory of consumption of Firefox by 16% and Redis by 39%.

I’m not familiar enough with Go’s allocator to say precisely whether we could adopt mesh (or parts of it), but I figured I’d bring it up, just in case the paper doesn’t already find its way to people working on Go’s allocator :)
Repository: flutter
Issue: [video_player] Add network cache functionality
Labels: c: new feature,p: video_player,package,team-ecosystem,P2,triaged-ecosystem

## Steps to Reproduce
I built this sample:

https://github.com/flutter/plugins/tree/master/packages/video_player/example
(v0.10.0+2)

and switched tab from side to side. Downloaded videos are disappear and started redownloading every time.

## Flutter Doctor
```
[√] Flutter (Channel beta, v0.11.10, on Microsoft Windows [Version 10.0.17763.316], locale ja-JP)
    • Flutter version 0.11.10 at C:\flutter
    • Framework revision c27c4a265e (3 months ago), 2018-11-26 17:07:24 -0500
    • Engine revision eebc6a5895
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\XXXXXXXX\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 33.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] Connected device (1 available)
    • Pixel 3 • XXXXXXXXX • android-arm64 • Android 9 (API 28)

• No issues found!
```
Repository: vue
Issue: Chrome overrides value if superior to max value of input[type=range] because Vue sets attributes in the same order as they are provided
Labels: browser quirks,has workaround

### Version
2.6.6

### Reproduction link
https://codepen.io/posva/pen/LqMMNV







### Steps to reproduce

- set value attribute before max with a value > 100 on Chrome

### What is expected?
Vue should respect the value attr regardless of whether it is outside of the bounds of the default min/max threshold

### What is actually happening?
Vue sets the value to 100 if it is >100

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: create-react-app
Issue: Generate .gitignore at the same time README.md and package.json are created (before npm install)
Labels: issue: proposal

I would like to propose that `.gitignore` gets created at the same time `README.md` and `package.json` do. Right now from experimentation it seems like the two do get created first, then `npm install` is run and then a bunch of other files including `.gitignore` gets dropped into the directory.

There's probably a reason for that, maybe the `.gitignore` gets copied from the scripts package, I don't know, but still, maybe an interim `.gitignore` could be created which ignores `node_modules`?

The reason I ask for this is because when I run `create-react-app .` (create in the current directory) in the VS Code Terminal, VS Code tries to calculate changes at npm-install-time and often runs into the too may changes state, which is a wasted effort ultimately, because at the end of the CRA creation, the Git ignore file gets dropped and the resulting set of changes is correct.

Providing the Git ignore file upfront (before `npm install`) or providing an interim one to be replaced by the filed one would solve this issue and make the experience a bit nicer.
Repository: go
Issue: cmd/gofmt: remove plus operator before variable
Labels: NeedsDecision,FeatureRequest

In the following program:

```go
package main

import "fmt"

func main() {
	a := 3
	b := 7
	a = +b
	a += +b
	fmt.Println("a", a, "b", b)
}
```

I believe the `+b` is extraneous and does not modify command operation, in both cases. Could `go fmt` simplify this by removing the plus operator? Similarly we remove things like braces and semicolons when they are unnecessary and do not affect program operation.

Running `go` tip.
Repository: flutter
Issue: Why is StreamSubscription( _subscription) not exposed in StreamBuilder
Labels: c: new feature,framework,P2,team-framework,triaged-framework

Reading the code for StreamBuilder: 

https://github.com/flutter/flutter/blob/ef276ffea501a9f9ea4d627f9d069e52a31b75be/packages/flutter/lib/src/widgets/async.dart

Is there any reason for not exposing StreamSubscription(_subscription)?

It would be nice to use pause etc.
Repository: go
Issue: x/crypto/ed25519: Use sync.Pool to reuse hash.Hash
Labels: Performance,NeedsInvestigation

In [Ed25519](https://github.com/golang/crypto/tree/master/ed25519) package, every [signing](https://github.com/golang/crypto/blob/master/ed25519/ed25519.go#L130) and [verifying](https://github.com/golang/crypto/blob/master/ed25519/ed25519.go#L192) calls create a new SHA-512 `hash.Hash` by calling `sha512.New`.

Thinking of scenarios where multiple calls are made to those functions (e.g., in an HTTP handler), using a `sync.Pool` to store those `hash.Hash` and reuse them would optimize both performance and memory usage.
Repository: pytorch
Issue: [feature request] build and move distributions w/ device and/or dtype
Labels: module: build,module: distributions,triaged



cc @malfet @seemethere @walterddr @fritzo @neerajprad @alicanb @nikitaved
Repository: flutter
Issue: Cannot change the binding address of the Observatory (custom embedding)
Labels: engine,dependency: dart,P2,team-engine,triaged-engine

The binding address for the observatory appears to be hard-coded to use localhost. There also does not appear to be a way to force binding to a different address.

As I understand, this issue is solved with port forwarding when working with android/ios devices.

This will not work on a device where forwarding is not an option.
Repository: create-react-app
Issue: Rust (wasm) support
Labels: issue: proposal

I've just started to play around with this https://github.com/thomashorrobin/create-react-app-rust `create-react-app` fork that adds rust support. I had some problems with typescript using it and decide to `rebase` on top of the latest `create-react-app` to not waste time debugging for something that's already fixed here. While doing this I realised that the actual changes for rust seem minimal. I'm not sure if there was ever a discussion about folding this fork into this project. I couldn't find anything in the issues to that extent. 

My question is: would it be of interest to include Rust (via WASM) support in this package directly, or maintain the separate fork? If there's interest I can `rebase` again and prepare the fork to be submitted as a PR. Thanks!
Repository: TypeScript
Issue: Docs: Function Parameter Bivariance
Labels: Docs

[Official document about bivariance](https://www.typescriptlang.org/docs/handbook/type-compatibility.html#function-parameter-bivariance) is too simple to understand for newbies.

```
enum EventType { Mouse, Keyboard }

interface Event { timestamp: number; }
interface MouseEvent extends Event { x: number; y: number }
interface KeyEvent extends Event { keyCode: number }

function listenEvent(eventType: EventType, handler: (n: Event) => void) {
    /* ... */
}

// Unsound, but useful and common
listenEvent(EventType.Mouse, (e: MouseEvent) => console.log(e.x + "," + e.y));

// Undesirable alternatives in presence of soundness
listenEvent(EventType.Mouse, (e: Event) => console.log((<MouseEvent>e).x + "," + (<MouseEvent>e).y));
listenEvent(EventType.Mouse, <(e: Event) => void>((e: MouseEvent) => console.log(e.x + "," + e.y)));

// Still disallowed (clear error). Type safety enforced for wholly incompatible types
listenEvent(EventType.Mouse, (e: number) => console.log(e));
```

And sample code is also confusing, painfully I have found these awesome examples:

```ts
// Contravariance
class Example {
    foo(maybe: number | undefined) { }
    str(str: string) { }
    compare(ex: Example) { }
}

class Override extends Example {
    foo(maybe: number) { } // Bad: should have error.
    str(str: 'override') { } // Bad: should have error.
    compare(ex: Override) { } // Bad: should have error.
}
```

and

```ts
// Bivariance
interface Comparer<T> {
    compare(a: T, b: T): number;
}

declare let animalComparer: Comparer<Animal>;
declare let dogComparer: Comparer<Dog>;

animalComparer = dogComparer;  // Ok because of bivariance
dogComparer = animalComparer;  // Ok
```

Related references:

- [Strict function types](https://github.com/Microsoft/TypeScript/pull/18654)
- [Overridden method parameters are not checked for parameter contravariance](https://github.com/Microsoft/TypeScript/issues/22156)

Above links are really helpful and clearly to illustrate **bivariance**.
Repository: javascript-algorithms
Issue: Could we have just one way of doing the swapping to have better consistency across the code 
Labels: enhancement

Like how we have here https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/sorting/bubble-sort/BubbleSort.js#L22 instead of
https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/sorting/shell-sort/ShellSort.js#L24
Repository: angular
Issue: Option to leave comments in templates
Labels: feature,area: core,core: basic template syntax,feature: under consideration



# 🚀 feature request

### Relevant Package
<!-- Can you pin-point one or more @angular/* packages the are relevant for this feature request? -->
<!-- ✍️edit: --> This feature request is for @angular/core


### Description
<!-- ✍️--> 
Comments are removed in the rendered angular view. We are using another framework alongside angular whose bindings are within the comments. Our whole code base is written using that framework and we cannot afford to stop development to completely migrate all our code to angular. Which is why we want to do it in small iteration.

Stackblitz sample: https://stackblitz.com/edit/angular-zhw3az?file=src%2Fapp%2Fapp.component.ts

![image](https://user-images.githubusercontent.com/35769594/52995054-3721b880-3422-11e9-8fee-7a4414c99f34.png)



### Describe the solution you'd like
<!-- ✍️--> An option within the Component decorator to leave comments
@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ],
  **HTMLComments: true**
})


### Describe alternatives you've considered
<!-- ✍️--> The alternative would be to completely rewrite all our views changing those bindings.
Repository: TypeScript
Issue: unknown types should not able to concat with strings
Labels: Suggestion,In Discussion

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.3.0

**Code**

```ts
declare const a: unknown;
const b = a + 123;
const c = a + '123';
const d = `${a}123`;
```

**Expected behavior:**
All the declarations of variables `b` `c` `d` should have errors.

**Actual behavior:**
Only declaration of variable `b` have error.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
https://www.typescriptlang.org/play/index.html#src=declare%20const%20a%3A%20unknown%3B%0Aconst%20b%20%3D%20a%20%2B%20123%3B%0Aconst%20c%20%3D%20a%20%2B%20'123'%3B%0Aconst%20d%20%3D%20%60%24%7Ba%7D123%60%3B%0A


Although we won't get runtime errors in this case, it may cause unpredictable result, e.g. "[[Object]]123", which is unexpected, so I think ts should not allow unknown types to concat with strings.
Repository: TypeScript
Issue: How to import generic function type declaration from one javascript file to another?
Labels: Bug,Help Wanted


**TypeScript Version:**  3.3.3

**Search Terms:** import, typedef, callback jsCheck

I have an issue with importing generic function type declared with ```@callback``` in another file. 

Here is example:

In file1.js I've defined generic function with template parameter
```js
    // file1.js
    /**
     * @template T
     * @template {Error} E
     * @callback CallbackWithResult
     * @param {E|null} error
     * @param {T} [result]
     */
```
And in another file I've imported that declaration
```js
    // file2.js

    /** @typedef {import('./file1').CallbackWithResult} CallbackWithResult */
    
    /**
     * @param {CallbackWithResult<number>} callback
     */
    function doSomething(callback) {
       callback(null, 42);
    }
```

Attempting to check file2.js gives following errors
```bash
    file2.js:4:15 - error TS2314: Generic type 'CallbackWithResult' requires 2 type argument(s).
    
    4 /** @typedef {import('./file1').CallbackWithResult} CallbackWithResult */
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    file2.js:7:12 - error TS2315: Type 'CallbackWithResult' is not generic.
    
    7  * @param {CallbackWithResult<number>} callback
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Question is: how to properly import generic declarations without defining another set of template variables?
Repository: rust
Issue: "Conflicting crates" error should show the filenames of the conflicting crates
Labels: C-enhancement,A-diagnostics,T-compiler

I just got this error when compiling rustc:

```
error[E0523]: found two different crates with name `libc` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
   --> /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.1/src/rngs/adapter/reseeding.rs:287:5
    |
287 |     extern crate libc;
    |     ^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0523`.
```

Usually when I get similar errors, it shows some filenames and deletong some of the files involved unblocks the situation. However, for this particular error, for some reason it does not tell me in which files it found these conflicting `libc` crates.
Repository: create-react-app
Issue: Do not rename existing README, rename the CRA README
Labels: issue: proposal

I would like to propose that instead of renaming existing `README.md` to `README.old.md` if any, CRA should instead leave that file alone and drop its readme under the name `README-CRA.md` and not `README.md`.

The rationale for this is that if a readme exists already, it's most likely going to be more valuable than the CRA readme and that's what people should keep seeing after CRA is scaffolded in the repository. It's still handy to have the CRA readme handy, but no one is going to start rebuilding their existing readme on top the CRA one, they will just reference bits of the CRA one in their own.

So instead of forcing people to rename the CRA readme and fixing the incorrect rename of their already existing readme, let's create the CRA readme under a new name and respect the exsting readme.
Repository: flutter
Issue: Get camera FOV
Labels: c: new feature,p: camera,package,team-ecosystem,P3,triaged-ecosystem

Being able to retrieve the horizontal and vertical FOV of a camera would be great.
Repository: pytorch
Issue: Generated `__init__.pyi` contains invalid default values
Labels: triaged,module: codegen

## 🐛 Bug

Generated `__init__.pyi` contains default values (some of them are invalid), due to [conventions](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#conventions) they should be replaced with `...`.

## To Reproduce

Install `torch` and navigate to `site-packages/torch/__init__.pyi`, e.g. search for `c10::nullopt` in it.

## Expected behavior

All default values are specified as `...`

## Environment

PyTorch version: 1.0.1.post2
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Linux Mint 18.3 Sylvia
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect

@t-vi and #12500