sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Chain iterator adaptor shold drop exhausted subiterator
Labels: C-enhancement,T-libs-api,A-iterators

Consider the following program:

```rust
use std::sync::mpsc::channel;

fn main() {
    let (sender, reciever) = channel();

    let source = (1..10).map(move |i| {sender.send(i).unwrap(); i});
    let sink = reciever;

    let iter = source.chain(sink);
    for x in iter {
        println!("{}", x);
    }

    println!("done");
}
```

Currently, it deadlocks. It can be argued, however, that this program should finish, given that "equivalent" program without chain finishes:

```rust
use std::sync::mpsc::channel;

fn main() {
    let (sender, reciever) = channel();

    let source = (1..10).map(move |i| {sender.send(i).unwrap(); i});
    let sink = reciever;

    for x in source {
        println!("{}", x)
    }
    for x in sink {
        println!("{}", x);
    }

    println!("done");
}
```

I think this can be achieved by changing the `Chain` definition from 

```rust
struct Chain<A, B> {
  left: A,
  right: B,
  state: State,
}

enum State { Left, Right, Both }
```

to 

```rust
struct Chain<A, B> {
  state: State<A, B>,
}

enum State<A, B> { Left(A), Right(B), Both(A, B) }
```

this will require some unsafe code to flip from `Both` to `Left`, using only `&mut Both`, but should be doable. 

Context: I've discovered similarly-shaped code when trying to simplify [this code](https://github.com/async-rs/async-std/pull/419/files#diff-c497dc8de6d1e1471ddca482854b7634R137). Basically, this is an event loop, which works on the stream of events, and some events can feed new events back into the loop. The goal is to make sure the loop is cleanly exhausted. 

Not sure if this actually worth it, given super-obscure use-case and potential complications during implementation...

cc @bluss
Repository: flutter
Issue: Improve fidelity of multi-pointer tap and long press gestures
Labels: platform-android,framework,a: fidelity,f: gestures,P3,team-android,triaged-android

The current implementation of `PrimaryPointerGestureRecognizer` does not precisely reflect the OEM behavior, which affects tap and long press.

Take tap as an example. Consider a button being tapped by 2 pointers (fingers) in the following sequence:
> down1, down2, up1, up2

The OEM behavior is different on different platforms:
- On Android, the `onTapUp` is triggered on `up2`
- On iOS, the `onTapUp` is triggered on `up1`

