sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Generic constrained to function: parameter is incorrectly inferred as `any`
Labels: Suggestion,Experience Enhancement

<!-- 🚨 STOP 🚨 STOP 🚨 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:**  4.0.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
declare function useCallback<T extends (...args: any[]) => any>(
    callback: T,
): T;
const test: ((x: string) => void) | undefined = useCallback((x) => {
    x; // ❌ type is inferred as `any`, expected `string`
});
```

For context, this typing of `useCallback` is extracted from the React types.

**Expected behavior:** see above

**Actual behavior:** see above

**Playground Link:** https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEAzArgOzAFwJYHtX2QGcQBhKCCAIyjAGsAeAFXhAA8MRVhD4AKAOkGwA5oQBc8KKgCeAbQC6ASngBeAHySZa3gCh4++GHJUatCYwA0OxeYDcOsHkIZ4HZxN69WE5zCyphZXV4ADccLGBlAB8CLhBEfxBgVQJiMgpqOk9WII0Abz0DVlt4AHpS+EAZcldpAAcELB5-RBAYOGSoHgADKWkuixZWeswk+C7ff2EunQBfRVsgA

**Related Issues:** 

- https://github.com/microsoft/TypeScript/issues/31146
- https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30057#discussion_r232123748
Repository: flutter
Issue: Integrate "dart fix" into flutter tool
Labels: tool,c: proposal,P2,team-tool,triaged-tool

This issue is to discuss whether/how we should integrate "dart fix" into flutter tool. Two useful integrations I could see are:

1. Make `flutter fix` available to apply available fixes to my current fluter project (this command would probably just pipe through to "dart fix").
2. Prompt users after upgrading to a new flutter version that they may want to run `flutter fix` to apply any available fixes for breaking changes to their flutter projects (maybe we could automatically detect that new fixes are available in the new version by comparing the dartfix files pre and post upgrade).

/cc @Piinks @jonahwilliams @bwilkerson
Repository: flutter
Issue: Videoplayer's network repeats the request multiple times in a second
Labels: p: video_player,package,team-ecosystem,P2,triaged-ecosystem

When using `VideoPlayerController.network()`, the request to that resource is repeated many times.
initState of the controller:
```
  void initState() {
    super.initState();
    _videoController = VideoPlayerController.network(widget.videoUrl)
      ..initialize().then((value) {
        _videoController.setLooping(true);
        setState(() {
          _videoController.play();
        });
      });
  }
```
`setState()` is only called when the user taps the screen and toggles a boolean value. I've tested that and the initStates/setStates from siblings and parents, none of which are called more than once or twice

The output of the API:
![image](https://user-images.githubusercontent.com/43135550/98585185-2c2e4c00-22c7-11eb-921d-3e1e35ce12b5.png)

Video file send if 1.20 MB and just a few seconds in length.

`flutter doctor -v`:
```
[√] Flutter (Channel stable, 1.22.3, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
    • Flutter version 1.22.3 at D:\(hidden by me ;) )
    • Framework revision 8874f21e79 (11 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\(hidden by me ;) )
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\(using jdk1.8.0_211 but hidden by me ;) )
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] Connected device (1 available)
    • (hidden by me ;) )

! Doctor found issues in 2 categories.

```
Repository: PowerToys
Issue: [PowerRename] Replace content of the file as well as the name
Labels: Idea-Enhancement,Idea-New PowerToy,Product-PowerRename

Hi!

I would like an extension on this tool, I have been making great use of it but I would like the whole team to use this tool.
What could be very usefull is a replace inside the files for certain texts, for example I use this to quickly make copies of a repository we made in C# and make that a new template.
We can than rename a certain word in the file name but also in the content by another word.
For example
[EXAMPLE].MVC
replaced to
Foo.MVC

And all the internal content which has the name [EXAMPLE] will be renamed as well.

I am currently writing a powershell script that takes care of this, but I would love to use your tool for this!

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: TypeScript
Issue: Inline JSDoc tags don't work in comments that start with plain text
Labels: Suggestion,Awaiting More Feedback

TS *mostly* supports inline tags, even though they're not standard, but the implementation is quirky since it's best-effort, not really a committed feature. Specifically, an inline tag works if the line starts with a non-inline tag, or is a line following such a line:

```
/** @param foo @see foo.bar */
```

or

```
/** @param foo - a long description
 * also @see foo.bar */
