sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Exponential type/trait-checking behavior from linearly nested iterator adapters.
Labels: C-enhancement,A-trait-system,I-compiletime,T-compiler

The following test takes an exponential amount of time to type-check the body of `huge` (at the time of this writing, reported by `-Z time-passes` under "item-types checking"):
```rust
#![crate_type = "lib"]

pub fn unit() -> std::iter::Empty<()> {
    std::iter::empty()
}

macro_rules! nest {
    ($inner:expr) => (unit().flat_map(|_| {
        $inner
    }).flat_map(|_| unit()))
}

macro_rules! nests {
    () => (unit());
    ($_first:tt $($rest:tt)*) => (nest!(nests!($($rest)*)))
}

pub fn huge() -> impl Iterator<Item = ()> {
    nests! {
        // 1/x * 6/5 seconds.
        4096 2048 1024 512 256 128 64 32 16 8 4 2

        // x * 6/5 seconds.
        1 2 4 8 // 16 32 64
    }
}
```
This has been reduced from an ambiguity-aware parse tree visitor, and you can see a partial reduction here: https://gist.github.com/eddyb/5f20b8f48b68c92f7d4f022a18c374f4#file-repro-rs.

cc @nikomatsakis
Repository: flutter
Issue: embedder channel apis poorly documented, makes it harder to write custom embedders
Labels: engine,d: api docs,e: embedder,P2,team-engine,triaged-engine

trying to create a embedder for flutter, but the documentation around the platform channels is pretty sparse.

