sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Badly hoisted variable declaration on tslib import
Labels: Bug

<!-- 🚨 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.2.0-dev.20181204

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
export default async function foo() {
  const out = [];
  for await (const item of [1, 2]) {
    out.push(item);
  }

  return out;
}

foo().then(console.log);
```

**Expected behavior:**

TS places variable declaration at correct scope.

**Actual behavior:**

Variable `_b` is used in a sibling scope, although it was not declared in any parent scope. This only happens when `importHelpers` is enabled. When it's disabled, the variable will be declared at the correct scope.

```js
import * as tslib_1 from "tslib";
export default async function foo() {
    var e_1, _a;
    const out = [];
    try {
        // _b is declared in wrong scope, because it is later used inside
        // the finally block
        for (var _b = tslib_1.__asyncValues([1, 2]), _c; _c = await _b.next(), !_c.done;) {
            const item = _c.value;
            out.push(item);
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) await _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return out;
}
foo().then(console.log);
```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
Difficult to do, here is a minimal repo where the issue can be reproduced: https://github.com/marvinhagemeister/ts-helper-bug

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
no
Repository: flutter
Issue: Adding options to compress/original the picked videos in image_picker.
Labels: c: new feature,a: video,p: image_picker,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

I am using image picker to pick videos from the gallery. The videos picked in iOS is compressed but for android it is not? Is there any widget in flutter that can compress the picked videos?
Repository: flutter
Issue: Ability to Integration Test Marked Text
Labels: a: text input,c: new feature,tool,t: flutter driver,P2,team-tool,triaged-tool

In Flutter's integration/driver tests, it is not possible to programmatically type marked text into an iOS text field.  Because of this, I couldn't write a regression test for https://github.com/flutter/engine/pull/6989.

The crash happened when marked text was cleared from a Cupertino text field.  I was not able to reproduce the crash using our driver tests because of this despite trying various hacks in the engine code.  I stopped short of trying something ugly like installing a Japanese keyboard and tapping on the screen at the right location to hit the right onscreen key.  My failed attempts are located in https://github.com/flutter/flutter/pull/24861.

The [docs on UITextInput](https://developer.apple.com/documentation/uikit/uitextinput?language=objc) contain more info on marked text for anyone that's unfamiliar with phonetic input methods like the Japanese Kana keyboard.

<img width="468" alt="screen shot 2018-11-28 at 9 21 44 am" src="https://user-images.githubusercontent.com/389558/49479498-190bcb00-f7d8-11e8-8f40-1edd43316a05.png">


CC @HansMuller
Repository: go
Issue: cmd/trace: provide aggregate 'go tool trace' goroutine analysis view
Labels: NeedsInvestigation,compiler/runtime

The current 'go tool trace' has a 'goroutine analysis' page, that shows data similar to this:

![image](https://user-images.githubusercontent.com/4958833/49481670-811adb00-f7f1-11e8-88d6-308a739a490a.png)


and after selecting a go routine, a detail page is displayed similar to this:

![image](https://user-images.githubusercontent.com/4958833/49481493-c8ed3280-f7f0-11e8-95f2-35bca4e4af93.png)

This should be changed, so that either 1) the main summary page shows the 'detail' for each in a list, or 2) add an option to the summary page labelled 'details' that provides this information.

If it far more useful than having to view the detail on each go routine individually.
Repository: go
Issue: expvar: make it possible to remove memstat and cmdline defaults
Labels: NeedsInvestigation,FeatureRequest

The `expvar` package contains an `init` function that registers the `memstats` and `cmdline` vars to the `debug/vars` http handler. The package does not provide a means to remove these defaults, forcing the consumer to deal with them. It would be nice if the user had a means to remove these defaults without resorting to `unsafe` or forking the package.

A benchmark I've added reveals a mild but unnecessary performance impact with the defaults (when the number of total expvar.Vars is expected to be small), but the real problem I think is aesthetic:  My other vars have nothing to do with memory usage or the command line, so the memory profile is intrusive to the application.

We also can't use `memstats` and  `cmdline` as named for our own purposes. This does not impact me personally.

```
goos: windows
goarch: amd64
pkg: expvar
BenchmarkExpvarHandler/cmdline.memstats-8               200000          7219 ns/op
BenchmarkExpvarHandler/none-8                            5000000           278 ns/op
BenchmarkExpvarHandler/user.10.vars-8                     300000          5130 ns/op
PASS
ok      expvar    4.822s
```

```
func BenchmarkExpvarHandler(b *testing.B) {
    for _, tc := range []struct {
        Name string
        Init func()
    }{
        {"cmdline.memstats", func() {}},
        {"none", func() { RemoveAll() }},
        {"user.10.vars", func() { for i := 0; i < 10; i++ { NewInt(fmt.Sprintf("i%d", i)) } }},
    } {
        tc.Init()
        b.Run(tc.Name, func(b *testing.B) {
            for n := 0; n < b.N; n++ {
                expvarHandler(writer{}, nil)
            }
        })
    }
}

type writer http.Header
func (w writer) WriteHeader(_ int)           {}
func (w writer) Write(p []byte) (int, error) { return len(p), nil }
func (w writer) Header() http.Header         { return http.Header(w) }
```

Interestingly, the package tests contain an unexported `RemoveAll` function. The recently-closed issue #27555 discusses it in detail, but does not mention the potential use for removing the default vars.
Repository: pytorch
Issue: [caffe2] [NNPACK] how to set thread pool for NNPACK?
Labels: caffe2

I use NNPACK to accelerate my CPU model in caffe2 by setting engine to NNPACK, but how can I set the thread pool which default is the total CPU's cores of my machine. But I don't need the full speed of my machine? What should I do for it?
Repository: pytorch
Issue: Tensor.copy_() seems to work improperly with numpy/list indices
Labels: module: docs,triaged

## 🐛 Bug
When I copied a tensor to part of another tensor, I found a problem when the tensor copied to is indexed by numpy array.
I'm using Pytorch 0.4.1. It is installed by pip, and I'm using Mac OS High Sierra.
 Below is an example, which can be reproduced easily in python environment.
<!-- A clear and concise description of what the bug is. -->

`a = torch.zeros((2,2,1))`
`x = torch.ones((1,1))`
`indices = np.array([0,1])`
`a[0,indices].copy_(x)`
After this, printing out 'a' will still give a tensor full of zeros.

I also found that the same problem occured when indices are list. Below is another reproduction of the problem.
`a = torch.zeros((2,2,1))`
`x = torch.ones((1,1))`
`indices = [0,1]`
`a[0,indices].copy_(x)`

cc @jlin27 @mruberry
Repository: flutter
Issue: Should the modal barrier of an Alert also change the color of the status bar?
Labels: framework,f: material design,f: routes,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

## Steps to Reproduce
1. Create a custom Status Bar color with 

```dart
SystemChrome.setSystemUIOverlayStyle(
  SystemUiOverlayStyle.dark.copyWith(
statusBarColor: Colors.red,
));
```
2. Then create an AlertDialog that shows up on an event
```dart
new AlertDialog(
                    title: new Text("Something went wrong!"),
                    content:
                        new Text("Be sure you are connected to the Device"),
                    actions: [
                      new FlatButton(
                          child: const Text("Ok"),
                          onPressed: () {
                            Navigator.pop(context);
                            _alertShown = 0;
                          }),
                    ])
```
When the AlertDialog is fired up the custom status bar color stays bright and its opacity is not affected


![screenshot_250x400_250x400](https://user-images.githubusercontent.com/30803637/49491270-91769880-f879-11e8-821f-aa71ea5ee4d3.jpg)
Repository: pytorch
Issue: Modern interface for Storage
Labels: module: internals,triaged

Compared to `Tensor`, `Storage` is lacking a bunch of new APIs, including `.device` object, new-style constructors etc. With all the hacks in its code (e.g., https://github.com/pytorch/pytorch/blob/ecc17fe3dd03962f36a989659336e42de86a38ca/torch/cuda/__init__.py#L503-L505), it is really easy to have bugs (e.g., https://github.com/pytorch/pytorch/issues/14673). 

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @ailzhang
Repository: vscode
Issue: Git - Gracefully handle git hooks
Labels: help wanted,feature-request,git

Most projects will have some form of precommit hooks for linting or tests through libraries such as [lint-staged](https://github.com/okonet/lint-staged) and [husky](https://github.com/typicode/husky).

When committing via the source control panel in VSCode there's no visual indicator for when a git hook is running. I think this could be an opportunity to put some UI indicator around this.
Repository: pytorch
Issue: which operator of caffe2  have the same function as torch.nn.Parameter
Labels: caffe2

which operator of caffe2  have the same function as torch.nn.Parameter？ I want create a tensor as module's parameter and that variables can be backpropagated. How can I implement it？ Thanks!
Repository: rust
Issue: Unix domain sockets on Windows
Labels: O-windows,T-libs-api,C-feature-request,A-io

Seeing https://github.com/Azure/mio-uds-windows .. Is there any reason why UDS are not implemented in the standard library for Windows?
Repository: create-react-app
Issue: Support/document immutable deploys - aka immutablewebapps
Labels: issue: proposal

Support/document deployments as described by https://immutablewebapps.org/

I know CRA is doing most of the things already described, so maybe we should have some documentation about doing immutable deploys?
Repository: scrcpy
Issue: Having the ability to put commands like "ctrl+g" in the commandline 
Labels: feature request
Repository: go
Issue: x/build: add CentOS builder
Labels: Builders,NeedsInvestigation,new-builder

In particular for #26746.
Repository: flutter
Issue: Use a value of -1 in the maxLength arg in TextField to hide the maximum length
Labels: a: text input,framework,f: material design,c: proposal,P2,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.io/
      * https://docs.flutter.io/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first:  https://flutter.io/bug-reports/
-->

## Steps to Reproduce

<!--
     Please tell us exactly how to reproduce the problem you are running into.

     Please attach a small application (ideally just one main.dart file) that
     reproduces the problem. You could use https://gist.github.com/ for this.

     If the problem is with your application's rendering, then please attach
     a screenshot and explain what the problem is.
-->

This is based around a discussion between @Hixie and @HansMuller and myself in a different PR thread about the implementation I did of the "magic" value of maxLength to have it hide the actual maxLength but still show the current entered length.

After some discussion it was decided that instead of a large int -- a value of -1 should be used to indicate this behavior.

This is a place holder for that change. 

## Logs

N/A
Repository: flutter
Issue: Positioned widgets should have an option to apply to a Stack widget's size.
Labels: c: new feature,framework,P2,team-framework,triaged-framework

Sometimes it is desirable to have a widget within a Stack be positioned at some arbitrary offset like the following:

```dart
return Column(
  children: <Widget>[
    Stack(
      children: <Widget>[
        Container(height:20, width: 20, color: Colors.green,),
        Positioned(
          top: 10,
          child: Text('Does not render because the stack is only 20x20'),
        )
      ],
    ),
    Container(height:40, width: 40, color: Colors.red,)
  ],
);
```

However, Positioned widgets are not considered when a Stack determines its size. As a result, the text in this example is cropped, and the red square draws too high. This can be worked around by using a Container with its padding set instead of a Positioned widget to wrap the Text. Is this intentional? Perhaps it would be better to give Positioned a bool that marks it for consideration in calculating the Stack's size.
Repository: angular
Issue: feat(service-worker): minify SW script (+ sourcemaps)
Labels: feature,area: service-worker

Currently, the [SW script][1] generated by `@angular/service-worker` is unminified. This was intentional so that it was easier to debug and the stack traces (that people having issues might provide) would be easier to interpret. This is not a major concern, since the SW scripts are aggressively cached by the browser and downloaded/parsed/executed out-of-band with page rendering.

Nonetheless, now that the SW is more stable, it may make sense to minify it for production (with sourcemaps for debugging).

(Related/Duplicate issue: angular/angular-cli#11538)

[1]: https://github.com/angular/angular/blob/8973dd5a7e6ede6d29a98684255088afac294a81/packages/service-worker/BUILD.bazel#L29-L36
Repository: TypeScript
Issue: Using VS Code Go to Declaration support
Labels: Suggestion,In Discussion,Domain: Symbol Navigation

VS Code 1.30 adds support `go to declaration`. This supplements the existing `go to` commands we already have for TypeScript:

* `go to definition`
* `go to type definition`
* `go to implementation`

Although this was added mainly to support languages like C++, I wonder if typescript tooling could also use `go to declaration`. Some ideas:

* https://github.com/Microsoft/TypeScript/issues/14588
* Going to the `d.ts` file (even if declaration map file exists)
Repository: pytorch
Issue: Test OpenCV4 in CI
Labels: module: ci,triaged

It's not tested, evidence https://github.com/pytorch/pytorch/pull/14356

cc @ezyang @seemethere @malfet @walterddr @pytorch/pytorch-dev-infra
Repository: vscode
Issue: Endless 100% CPU when search/replace many TS files at once
Labels: bug,upstream,typescript,javascript,freeze-slow-crash-leak,verification-found,workspace-edit

- VSCode Version: insiders
- OS Version: macOS 10.14

Steps to Reproduce:

1. open the `vscode` workspace
2. search for "`copyright`" in `*.ts`
3. replace with "`copyright2`"
4. run and wait

=> the TS extensions seems to go up to a 100% and stays there without ever recovering.

Full command line:

`bpasero          78619 100.1 11.0  6870176 1840020   ??  R     7:14AM   2:13.12 /Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper.app/Contents/MacOS/Code - Insiders Helper /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/w_/xgfzkgq14jv_ykk2lm0k_h5c0000gn/T/vscode-typescript/tscancellation-43d76d57848697e4dfca.tmp* --locale en --noGetErrOnBackgroundUpdate`
Repository: pytorch
Issue: Negative indexing for nn.Embedding inputs
Labels: module: nn,triaged,needs design,function request

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

Negative indexing for nn.Embedding inputs

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

I found both
- `nn.Embedding`
- `nn.utils.rnn.pad_sequence`

allow negative indexing for padding.

How about we allow negative indexing for `nn.Embedding` inputs as well?

## Example

```python
from torch import nn
from torch.nn.utils.rnn import pad_sequence
import torch

input = [torch.LongTensor([1,2,3]),
         torch.LongTensor([1,4]),
         torch.LongTensor([2])]

padded_input = pad_sequence(input, batch_first=True, padding_value=-1)
# tensor([[ 1,  2,  3],
#         [ 1,  4, -1],
#         [ 2, -1, -1]])

embedding = nn.Embedding(5, 10, padding_idx=-1)

embedded = embedding(padded_input)
# RuntimeError: index out of range at /Users/soumith/code/builder/wheel/pytorch-src/aten/src/TH/generic/THTensorMath.cpp:352
```

cc @albanD @mruberry
Repository: go
Issue: cmd/go: improve error message from '-mod=readonly'
Labels: NeedsInvestigation,GoCommand,modules

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.11.2 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
N/A
</pre></details>

### What did you do?
Run `go build -mod=readonly` when an update of `go.mod` is needed.

### What did you expect to see?
A more descriptive error message. Since `-mod=readonly` is typically supposed to be used in CI, it will save a lot of manual work if the error message did actually tell why an update to `go.mod` is needed.

E.g.:
`go: github.com/sirupsen/logrus@v1.2.0 requires github.com/stretchr/testify@v1.2.2, but go.mod require @v1.2.1 and updates is disabled by -mod=readonly`

### What did you see instead?
`go: updates to go.mod needed, disabled by -mod=readonly`
Repository: flutter
Issue: Requesting Feature: Add DoubleTapDetails params in GestureDoubleTapCallback like GestureTapDownCallback
Labels: c: new feature,framework,f: gestures,P2,team-framework,triaged-framework

for now, if a Gesture was detected as a DoubleTap, the previous TapDown event will not trigger onTapDown. I think it is reasonable.

BUT here is the problem: I want to add a icon and play animations on the double-tap point of the screen but GestureDoubleTapCallback doesn't provide any tap information and I also can not retrieve the TapDown point  since onTapDown is not fired.
Repository: godot
Issue: Online Docs button and other docs links should redirect to translated pages.
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1 alpha 2


**OS/device including version:**
Windows 10

**Issue description:**
When I have open Godot Engine with other than English language, I expect that all docs links will point to translated docs site(of course if its available even in some part). There is a lot of hardcoded links with English language e.g.  https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html and also this links https://docs.godotengine.org/ open English version of docs.

There is also a few links which point to 3.0 docs version instead 3.1(latest) e.g:
- https://docs.godotengine.org/
- https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html
Repository: vscode
Issue: Highlight file containing definition
Labels: help wanted,feature-request,references-viewlet

There is already `Go to Definition` in vscode, so that's usually not the file you're looking for.

Maybe it should also work with [Expanding folder options](https://github.com/Microsoft/vscode-references-view/issues/28) - When file has 1 reference and that reference is the definition - file shouldn't auto expand.
Repository: vscode
Issue: F4 conflict between text search and references list
Labels: search,under-discussion,references-viewlet

Testing https://github.com/Microsoft/vscode/issues/64227.

Here is my scenario:
1) search for references
2) <kbd>F4</kbd> to jump to a particular reference
3) selected some text in the editor and <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd>
4) <kbd>F4</kbd>
=> we jump to the next reference but I'd expect it to jump to the next search result as the search result view has focus

![screen shot 2018-12-04 at 10 16 23 am](https://user-images.githubusercontent.com/4674940/49463612-bc93b600-f7ad-11e8-91d1-de64f15702fc.png)
Repository: react
Issue: calculating context changes in componentDidUpdate
Labels: Type: Feature Request

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**
Bug

**What is the current behavior?**
There is no way to see if `componentDidMount` was caused by a context change

**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:**
```typescript
import React from 'react';

interface ExampleContext {
    param: string;
}

const ExampleContext = React.createContext<ExampleContext>({
    param: 'foo',
});

interface ExampleState {
    data: any;
}

class Example extends React.Component<{}, ExampleState> {
    static contextType = ExampleContext;
    context!: ExampleContext;

    constructor(props) {
        super(props);

        this.state = {
            data: [],
        };
    }

    fetchData(param: string): void {
        // whatever
    }

    componentDidMount() {
        this.fetchData(this.context.param);
    }

    componentDidUpdate() {
        // ???        
    }
}
```
**What is the expected behavior?**
A 4th parameter for `previousContext`

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
16.6