```

This is all down to the state machine we use for parsing, so it could be improved to also support

```
/** for more info @see foo.bar */
```

Based on discussion in #5802
Repository: react
Issue: Feature suggestion: Allow custom list of hooks to ignore on exhaustive-deps
Labels: Type: Feature Request,Component: ESLint Rules

The `exhaustive-deps` lint rule doesn't require setters from `useState`, dispatch from `useReducer`, and refs from `useRef` in dependencies, because we know for sure those will never change. I'd like to be able to add additional custom hooks to that "safe list". I understand this is potentially very dangerous, but we have a handful of hooks that simply wrap `useRef` with some logic. The returned result is essentially just a `useRef` result, so it's perfectly safe to ignore as a dependency.

I'm imagining something like this in the eslint config:

```
{
  "rules": {
    // ...
    "react-hooks/exhaustive-deps": ["warn", {
      "safeHooks": "(useRefWrapper|useOtherRefWrapper)"
    }]
  }
}
```

Where `useRefWrapper` might look like so:

```
const useRefWrapper = () => {
  const ref = useRef();
  if (ref.current) {
    console.log('hi!');
  }
  return ref;
}
```

Does this seem like a reasonable option, assuming the documentation has a clear caveat mentioning the dangers? If so, I'm happy to work on implementation.
Repository: TypeScript
Issue: Quick Fix command for missing React component imports does not work without React in the scope even with the new JSX factory enabled in Next.js that makes the React import unnecessary
Labels: Bug

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- 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/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.51.0
- OS Version: macOS 10.15.7
- Typescript Version: 4.0.5

Steps to Reproduce:

1. Clone the following repository: https://github.com/ChristianIvicevic/react-jsx-factory-repro
2. `yarn install` all dependencies
3. Open the `index.tsx` and add the `SampleComponent` without automatic completion and import of the component
4. Try to use Quick Fix on the `SampleComponent` to automatically add its import
5. Only the fix to import React is available initially - apply this Quick Fix
6. Open the Quick Fix for a second time - now you are able to add the import for the `SampleComponent`

Here is a gif of the differences with automatic import and with Quick Fixes:

![Kapture 2020-11-09 at 02 20 10](https://user-images.githubusercontent.com/45569997/98490827-12432980-2233-11eb-9118-51732357deb8.gif)

With the newest version of Next.js it is no longer necessary to import the default export of React, thus step 5 should not appear in the first place.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: go
Issue: crypto/cipher: GCM AEAD can be created with a custom nonce OR tag size, but not both
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes, any version, any OS, any CPU.

### What did you do?

I need to do AES GCM with both a custom nonce _and_ a custom tag size - 16 and 12 bytes, respectively (the standard is 12 and 16).

The crypto API offers only [NewGCMWithNonceSize](https://golang.org/pkg/crypto/cipher/#NewGCMWithNonceSize) and [NewGCMWithTagSize](https://golang.org/pkg/crypto/cipher/#NewGCMWithTagSize) public API's for creating a cipher with _either_ a custom nonce _or_ a custom tag size, but not _both_.

I see no technical reason for this limitation given there is a private API that does just that - `newGCMWithNonceAndTagSize`.

I had no problems doing this in Java and PHP and it's not feasible to change our production encryption because of the Go public API limitation.

### What did you expect to see?

I expect the Go public API to allow AES GCM encryption with custom nonce and tag sizes.

### What did you see instead?

Instead I'm forced to hack Go and invoke a private API like this

```
//go:linkname newGCMWithNonceAndTagSize crypto/cipher.newGCMWithNonceAndTagSize
func newGCMWithNonceAndTagSize(cipher cipher.Block, nonceSize, tagSize int) (cipher.AEAD, error)