documentation I've looked at:
[custom flutter engines](https://github.com/flutter/engine/wiki/Custom-Flutter-Engine-Embedders)
[flutter api docs](https://master-docs-flutter-io.firebaseapp.com/)
[desktop embedder text model](https://github.com/google/flutter-desktop-embedding/blob/master/linux/library/src/internal/text_input_model.cc)

particularly around `flutter/textinput` would love a way to see what platform messages are being sent back and forth within android studio to reverse engineer the protocol and see what the expected messages/responses are. since that would be faster than trying to read the c++ source code.

any way to do this easily?

otherwise where does one find the individual platform channel code for the particular platforms? (android preferably)
Repository: pytorch
Issue: DataLoader: Could not wrapper a exception in threads
Labels: module: dataloader,module: error checking,triaged

## Issue description

It seems that the code in dataloader.py try to wrap exceptions in threads and re-raise it with traceback info which formatted to string. 
https://github.com/pytorch/pytorch/blob/v0.4.0/torch/utils/data/dataloader.py#L22
https://github.com/pytorch/pytorch/blob/v0.4.0/torch/utils/data/dataloader.py#L303
(I paste links in v0.4.0 same to my environment, but it's not changed in master branch)

It did not work in some custom exception which not have a "good" `__init__` method. 
I have tried to fix it but failed. it is impossible to just re-raise a exception (`exc_type` in code) without knowing the detail of `__int__` method.

## Code example
```
class CustomException(BaseException):
    def __init__(self, **kwargs):
        pass

class SomeDataset(torch.utils.data.Dataset):
     def __init__(self, data):
        self.data = data

    def __getitem__(self, index):
        raise CustomException('test')

    def __len__(self):
        return len(self.data)

train_dataset = SomeDatset(train_data)
train_dataloder = torch.utils.data.DataLoader(train_dataset)

for data in train_loader:
    pass
```

Error Message:
```
Traceback (most recent call last):
  File "train.py", line 221, in <module>
    for data in train_loader:
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 286, in __next__
    return self._process_next_batch(batch)
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 307, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
TypeError: __init__() takes 1 positional argument but 2 were given
```

## System Info
```
# python collect_env.py
Collecting environment information...
PyTorch version: 0.4.0
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.4 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration: GPU 0: GeForce GTX 1080
Nvidia driver version: 390.30
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a
/usr/local/lib/python3.6/dist-packages/cntk/libs/libcudnn.so.7

Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect
```
Repository: pytorch
Issue: [Feature request] Advanced indexing in functions like `expand`
Labels: triaged,module: advanced indexing

For functions like `torch.expand`, it would be nice to support advanced indexing with symbols like `...` and `:`. 

For example,

```
>>> a = torch.randn(2, 3, 4, 1)
>>> a.expand(..., 10).shape
torch.Size([2, 3, 4, 10])
```
Repository: TypeScript
Issue: Inline function refactoring
Labels: Suggestion,In Discussion,Domain: Refactorings

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
inline function method refactoring

## Suggestion

<!-- A summary of what you'd like to see added or changed -->
I would like a refactoring that inlines a function from
```
1: function foo() { return 42; }
2: function bar() { const meaningOfLife = foo(); }
```
to
```
1: function bar() { const meaningOfLife = 42; }
```
## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
This is a very common refactoring and thus widely used while cleaning up code.

## Examples

<!-- Show how this would be used and what the behavior would be -->
In the above code sample, block 1, line 1: selecting foo, the user should be able to inline this function to every occurence and optionally delete the function definition.

In the above code sample, block 1, line 2: selecting foo, the user should be able to inline the function to this occurence, and, if it's the only one, optionally delete the function definition.

I am not sure how the option can be handled in vscode. Eclipse brings up a pop-up with the two options, but afaik vs code tries to be minimalist.
## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: rust
Issue: Move `backtrace` option to the target-specific configuration
Labels: C-enhancement,T-bootstrap

When building a compiler for a target triple which differs from the host triple, it is impossible to express that the host supports libbacktrace, but the target doesn't.
Moving the option from `[rust]` to `[target.xyz]` would make this more flexible, allowing the host compiler to be built with backtrace support, while the target isn't.

cc @alexcrichton
Repository: rust
Issue: rustdoc does not warn about broken links if they contain `.` or `[]`
Labels: T-rustdoc,C-feature-request,A-intra-doc-links

I got a PR yesterday that included something like this:

```rust
/// The tour de force of my career is [`foo.bar()`]
pub mod foo {
    pub fn bar() {}
}
```

In the current nightly rustdoc, `foo.bar()` neither resolves nor warns:

![](https://i.imgur.com/SZnon0r.png)

Our CI with `--deny warnings` did not catch this mistake (although I did 😄). I think rustdoc should trigger `intra-doc-link-resolution-failure` for this case.
Repository: rust
Issue: Tracking issue for -Z emit-stack-sizes
Labels: A-LLVM,T-compiler,B-unstable,C-tracking-issue,WG-embedded,S-tracking-needs-summary,A-CLI

This is an *experimental* feature (i.e. there's no RFC for it) [approved] by the compiler team and added in #51946. It's available in `nightly-2018-09-27` and newer nightly toolchains.

[approved]: https://github.com/rust-lang/rust/pull/51946#issuecomment-411042650

Documentation can be found in [the unstable book](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/emit-stack-sizes.html).
Repository: go
Issue: x/build/cmd/gopherbot: autoassignment of reviews for cherry-picks should be sent to release manager group
Labels: Builders,NeedsFix

Looks like https://go-review.googlesource.com/c/go/+/131596 was auto-assigned to owners but the release-managers Gerrit group (which is the only group allowed to submit to a release branch).
Repository: pytorch
Issue: [caffe2] adam_op implementation is incorrect.
Labels: caffe2

The formula  currently implemented in adam_op.h and adam_op is:

    t = iters + 1
    corrected_local_rate = lr * sqrt(1 - power(beta2, t)) /(1 - power(beta1, t))
    m1_o = (beta1 * m1) + (1 - beta1) * grad
    m2_o = (beta2 * m2) + (1 - beta2) * np.square(grad)
    grad_o = corrected_local_rate * m1_o /(sqrt(m2_o) + epsilon)
    param_o = param + grad_o

which is different from the original paper, and will lead to explosion during training. The update of param_o is supposed to be param_o = param - grad_o. I already validated the result through experiments. Thanks!
Repository: go
Issue: cmd/vet: check for http.ResponseWriter WriteHeader calls after body has been written
Labels: FeatureRequest,Analysis

### What version of Go are you using (`go version`)?

```
$ go version
go version go1.11 linux/amd64
```


### Does this issue reproduce with the latest release?

Yes.


### What operating system and processor architecture are you using (`go env`)?

<details>

```
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/adam/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/adam/code"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
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-build369596792=/tmp/go-build -gno-record-gcc-switches"
```

</details>


### What did you do?

Consider the following code:

```go
package main

import (
        "encoding/json"
        "fmt"
        "net/http"
)

func main() {
        http.HandleFunc("/ping", func (w http.ResponseWriter, r *http.Request) {
                type response struct {
                        Error error `json:"error"`
                }
                if err := json.NewEncoder(w).Encode(response{nil}); err != nil {
                        fmt.Println(err)
                }
                w.Header().Set("Content-Type", "application/json; charset=utf-8")
        })

        go http.ListenAndServe(":6060", nil)

        resp, err := http.Get("http://localhost:6060")
        if err != nil {
                panic(err)
        }
        fmt.Println(resp.Header.Get("Content-Type"))
}
```

This code outputs:

```
$ go run /tmp/vet/main.go
text/plain; charset=utf-8
```

### Comments

It would be nice for vet to be aware of this common mistake and be able to alert the developer to an easy fix. The documentation for `http.ResponseWriter` describes all the details, but that's often missed.
Repository: vscode
Issue: [folding] go to region command
Labels: feature-request,editor-folding,outline

So if we have the ctrl + g to go to line, how about we have a shortcut that will allow us to go to certain region in our code?
Repository: go
Issue: cmd/vet: mismatch between Printf checks and actual behaviour
Labels: help wanted,NeedsFix,Analysis

### What version of Go are you using (`go version`)?
go version go1.11 linux/amd64

### What did you do?
- go run https://play.golang.org/p/5rBLFTsNpqZ
- go vet https://play.golang.org/p/5rBLFTsNpqZ
- compare outputs

### What did you expect to see?
Vet to accept the first Printf call and to flag the second one

### What did you see instead?
Vet flags the first call and accepts the second one
Repository: rust
Issue: 1.29 fails to build on a Windows networked drive
Labels: A-LLVM,O-windows,T-compiler,C-bug

I have a program that builds under 1.28 on Linux and Windows with no errors or warnings.
The same program builds under 1.29 on Linux, but won't build on Windows if the source is on a virtuabox (i.e., networked) drive.

See my initial report here: https://users.rust-lang.org/t/rust-1-29-0-is-out/20400/10?u=mark
And the Cargo.toml and src/main.rs here: https://users.rust-lang.org/t/rust-1-29-0-is-out/20400/20?u=mark
Repository: vscode
Issue: copy the exact path from the new breadcrumbs
Labels: feature-request,breadcrumbs

It would be really great if we can copy and share the breadcrumbs generated a 
path, so we can save a huge time when we work as a team, as we can refer to the exact point of (issue or function) we need to work on next

![screen shot 2018-09-14 at 10 45 22 am](https://user-images.githubusercontent.com/15789257/45540116-e15e3a00-b80b-11e8-8ab9-9b136c9c4581.png)
Repository: angular
Issue: Allow constants, enums, functions to be used in templates without having to add component members
Labels: feature,area: core,core: binding & interpolation,feature: under consideration,canonical

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
Templates cannot refer to anything not directly associated with the component, so you can't for example do this:

```html
<div *ngIf="user.id === someConstant">
</div>
<div *ngIf="user.status === UserStatus.Active">  <!-- UserStatus is an enum -->
</div>
<div *ngIf="isDevMode()">
</div>
```

To make this work, I have to declare these as members of my component:

```typescript
import { someConstant } from './somewhere';
import { UserStatus } from './somewhere';
import { isDevMode } from '@angular/core';

export class MyComponent {
  public someConstant = someConstant;
  public UserStatus = UserStatus;
  public isDevMode = isDevMode;
}
```

These can quickly clutter the component code, and can't be used for const enums. For const enums I have to duplicate the entire enum into a constant, which becomes a maintenance headache.

## Expected behavior
It would be helpful if I could use constants, enums and functions directly from within the template, without needing to assign them to a component member. Maybe a way of importing variables/types into the HTML, or declaring types in the component that are available to the template. Something like this perhaps:

```typescript
import { someConstant } from './somewhere';
import { UserStatus } from './somewhere';
import { isDevMode } from '@angular/core';

@Component({
  selector: 'app-user-list',
  templateUrl: './user-list.component.html',
  templateImports: [someConstant, UserStatus, isDevMode]
})
```

(this particular solution wouldn't work for const enums, other solutions may be better)

## Environment

<pre><code>
Angular CLI: 6.1.2
Node: 8.11.1
OS: linux x64
Angular: 6.1.1
</code></pre>
Repository: go
Issue: runtime: tracebacks don't print function arguments for inlined functions
Labels: NeedsInvestigation,compiler/runtime

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.11 linux/amd64

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/rockmen1/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/rockmen1/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
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-build729838165=/tmp/go-build -gno-record-gcc-switches"

### What did you expect to see?
[run this in go playground, which runs version 1.10.3](https://play.golang.org/p/ZCRmZTwTs3R)

```
panic: oops

goroutine 1 [running]:
main.test(0xc420045f68, 0x1, 0x1, 0x469f51, 0x7, 0x2710, 0xc420078000)  <- parameters trace
        /tmp/test.go:4 +0x39
main.main()
        /tmp/test.go:8 +0x73
```

### What did you see instead?

```
panic: oops

goroutine 1 [running]:
main.test(...)                                           <- gone 
        /tmp/test.go:4
main.main()
        /tmp/test.go:8 +0x39
```
Repository: rust
Issue: run-pass/lib-defaults.rs warns of redundant linker flag
Labels: A-linkage,A-testsuite,C-enhancement,T-compiler

This test:

https://github.com/rust-lang/rust/blob/fccde0018a618eb6f45d2a3c97f629809994dff6/src/test/run-pass/lib-defaults.rs#L13-L18

is causing the following compile-time output to stderr (on Linux; not sure about other hosts):

```
warning: redundant linker flag specified for library `rust_test_helpers`
```

This is the command line that compiletest is constructing:

```
command: "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/src/test/run-pass/lib-defaults.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/run-pass/lib-defaults/a" "-Crpath" "-Zunstable-options" "-Lnative=/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-lrust_test_helpers" "-L" "/home/pnkfelix/Dev/Mozilla/issue53764/rust-53764/objdir-dbgopt/build/x86_64-unknown-linux-gnu/test/run-pass/lib-defaults/auxiliary"
```

I haven't delved deeply into what our requirements are for linkage directives. I'm guessing that `rustc` is able to construct the desired `-lrust_test_helpers` from the presence of the `#[link(name = "rust_test_helpers", kind = "static")]`, but it might be good to know if that is the case on all of our platforms?

(I.e. maybe we should strive to remove the `// compile-flags: -lrust_test_helpers` directive from this test, or if that fails, maybe it conditional on which platform we are testing on...)

In any case I am mainly filling this ticket so I have something to link to in the test when I explain why I'm ignoring the stderr output from the compiler in this case.
Repository: angular
Issue: HttpTestingController does not resolve async/await
Labels: type: bug/fix,freq1: low,area: common/http,P3


## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
When using async await with promises (and therefore: `this.http.get(...).toPromise()`), one can unittest everything like normal with the `HttpTestingController`. _BUT_ if you have a service method that has multiple `await` in it, the testing controller is not aware of the later executed `await` and will just wait and fail.


## Expected behavior
All await calls inside a method should be executed during async testing.


## Minimal reproduction of the problem with instructions
1. use a service with async await function like:
```typescript
@Injectable()
class Service {
  constructor(private http: HttpClient){}
  public async foobar(): Promise<number> {
    await Promise.resolve();
    await Promise.resolve();
    await this.http.get('http://asdf').toPromise();
    return 1;
  }
}
```

2. try to use the `HttpTestingClient` to catch the `http://asdf` request.

## Environment

<pre><code>
Angular version: 6.1.0
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
</code></pre>
Repository: react
Issue: input[type='number'] value isn't updated
Labels: Component: DOM,Type: Needs Investigation

**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
when I enter "01" into input[type=number]，I set the value to 1, but it doesn't work. It still show "01"

**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:**

https://codesandbox.io/s/20ywk1x71n

**What is the expected behavior?**
when I enter "01", it should show "1"

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
15.6.2.   I think it should update in "updatewrapper" in  https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOMInput.js.
Repository: go
Issue: x/build: limit the number of auto-assigned reviewers
Labels: Builders,NeedsInvestigation

This is a follow-up issue to the discussion at https://groups.google.com/forum/#!topic/golang-dev/CdGrNJDcqec, to make sure it doesn't get lost.

In that thread @mvdan proposed:

> If a CL were to ping more than 5 people, simply fallback to pinging someone on the core team (Andy? Ian? Brad?), who can then make a better call than a machine could 

I think we should do this.

@dmitshur @andybons