sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Incorrect codegen and error detection for static property used as computed key in instance property of the same class
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 the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.8.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** static class properties, computed property access

TypeScript is inconsistent in it's handling of static properties used as keys.

**Code**

```ts
class Some {
    static readonly prop = Symbol();

    [Some.prop] = 22; // compile time error
}
const s = class Some1 {
    static readonly prop = Symbol();

    [Some1.prop] = 22; // runtime error
};

```

**Expected behavior:**
Both examples work like
```js
// javascript
const s = Symbol();
class Some {
  static get prop() { return s; };

  constructor() {
    this[Some.prop] = 22;
  }
}
```
**Actual behavior:**
First example yields compile time error `TS2449: Class 'Some' used before its declaration`.
Second example results in emit that will throw at runtime
```js
"use strict";
var _a, _b;
const s = (_b = class Some {
        constructor() {
            this[_a] = 22;
        }
    },
    _a = Some.prop,
    _b.prop = Symbol(),
    _b);
```


**Playground Links:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
[Playground Link 1](https://www.typescriptlang.org/play/?ssl=1&ssc=11&pln=1&pc=1#code/MYGwhgzhAEDKD2BbAptA3gKGt6EAuYeAlsNAE7JgAm8AdiAJ7QAOZ8z0AvHA4gEbwQACgCUAbgxYcAbQQoAdK3YBdLtABM6iQF8MQA)
[Playground Link 2](https://www.typescriptlang.org/play/#code/MYewdgzgLgBBMF4bADYEMLwMogLYFMYBvAKBnLijSgEtgYAnfNAE3BQE8YAHBkbxDCwdcAIxAoAFAEoA3CTIUA2jgIA6XvwC6ggEy75AXxJA)

**Relevant**
[proposal for class fields](https://github.com/tc39/proposal-class-fields)
Repository: flutter
Issue: Consider adding Performance overlay to platform-web
Labels: c: new feature,framework,platform-web,c: proposal,P2,team-web,triaged-web

**Note:** I'm not sure how this would work or how much work this entails. But it came up as a topic from conversations with @liyuqian, and we noticed there is no bug tracking it.

## Use case

* Performance optimization: Running a Flutter app on the web and seeing some skipped frames, I'd like to reuse my knowledge of Flutter performance tools to start addressing the issue.
* Education: Writing docs about performance, I'd like to give the users two version of an app in [DartPad](https://dartpad.dartlang.org/). Users are able to bring up the performance overlay to see how one version of the app is performing much faster than the other one.

## Proposal

* Enable the performance overlay for Flutter web apps.

For clarity, this is what I mean by performance overlay.

![performance-overlay-green-bb41b466cf6bcd529b285e1510b638086fc5afb8921b8ac5a6565dee5bc44788](https://user-images.githubusercontent.com/919717/76252855-c4d76e00-6206-11ea-96f3-038de08a6bf3.png)

It is [an engine layer](https://github.com/flutter/engine/blob/master/flow/layers/performance_overlay_layer.h) added to a `--profile` (or `--debug`) version of an app by the engine. It shows the build times for the UI thread (a.k.a. main thread, app thread, etc.) and the GPU thread (a.k.a. raster thread -- i.e. not actually running on the GPU).
Repository: angular
Issue: Using slot API with Angular Elements throws an error
Labels: type: bug/fix,area: elements,state: confirmed,state: needs more investigation,P4

# 🐞 bug report

### Affected Package
angular/elements

### Description

I am making a container component in Angular 9 to be turned into a web component.
The container component is first turned into a Web Component once that is done ANY children can be passed into it and manipulate it. I have code that wraps the `<ng-content>` but once the turned into a web component the children are not wrapped.



## 🔬 Minimal Reproduction

First clone https://github.com/alevyKorio/SmartContainer.git

then run `npm install`

then `npm run build:ngelement`

go into `elements` folder and the container has become a web component `SmartContainer.js`
copy that file

clone https://github.com/alevyKorio/SmartContainerShell.git 

paste file into root directory of SmartContainerShell folder

run `npm install`
run `npm run serve`

## 🔥 Exception or Error

As you can see in this image

![image](https://user-images.githubusercontent.com/61990891/76254071-340e8b80-6222-11ea-8c28-7458be339fde.png)
The `div`s are siblings to the `app-smart-container` instead of children

## 🌍  Your Environment

**Angular Version:**
<pre><code>
<!-- run `ng version` and paste output below -->
<!-- ✍️-->
Angular CLI: 9.0.5
Node: 10.16.2
OS: win32 x64

Angular: 9.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.5
@angular-devkit/build-angular     0.900.5
@angular-devkit/build-optimizer   0.900.5
@angular-devkit/build-webpack     0.900.5
@angular-devkit/core              9.0.5
@angular-devkit/schematics        9.0.5
@ngtools/webpack                  9.0.5
@schematics/angular               9.0.5
@schematics/update                0.900.5
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

</code></pre>

**Anything else relevant?**
Once changes are made to SmartContainer run then `npm run build:ngelement` 
go into the `elements` folder and copy the new `SmartContainer.js` to the shell and restart the shell
Repository: flutter
Issue: Add check for existence of system requirement command line tools
Labels: tool,t: flutter doctor,P3,team-tool,triaged-tool

Check for the presence of all required executables as soon as possible (before artifacts are downloaded) in the tool and give a good error message.  `flutter doctor` makes sense but the validators may be run too late to catch `git` or `zip` exceptions.

https://flutter.dev/docs/get-started/install/windows#system-requirements
- Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
- Git for Windows 2.x, with the Use Git from the Windows Command Prompt option.

https://flutter.dev/docs/get-started/install/macos#system-requirements
- bash
- curl
- git 2.x
- mkdir
- rm
- unzip
- which
- zip


https://flutter.dev/docs/get-started/install/linux#system-requirements
(above list + xz-utils)
Repository: storybook
Issue: storySort isn't find all stories in project.
Labels: question / support,core

**Describe the bug**
To control the order of my stories I have the following storySort function:

```
    storySort: (a, b) => {
      // Control root level sort order.
      const sort = [
        'Library/Base Components',
        'Library/Abstractions',
        'Library/Modules',
        'Library/Transient',
        'Library/Page Specific',
        'Library/Deprecated',
        'Library/Uncategorized',
        'Pages',
      ];
      const sortObj = {};

      sort.forEach(function(a, i) {
        sortObj[a] = i + 1;
      });

      const aSplit = a[1].kind.split('/');
      const bSplit = b[1].kind.split('/');

      if (aSplit && bSplit) {
        return (
          sortObj[`${aSplit[0]}/${aSplit[1]}`] -
          sortObj[`${bSplit[0]}/${bSplit[1]}`]
        );
      }

      return a - b;
    },
```

I have story files in two locations e.g. `src/components/SomeComponet/SomeComponent.stories.js` and `src/pages/SomePage/SomePage.stories.js`.

My `main.js` includes stories from these locations with `stories: ['../src/**/*.stories.([tj]s|mdx)'],`, all components appear Storybook however the stores in `src/pages` don't get ordered, and aren't available in the `storySort`. If I `console.log(a[1].kind === 'Pages/SomePage')` I never get true. If I do the same for any of the stories that live in `src/components` e.g. `console.log(a[1].kind === 'Library/SomeComponent')` I always get true.

**To Reproduce**
Repeat what I've outlined above.

**Expected behavior**
Using my sort function above I'd expect to see stories with a little starting with `Pages` to appear after `Library`.

**Screenshots**
![image](https://user-images.githubusercontent.com/824169/76257437-9b8c0180-6249-11ea-8a7f-e5c10ae2c88f.png)


**System:**
```
Environment Info:

  System:
    OS: macOS Mojave 10.14.1
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  Binaries:
    Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
  Browsers:
    Chrome: 80.0.3987.132
    Firefox: 72.0.2
    Safari: 12.0.1
  npmPackages:
    @storybook/addon-backgrounds: ^5.3.13 => 5.3.13
    @storybook/addon-docs: ^6.0.0-alpha.9 => 6.0.0-alpha.12
    @storybook/addon-knobs: ^5.3.12 => 5.3.13
    @storybook/addon-storysource: ^5.3.13 => 5.3.13
    @storybook/preset-typescript: ^1.2.0 => 1.2.0
    @storybook/source-loader: ^5.3.13 => 5.3.13
    @storybook/vue: ^5.3.12 => 5.3.13
```
Repository: rust
Issue: Detect introduction of deadlock by using `if lock.read()`/`else lock.write()` in the same expression
Labels: C-enhancement,A-lints,T-lang,C-feature-request

A coworker came across the following:

```rust
use std::sync::RwLock;
use std::collections::HashMap;

fn foo() {
    let lock: RwLock<HashMap<u32, String>> = RwLock::new(HashMap::new());
    
    let test = if let Some(item) = lock.read().unwrap().get(&5) {
        println!("its in there");
        item.clone()
    } else { lock.write().unwrap().entry(5).or_insert(" eggs".to_string());
        println!("ok we put it there");
        " eggs".to_string()
    };
    println!("There were {}", test);
}

fn main() {
    foo();
}
```

This code compiles, but it will deadlock because of the `lock.read().unwrap()` in the `if let` being kept alive until the end of the `foo` function. MIRI actually catches this, but it would be nice to have a lint against this kind of usage, given that it is a latent foot-gun.
Repository: create-react-app
Issue: When Ejecting - should not use scripts folder
Labels: issue: proposal,needs triage

I have a scripts folder already in my project - when I ran `npm run eject` it complains about a clash with existing scripts folder. I assume it might be a good idea to move react scripts to a folder with a slightly less common name?
Repository: flutter
Issue: flutter clean times out on Runner.xcworkspace clean
Labels: tool,platform-mac,P2,team-tool,triaged-tool

<!-- 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.dev/
      * https://api.flutter.dev/
      * 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.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

0. find a mac os machine
1. install flutter
2. `flutter test`
3. `flutter clean`
4. see it times out (after running for 5 hours)

Please see this run for more details:

https://github.com/tianhaoz95/photochat/runs/494113600?check_suite_focus=true#step:8:9

**Expected results:** <!-- what did you want to see? -->

It should cleans up the build in less than 5 minutes

**Actual results:** <!-- what did you see? -->

It gets stuck and never returns.
Repository: pytorch
Issue: Expose chunk_sizes for DataParallel
Labels: module: nn,triaged,enhancement,module: data parallel

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Allow users to add custom chunk_sizes when running DataParallel.

## 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 am using the SparseConvNet package (https://github.com/facebookresearch/SparseConvNet), where tensors cannot be split evenly because each sample may have different sizes.

## Pitch

<!-- A clear and concise description of what you want to happen. -->

Add a new if statement to allow a custom scatter function to handle chunk_sizes if desired in `torch.nn.parallel.scatter_gather.scatter.scatter_map`: 

```python
def scatter_map(obj):
    if isinstance(obj, torch.Tensor):
        return Scatter.apply(target_gpus, None, dim, obj)
    if hasattr(obj, 'scatter'):
        return obj.scatter(target_gpus, dim=dim)
    if isinstance(obj, tuple) and len(obj) > 0:
        return list(zip(*map(scatter_map, obj)))
    if isinstance(obj, list) and len(obj) > 0:
        return list(map(list, zip(*map(scatter_map, obj))))
    if isinstance(obj, dict) and len(obj) > 0:
        return list(map(type(obj), zip(*map(scatter_map, obj.items()))))
    return [obj for targets in target_gpus]
```

https://github.com/pytorch/pytorch/blob/f62a0060972d594cc1c4ab99d44267373eee4ec6/torch/nn/parallel/scatter_gather.py#L11

And the same for gather/gather_map.

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
Repository: flutter
Issue: Add an example project to the new package template
Labels: tool,P3,team-tool,triaged-tool

All Flutter packages should include an example project that demonstrates how to use the packages.

Typically developers create a Flutter project under `/example` for this purpose.

Flutter should automatically create a new Flutter project under `/example` when creating a new Flutter package using the Flutter tool.

By adding this subproject, more developers are likely to implement an example project, and it alleviates the need for every package developer to manually create this subproject for every new package.
Repository: vscode
Issue: Welcome -> Interface Overview Screen - Title Text for the first two features (Search & File explorer) Needs to change/swap
Labels: bug,workbench-welcome

<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
Interface Overview Screen - Title Text for the first two features (Search & File explorer) Needs to change/swap

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: Visual Studio Code - Version: 1.41.1
- OS Version: Mac OS

Steps to Reproduce:

1. Initial Welcome screen (Help Menu -> Welcome)
2. Click on Interface Overview from Right Side Learn Section

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No: Its common issue comes every time
<img width="1440" alt="vscode-interface-overview-screen" src="https://user-images.githubusercontent.com/41334766/76281734-f78f6e00-62bb-11ea-9ae6-0e64aab10aa7.png">
Repository: TypeScript
Issue: Type definitions overshadowing
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 the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.8.3

(also tried 3.9.0-dev.20200310)

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
"Module '"immutable"' has no exported member"

**Code**

_(not self contained)_

```ts
import { hash } from "immutable";

export function test(): number {
    return hash(1);
}
```

**Actual behavior:**
```
src/index.ts:1:10 - error TS2305: Module '"immutable"' has no exported member 'hash'.

1 import { hash } from "immutable";
           ~~~~
```

even though
`grep "export function hash" node_modules/immutable/dist/immutable.d.ts`
reveals
`export function hash(value: any): number;`

Because it uses type definitions in
`node_modules/@types/draft-js/node_modules/immutable/dist/immutable.d.ts`
instead of
`node_modules/immutable/dist/immutable.d.ts`

**Demo:**

sadly I did not find any way to put it in a playground, in any case:
https://gitlab.com/rawieo/issue_demo_1

**Related Issues:**

- https://github.com/facebook/create-react-app/issues/8578
- https://github.com/immutable-js/immutable-js/issues/1502 (probably)
Repository: rust
Issue: todo! and unimplemented! does not work with impl Trait return types
Labels: C-enhancement,A-diagnostics,T-compiler,A-impl-trait

This code
```
trait SomeTrait {
    fn some_func();
}

fn todo_impl_trait() -> impl SomeTrait { todo!() }
```
does not compile because 
`the trait `SomeTrait` is not implemented for ()`
But such code

```
trait SomeTrait {
    fn some_func();
}

fn todo_impl_trait<T: SomeTrait>() -> T { todo!() }
```
compiles correctly. Can this problem be resolved to use both todo!() and impl Trait?
Repository: vscode
Issue: SCM - Provide multiple ScmResourceGroup in menu commands
Labels: help wanted,feature-request,scm

Hi,
When implementing a menu on a ResourceGroup in SourceControl view. There is always only one group in command args even if the user select multiple ResourceGroup and perform a common menu action there. 

```ts
// groups length is always 1 even when multiple group selected
commands.registerCommand("commandId", (...groups: SourceControlResourceGroup[]) => {
```

The expected behavior is to have the list of SourceControlResourceGroup in command args like when selecting multiple SourceControlResource and execute a common menu action.

```ts
// resources length is greater than 1 when there is multiple resources selected in SourceControl View
commands.registerCommand("commandId", (...resources: SourceControlResourceState[]) => {
```

Regards.

- VSCode Version: 1.42.1
- OS Version: win10
Repository: angular
Issue: Dynamic FormControl binding is broken
Labels: type: bug/fix,area: forms,state: confirmed,forms: Controls API,P4

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🐞 bug report

### Affected Package
<!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->
<!-- ✍️edit: --> The issue is caused by package @angular/forms


### Is this a regression?

<!-- Did this behavior use to work in the previous version? -->
<!-- ✍️--> No, none that I'm aware of.


### Description

<!-- ✍️--> We have a setup in our project where we bind different form-controls to a single input. Additionally we handle blur events to set formatted value to a form-control. The binding is done via function call to determine which form-control to bind input to. The problem is that I change the value on which the function is dependent, form-control binding is kept as if it's cached or memoized?


## 🔬 Minimal Reproduction
<!--
Please create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2
-->
<!-- ✍️--> 
[Link](https://stackblitz.com/edit/angular-issue-repro2-uakgvb)

<!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.
A good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem. 
Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.

Issues that don't have enough info and can't be reproduced will be closed.

You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->