func Encrypt(s string, key []byte) (string, error) {
    c, err := aes.NewCipher(key)
    if err != nil {
        return "", err
    }
    gcm, err := newGCMWithNonceAndTagSize(c, 16, 12)
    . . .
```

Works like a charm, but I'd rather use public API's instead.
Repository: pytorch
Issue: Allow add_embedding to have dict for metadata
Labels: triaged,module: tensorboard

## 🚀 Feature
I would like to be able to see in tensorboard more than one metadata type. Therefore, it should allow me to send a dictionary rather than a list in the `add_embedding` function.

## Motivation

This is a feature of tensorboard that we don't have today. However, it seems most of it is already there with the `make_tsv` function. I am guessing what is missing is just the reformating of it.
Repository: vscode
Issue: unexpected/unnecessary text refreshing
Labels: bug,linux,menus,upstream-issue-linked,chromium


![refresh](https://user-images.githubusercontent.com/49961658/98602845-b5815680-22a6-11eb-8d27-f5c6e15c1c1f.png)
Issue Type: <b>Bug</b>

1) From "File"->"Open Recent", you'll get something similar to the attached snapshot, where two lines of text are hightlighted in blue.

2) Keep moving mouse up and down (to simulate choosing a file from the file list), and you will notice quite often that the hightlighted bar on the left (which should stay at the line of "Recent") jumping to other places and quicky moving back to the line of "Open Recent".

VS Code version: Code - Insiders 1.52.0-insider (24b28f57be22fe3029cb17a1dd72d8d9c2d6468b, 2020-11-06T05:40:12.937Z)
OS version: Linux x64 3.10.0-693.17.1.el7.x86_64

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz (32 x 2100)|
|GPU Status|2d_canvas: unavailable_software<br>flash_3d: disabled_software<br>flash_stage3d: disabled_software<br>flash_stage3d_baseline: disabled_software<br>gpu_compositing: disabled_software<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>opengl: disabled_off<br>protected_video_decode: disabled_off<br>rasterization: disabled_software<br>skia_renderer: enabled_on<br>video_decode: disabled_software<br>vulkan: disabled_off<br>webgl: unavailable_software<br>webgl2: unavailable_software|
|Load (avg)|2, 1, 1|
|Memory (System)|187.41GB (67.15GB free)|
|Process Argv|--no-xshm --no-sandbox|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|undefined|
|XDG_CURRENT_DESKTOP|undefined|
|XDG_SESSION_DESKTOP|undefined|
|XDG_SESSION_TYPE|undefined|
</details>Extensions: none
<!-- generated by issue reporter -->
Repository: angular
Issue: Ivy: Clarification of why "class" input is handled differently in template and host
Labels: area: core,core: styling bindings,state: needs more investigation,P3

# 🐞 bug report

### Affected Package
The issue is caused by package @angular/core


### Is this a regression?

Yes, likely: In Angular 9.0 (with Ivy) this bug was not present.


### Description

This issue is based on the fix for #35383 (PR: #35889).

The behaviour of how host bindings get populated into inputs changed from View Engine to Ivy. For me, it sounds logical what @mhevery wrote in https://github.com/angular/angular/issues/35383#issuecomment-590479091, stating that it is intended behaviour for `host.class` being fed into `@Input`. There's no further argumentation, except of a tiny note on further offline/internal discussions (lacking their outcome) and then, the PR chimes in w/o any further explanation of why

I also feel like it shouldn't be intended for `host : { class: 'class-name' }` to behave differently and that Ivy should've introduced this new behaviour as a breaking change (instead of fixing #35383). So, I'd like to request two things:
1. Could you clarify, why it was _fixed_? In the discussion of #35383, there is no info (except a note on internal/offline discussion).
2. Based on the above: Start the discussion of introducing a breaking change bringing back to how it has been introduced by Ivy in Angular 9 and streamline the experience.

By the way, I think of the change introduced in PR #35889 being a breaking change. Not for anyone coming from View Engine, but for everyone (like me), coming from Angular 9.0 (see **Real World Example** below).

#### Real World Example

I'm using a library catching the `class` input to get control over the applied classes (albeit not the best pattern, this is officially supported). This library has some nice icons I want to use as a remove button for Material's Chips, so I added the `matChipRemove` directive having `host { class: 'mat-chip-remove' }` (and some more stuff). In Angular 9.0, this worked perfectly fine but after upgrading to Angular 9.1 (and 10.x), it broke solely due to the update (which was a pain to debug, by the way 🤷).

---

I would've liked to start this discussion in the mentioned issue but it's locked so I thought this is the right place for it. Many thanks in advance!
Repository: flutter
Issue: Lazy sliver lists should provide some kind of warning if on any frame children have a zero width/height in the main axis
Labels: c: new feature,framework,c: API break,c: performance,f: scrolling,a: debugging,a: error message,perf: memory,perf: speed,P3,team-framework,triaged-framework

E.g. a vertical list of widgets that initially all have a height of 0 should report a warning that a seemingly lazy list is actually loading all possible slivers in the first frame because the height of each child came in as zero.
Repository: flutter
Issue: Slivers should report a warning if they take "too long" to build
Labels: c: new feature,framework,c: performance,f: scrolling,a: debugging,perf: speed,P3,team-framework,triaged-framework

Similar to https://github.com/flutter/flutter/issues/70147 but somewhat opposite.

Creating a list of slivers that do too much work is a common source of jank that may be difficult to diagnose. For example, if you have a list of slivers that all have to parse something (e.g. markdown or larg/complex SVG), you may see frames dropped as scrolling occurs because the parsing operations take more time than a frame is meant to manage.

It would be good to warn the user about this and encourage them to pre-cache expensive information, or consider using simpler items in their slivers.

Ideally, this solution would know how to scale such that if it's running on a high end/fast device, it could estimate whether frames would have been missed on slower reference hardware - e.g. a flagship Android or iPhone vs. a less powerful device.
Repository: deno
Issue: Proposal: Module Loader API
Labels: cli,suggestion,needs discussion

With ES Modules, it is effectively impossible to do "hot module reloading" of the modules, as ES Module specification is fairly strict that once the module is resolve and its two pass instantiation is done, that is the end of the road for the module and cannot be replaced.

When you are mocking/testing/etc. though, it is potentially valuable to make changes to a module and "reload" it via dynamic import.  In Node.js, they have solved this problem with an [experimental loader API](https://nodejs.org/api/esm.html#esm_experimental_loaders).  For an example of how this gets integrated to provide a mechanism for module replacements of imports that are still modules, [quibble](https://github.com/testdouble/quibble#es-modules-support) provides ESM support.  It basically creates a unique specifier for every time the module is requested to get around the challenge of ES modules being static once resolved.

This would also support solving things like #1739, which we have long wanted to do.
Repository: vscode
Issue: Ubuntu `lxc profile show default > default.yml'` on zsh fails to redirect
Labels: bug,help wanted,linux,snap

Issue Type: <b>Bug</b>

From settings select shell `/bin/zsh` or `/usr/bin/zsh`

then if in the vscode terminal, I redirect output of lxc profile I get an empty file. This is true for the snap installs of both `code` and `code-insiders`
```
% lxc profile show default > t1.yml
% wc t1.yml
0 0 0 t1.yml
```

If I do this same operation in a normal ubuntu 20.04 terminal I get the expected result:

```
% lxc profile show default > t1.yml
% wc t1.yml
 14  26 209 t1.yml
```
This file has the expected output.
```
% cat t1.yml                  
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default
used_by:
- /1.0/instances/fossa

```
whereas a simple redirect seems to work in the vscode terminal:

```
% ls > ls.txt                      
[0] % wc ls.txt                 
  28   28 1151 ls.txt
```

fails in vscode shell set to `/usr/bin/bash` too:

```
$ lxc profile show default > t1.yml
$ wc t1.yml 
> 0 0 0 t1.yml
```

I reported this on the container users forum too - 
https://discuss.linuxcontainers.org/t/lxc-redirecting-profile-into-text-file-fails-identified-as-vscode-terminal-problem/9435

VS Code version: Code - Insiders 1.52.0-insider (24b28f57be22fe3029cb17a1dd72d8d9c2d6468b, 2020-11-06T05:40:12.937Z)
OS version: Linux x64 5.4.0-52-generic snap

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Xeon(R) CPU E3-1245 v3 @ 3.40GHz (8 x 3508)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>opengl: enabled_on<br>protected_video_decode: unavailable_off<br>rasterization: disabled_software<br>skia_renderer: enabled_on<br>video_decode: unavailable_off<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|0, 0, 1|
|Memory (System)|15.42GB (0.23GB free)|
|Process Argv|. --no-sandbox --crash-reporter-id 446f8467-2185-4e65-b6f3-71361ea528a8|
|Screen Reader|no|
|VM|50%|
|DESKTOP_SESSION|ubuntu|
|XDG_CURRENT_DESKTOP|Unity|
|XDG_SESSION_DESKTOP|ubuntu|
|XDG_SESSION_TYPE|x11|
</details>Extensions: none
<!-- generated by issue reporter -->
Repository: create-react-app
Issue: TypeError: Cannot read property 'exports' of undefined function getModuleExports(moduleId) { return __webpack_require__.c[moduleId].exports; } 
Labels: stale,needs triage

Hey guys,

I've recently upgraded `create-react-app` to version 4.0.0 and got blew problem in dev environment (running `yarn start`, no error in building phase, but getting error in runtime when we launch the browser): 

![image](https://user-images.githubusercontent.com/19988985/98626366-88877f00-234c-11eb-8bd3-3f5690d5c8f4.png)

It seems that it is [react-refresh-webpack-plugin](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/245)'s issue, or something wrong in Webpack configuration, it is like `create-react-app` uses `react-refresh-webpack-plugin` ESM exports. 

I have this for `jsconfig.json` in addition:
 
```
{
  "compilerOptions": {
    "baseUrl": "./src",
    "module": "commonjs",
    "target": "es5",
    "allowJs": true
  }
}
```

Is there any workaround for this? Thanks for any information.
Repository: godot
Issue: Unreadable Visual Script's custom node UI when turned on the graph node header
Labels: bug,topic:editor,topic:visualscript

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
Godot v3.2.3-stable


**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->

- Windows 10 (64-bit) version (build) 2009 (10.0.19042).
- Intel® UHD Graphics 620 driver version 27.20.100.8935.
- GLES3


**Issue description:**
<!-- What happened, and what was expected. -->
When the **Use Graph Node Headers** option in the editor setting is turned on, the custom node header won't be readable due to the font color of the header's title that's very close to the header's background color.

I expect the header's title and the background to have a color that's distinguished from each other. Currently, it's completely unreadable, making the node header option incompatible to work with custom node.


**Steps to reproduce:**

1. Turn on the **Use Graph Node Headers** option in the editor setting.
2. Add custom node in the Visual Script editor.


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
![InkedUnreadable Custom Node with Node Header_LI](https://user-images.githubusercontent.com/1403194/98628812-2b60de80-22f6-11eb-9321-5b67d6f99c6e.jpg)