![1](https://user-images.githubusercontent.com/1596656/68061297-549d6680-fcc1-11e9-8838-b99e6bdc47d8.gif)
![2](https://user-images.githubusercontent.com/1596656/68061298-549d6680-fcc1-11e9-85bb-704a91a29e2a.gif)

Currently Flutter's behaves the same way as iOS.

This issue also affects long press, except that it's the timing of `onLongPress` that is different.

- Flutter version: 93ab9e64e71d8296f3130f8a445e9facdeb2590d
Repository: TypeScript
Issue: Report candidates on closing list terminators
Labels: Effort: Difficult,Domain: Error Messages,Experience Enhancement

From @robpalme: https://twitter.com/robpalmer2/status/1190383568612184064

```ts
function base_init() {
{
    
}

    function me() {
    
}
```

https://www.typescriptlang.org/play/?ssl=8&ssc=1&pln=9&pc=1#code/GYVwdgxgLglg9mABAIwIYGcCmB9GYZQAUAlIgN4BQliNiFAvhRbYqJLAogLaYnnO0GFIA

# Motivation

When an ending curly brace (or similar) is missing, we can give some better hints to the user. 

In some cases, this might be because a stray `}` throws parsing off.

# Suggestion

It would be very cool to explain a possible reason that the user is getting a `'}' expected` error:

> ```
> }
> ~
> This '}' occurs at the same indentation level, but corresponds to a different brace.
> ```
Repository: flutter
Issue: Use unified logging instead of syslog on iOS 13+
Labels: platform-ios,engine,P2,team-ios,triaged-ios

## Proposal

syslog stopped working on iOS 13.  Use os_log unified logging instead of syslog or ASL.
Repository: flutter
Issue: Machine readable output from "flutter build"
Labels: c: new feature,tool,P3,team-tool,triaged-tool

Make output from "flutter build" consistent and machine readable.  This is related to #8351 (the consistency part), but has different use cases.

## Use case

1. There are automation tools out in the wild, such as [fastlane](https://fastlane.tools/) which help us sign and publish artifacts to Play Store, App Store (iTunes) etc.

   These tools benefit from knowing Application ID (aka Bundle ID) and path to flutter-built artifacts. Manually specifying these parameters for every developed application is tedious and prone to errors, which are often discovered late, once the publish process is already broken on CI.

1. Another use case is automated artifact upload, which needs to know output binary file paths.

## Proposal

Make "flutter build" output [optionally] machine-readable, printing the list of outputs (e.g. when building split APK) and Application ID / Bundle ID (which is available via `ApplicationPackage.id`), e.g. in JSON or other parse-able format:

```shell
$ flutter build apk --split-per-abi --debug --machine
< verbose output logged to stderr >
[{
  "apk": "./build/outputs/app.apk",
  "id": "com.example.application",
  "abi": "armv7"
},
{
  "apk": "./build/outputs/app.apk",
  "id": "com.example.application",
  "abi": "x86"
}]
```

or

```shell
$ flutter build apk --debug
< verbose output logged to stderr >
Built ./build/outputs/app.apk (com.example.application).
```
Repository: rust
Issue: Improve error message when an operator is only implemented for references of a given type
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,A-suggestion-diagnostics,D-papercut,D-terse

If an operator (for example `std::ops::Sub`) is only implemented for references of a given type and you try to subtract two instances of that type directly, the error message doesn't give a clue that an implementation for references exists.

```rust
use std::ops::Sub;

struct Foo {}

impl Sub<&Foo> for &Foo {
    type Output = Foo;

    fn sub(self, other: &Foo) -> Self::Output {
        Foo {}
    }
}

fn main() {
    let a = Foo {};
    let b = Foo {};

    let c = a - b; // correctly fails, because `Sub` is only implemented for references
                   //  let c = &a - &b;  works
}
```
```
error[E0369]: binary operation `-` cannot be applied to type `Foo`
  --> src/main.rs:17:15
   |
17 |     let c = a - b;
   |             - ^ - Foo
   |             |
   |             Foo
   |
   = note: an implementation of `std::ops::Sub` might be missing for `Foo`
```

It would be nice if the error message said something like:

```
= note: an implementation of `std::ops::Sub` might be missing for `Foo`
= note: an implementation of `std::ops::Sub` exists for `&Foo`
```

… or even suggested to try `&a - &b` instead.

---

I came across this when trying to subtract two `IndexSet`s (from the `indexmap` crate). I saw in the documentation that there was `Sub` implemented, but the compiler complained that subtracting was not possible. It took me a while to figure out that i had to add two `&`s.
Repository: flutter
Issue: Add more control over RenderSliverMultiBoxAdaptor
Labels: c: new feature,framework,f: scrolling,P3,team-framework,triaged-framework

## Use case

I want to create my own `RenderSliver` which would subclassing `RenderSliverMultiBoxAdaptor`. In my custom `RenderSliver`, I want to be able to create or destroy child in any order. To do that I would need to use `_createOrObtainChild` and `_destroyOrCacheChild`. These methods are private to the library thus, I cannot use them.

## Proposal

Rename `_createOrObtainChild` and `_destroyOrCacheChild` to `createOrObtainChild` and `destroyOrCacheChild` and annotate them with `@protected`.

What do you think about that? Does it seem reasonable?
Repository: react
Issue: React DevTools w/ Electron: Profiler "Reload and start profiling" doesn't work due to XMLHttpRequest 'null' origin
Labels: Type: Discussion,Component: Developer Tools

**Do you want to request a *feature* or report a *bug*?**

An error gets thrown when using DevTools Profiler on **Electron** with the "**Reload and start profiling**" feature that leaves Profiler in an unexpected state - the profiling session does not end.

I initially opened [the issue over at Electron](https://github.com/electron/electron/issues/20915), but [got asked to get your opinion first](https://github.com/electron/electron/issues/20915#issuecomment-548996868).

**What is the current behavior?**

- Open React DevTools Profiler in **Electron**
- Click "Reload and start profiling"
- Await reload
- Do actions
- Click "Stop profiling" - does not work
- Because there are errors in console (actually thrown immediately after reload, don't have to do any extra actions):
  ```
  Access to XMLHttpRequest at 'chrome-extension://react-developer-tools/build/renderer.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https.
  ```
  ```
  Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'chrome-extension://react-developer-tools/build/renderer.js'.
  ```

![Errors after triggering profiler](https://user-images.githubusercontent.com/1030080/68028419-81e81580-fcbd-11e9-85ae-58b8437df6d8.png)

![The respective code in React DevTools](https://user-images.githubusercontent.com/1030080/68028680-1ce0ef80-fcbe-11e9-9b63-4fa0494af0dd.png)

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

You'll have to use [Electron Fiddle](https://github.com/electron/fiddle) for this one with this gist: https://gist.github.com/joltmode/82574cab4970def210dac0c68d4c34b8

**What is the expected behavior?**

- Open React DevTools Profiler
- Click "Reload and start profiling"
- Await reload
- Do actions
- Click "Stop profiling"
- See profiler results

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

- React 16.11.0
- Latest version of DevTools
- Electron 6.1.2
Repository: go
Issue: cmd/cgo: inject preamble before other include directives
Labels: help wanted,NeedsInvestigation,FeatureRequest,compiler/runtime

### What version of Go are you using (`go version`)?
<pre>go version go1.13.3 linux/amd64</pre>

### Does this issue reproduce with the latest release?
Yes

### What did you see?
The cgo generated file `_cgo_export.c` includes `stdlib.h` before anything else (see [here](https://github.com/golang/go/blob/8de0bb77ebc3408a586ad96a3c9ae9c231fd15a3/src/cmd/cgo/out.go#L811)). It precludes the possibility to use some "include first" headers without errors or warnings, such as Python.

From the Python docs:

```Since Python may define some pre-processor definitions which affect the standard headers on some systems, you must include Python.h before any standard headers are included.```

Cgo should allow to inject a C preamble before any other include directive.
Repository: flutter
Issue: Flutter SDK hangs while building pub.dart.snapshot on ArchLinux Docker when there are missing system dependencies
Labels: c: crash,tool,dependency: dart,platform-linux,e: OS-version specific,P2,team-tool,triaged-tool

Building the following Dockerfile:
```Dockerfile
FROM archlinux/base

RUN pacman -Sy bash curl git unzip --noconfirm
RUN git clone -b "stable" https://github.com/flutter/flutter.git "$HOME/flutter"
RUN "$HOME/flutter/bin/flutter" channel "stable"
RUN "$HOME/flutter/bin/flutter" doctor
```

hangs while building a snapshot:
```
$ docker build -f flutter_archlinux.Dockerfile .
Sending build context to Docker daemon  646.7kB
Step 1/5 : FROM archlinux/base
 ---> c767d90efdb9
Step 2/5 : RUN pacman -Sy bash curl git unzip --noconfirm
 ---> Using cache
 ---> 09d34d647279
Step 3/5 : RUN git clone -b "stable" https://github.com/flutter/flutter.git "$HOME/flutter"
 ---> Using cache
 ---> a2e793e6ff79
Step 4/5 : RUN "$HOME/flutter/bin/flutter" channel "stable"
 ---> Running in 758d6340502a
Downloading Dart SDK from Flutter engine b863200c37df4ed378042de11c4e9ff34e4e58c9...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  264M  100  264M    0     0  6923k      0  0:00:39  0:00:39 --:--:-- 8369k
Building flutter tool...
```

(From another shell on the same container):
```
# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   7208  3596 ?        Ss   14:05   0:00 bash /root/flutter/bin/flutter --verbose channel stable
root        12  0.0  0.0   7340  1916 ?        S    14:05   0:00 bash /root/flutter/bin/flutter --verbose channel stable
root       118  0.0  0.0   7340  1864 ?        S    14:06   0:00 bash /root/flutter/bin/flutter --verbose channel stable
root       119  177  1.3 1555424 219396 ?      Sl   14:06  31:08 /root/flutter/bin/cache/dart-sdk/bin/dart /root/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot upgrade --verbosity
root       148  0.0  0.0   7472  4216 pts/0    Ss   14:06   0:00 bash
root       386  0.0  0.0  12848  3172 pts/0    R+   14:23   0:00 ps aux

```

On the other hand, building the following Docker image succeeds:

```Dockerfile
FROM archlinux/base

RUN pacman -Sy bash curl git tar unzip which xz --noconfirm
RUN git clone -b "stable" https://github.com/flutter/flutter.git "$HOME/flutter"
RUN "$HOME/flutter/bin/flutter" --verbose channel "stable"
RUN "$HOME/flutter/bin/flutter" doctor
```
Repository: pytorch
Issue: [FR] script returns subclass of the original module class
Labels: triage review,oncall: jit,triaged,TSUsability,TSRootCause:ModuleInheritance

## 🚀 Feature
I would love `jit.script`ed modules to be subclasses of the original ones. Currently, the returned modules are of the same `RecursiveScriptModule` type, making them unusable with `isinstance` calls. While one can get the original name of the module, there is no general way to make the same function work for a regular module and a `RecursiveScriptModule`. 

E.g., the following extremely common pattern is not doable with a `RecursiveScriptModule`. And in fact can silently cause correctness issues unless one manually asserts that `m` is of a known type.

```py
def init(m):
  if isinstance(m, (nn.Linear, nn.Conv2d):
    nn.init.orthogonal_(m.weight)
    if getattr(m, 'bias', None) is not None:
      nn.init.zeros_(m.bias)
  
net.apply(init)
```


cc @gmagogsfm @suo
Repository: TypeScript
Issue: Automatic Brace Insertion (ABI) is undesirable
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  3.7-beta

**Search Terms:** automatic brace insertion ABI syntax error

**Code:**

```ts
function a() {
    "Automatic Brace Insertion! (ABI)";
```

**Expected behavior:**

The input is syntactically invalid, so emit should fail regardless of the state of `noEmitOnError`.  Other forms of un-parsable input already do this, e.g. [`function a(`](https://www.typescriptlang.org/play/?alwaysStrict=false&ssl=3&ssc=2&pln=1&pc=1#code/GYVwdgxgLglg9mABAQwBSIN4ChG8QIgFUwoBTAJwFsYxkyATRAB2XNJIAtSBnHxCOOTbQANgE9EbUL26IocRKWpR+ceqQB0+ANxYAvkA)

**Actual behavior:**

A closing brace is inserted in the emitted JS code.

```js
function a() {
    "Automatic Brace Insertion! (ABI)";
}
```

This means that users who are not using `noEmitOnError` are silently having invalid code transformed into valid code.  I can confirm this actually happened to someone shipping something to production.

**Playground Link:** [ABI Playground Link](https://www.typescriptlang.org/play/?alwaysStrict=false&ssl=1&ssc=1&pln=2&pc=40#code/GYVwdgxgLglg9mABAQwBQEpEG8BQj+IBEAgiFHALbKwSIBCATshAKaICSYAziw7AgEJEqYnXbpCAbhw4gA)

**Related Issues:** https://github.com/microsoft/TypeScript/issues/34870 , https://github.com/microsoft/TypeScript/issues/34871 , [Lazy Twitter report](https://twitter.com/robpalmer2/status/1190383568612184064)

I would suggest this bug deserves to be fixed based on [Design Goal 7](https://github.com/microsoft/TypeScript/wiki/TypeScript-Design-Goals#goals) (_Preserve runtime behavior of all JavaScript code_) and [Design Non-Goal 7](https://github.com/microsoft/TypeScript/wiki/TypeScript-Design-Goals#non-goals) (_Introduce behaviour that is likely to surprise users_).

**Tagline:** _If the braces don't fit, you must not emit._
Repository: godot
Issue: 3D objects get jagged edges in GLES2 (due to low Z-buffer precision on AMD GPUs)
Labels: bug,topic:rendering

3.2.alpha3 (same issue existed in previous versions, including 3.1.1 iirc -- and still existed a day or two ago in build `af4fd9de9`)
Windows 7 / ATI Radeon HD 4870

**This happens in GLES2 only** (at least in my case). In GLES3 all seems fine.

I get these weird glitches where the edges of **large** 3D objects are all jagged. This cube is 20x20x20, and the plane is 200x200:
![jagged](https://user-images.githubusercontent.com/6277234/68075646-67d43300-fda2-11e9-8f4d-4bc801e06ded.gif)

Doesn't matter if the size of the objects comes from scaling the MeshInstance or by adjusting the size of the Mesh itself.

I never noticed this until I bumped up the size of some assets by 10x, to try to fix a potential issue with physics. With the smaller ones everything seemed fine.

While materials don't solve the issue, setting one of the flags `Transparent`, `Unshaded` or `No Depth-Test`, makes the object render correctly, as is the case in the image below. Blue cube has transparency on, red cube doesn't. (Everything else in the materials is default.)
![jagged1](https://user-images.githubusercontent.com/6277234/68075684-f5b01e00-fda2-11e9-9e25-1efccb2bedf1.gif)

Amusingly, though, when I select the red cube, it suddenly renders perfectly fine. When I deselect it, it suddenly no longer does.

My first assumption is that it's related to depth testing. However, [in another issue](https://github.com/godotengine/godot/issues/32764#issuecomment-542140637) someone was suggesting tinkering with camera's `z-near`, and as I started bumping it up in small steps, the glitches started happening farther away from the camera (I had to zoom out further each time to make them happen). For the size of those cubes, setting it to something between 1.0 and 5.0 seems to "move" the glitches far away enough that they are unnoticeable. So in a way that kinda "fixes" it.

(In the gif above I was using `z-far` 10000, but it didn't seem to me that `z-far` made any difference in this. I only made it big to zoom out at will. I noticed the issue when using z-near 0.1 and z-far 500, which are default values, if I'm not mistaken.)

**Steps to reproduce:**
Create a project, add a plane mesh and one or more cube meshes, and make their sizes somewhat big. As far as I could tell, the bigger, the more noticeable the glitches. Also, the more zoomed out, the more noticeable.

Sometimes the glitches don't start happening until I zoom out quite a bit and zoom back in.

**Minimal reproduction project:**
[Jagged-Edges-Test.zip](https://github.com/godotengine/godot/files/3800855/Jagged-Edges-Test.zip)
Repository: pytorch
Issue: error: 'SO_REUSEPORT' was not declared in this scope
Labels: module: build,triaged,module: third_party

## 🐛 Bug

When building from master, the error in the title appears.

## To Reproduce

Steps to reproduce the behavior:

1. checkout master
1. build

## Expected behavior

Build works

## Environment

 - PyTorch Version: 1.4 master
 - OS (e.g., Linux): Fedora Linux
 - How you installed PyTorch (`conda`, `pip`, source): source
 - Build command you used (if compiling from source): `python setup.py develop`
 - Python version: 3.7.4
 - CUDA/cuDNN version: irrelevant
 - GPU models and configuration: irrelevant
 - Any other relevant information: irrelevant

## Additional context

Problem is with nccl, as described here: https://github.com/NVIDIA/nccl/issues/244

The patch described there seems to be working but a workaround would be nice.
Repository: pytorch
Issue: "Unknown type constructor" error in TorchScript
Labels: oncall: jit,triaged,jit-backlog

## 🐛 Bug

Scripting functions and classes with initialisation of List, Dict, Tuple fails, if `import typing` is used instead of `from typing import...`: Error "RuntimeError: Unknown type constructor typing.List"

## To Reproduce
Code 1
```
import torch
from typing import List
@torch.jit.script
def MyFunc():
    my_list: List[float] = []
    return my_list
```
- works normally

Code 2 - fails:
```
import torch
import typing
@torch.jit.script
def MyFunc():
    my_list: typing.List[float] = []
    return my_list
```
- fails with error
```
RuntimeError: 
Unknown type constructor typing.List:
at D:/Programming/Braille/MyCode/qwe.py:6:13
@torch.jit.script
def MyFunc():
    my_list: typing.List[float] = []
             ~~~~~~~~~~~~~~~~~ <--- HERE
    return my_list
```
The same trouble with Dict, Tuple. And with scripting classes.

## Expected behavior
Code 2 works like Code 1

## Environment

Connected to pydev debugger (build 183.5912.18)
Collecting environment information...
PyTorch version: 1.3.0a0+de394b6
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Microsoft Windows 10 Pro
GCC version: Could not collect
CMake version: version 3.12.2

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.0.130
GPU models and configuration: GPU 0: GeForce GTX 1080 Ti
Nvidia driver version: 411.31
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudnn64_7.dll

Versions of relevant libraries:
[pip3] numpy==1.17.2
[pip3] pytorch-ignite==0.2.0
[pip3] pytorch-toolbelt==0.2.1
[pip3] segmentation-models-pytorch==0.0.2
[pip3] torch==1.3.0a0+de394b6
[pip3] torchvision==0.4.1a0+d94043a
[conda] blas                      1.0                         mkl  
[conda] cuda92                    1.0                           0    pytorch
[conda] mkl                       2019.0                    <pip>
[conda] mkl                       2019.0                      118  
[conda] mkl-include               2019.0                    <pip>
[conda] mkl-include               2019.0                      118  
[conda] mkl_fft                   1.0.6            py36hdbbee80_0  
[conda] mkl_random                1.0.1            py36h9258bd6_0  
[conda] pytorch-ignite            0.2.0                     <pip>
[conda] pytorch-toolbelt          0.2.1                     <pip>
[conda] segmentation-models-pytorch 0.0.2                     <pip>
[conda] torch                     1.3.0a0+de394b6           <pip>
[conda] torchvision               0.4.0                     <pip>
[conda] torchvision               0.4.1a0+d94043a           <pip>

cc @suo
Repository: PowerToys
Issue: [FrancyZones] "Move newly created windows to their last known zone" support for PWAs installed from Chromium Edge
Labels: Idea-Enhancement,Product-FancyZones,Area-App Compat

# Summary of the new feature/enhancement
Please support those PWAs installed by Chromium Edge which are opened in individual windows on the "Move newly created windows to their last known zone" function, for now they are opened up in a very strange position (mostly out of the screen)
<!-- 
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).
-->