sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Gradually "warm up" shape calculation in incremental scenarios
Labels: Suggestion,In Discussion,Experimentation Needed,Rescheduled

# Background

In incremental scenarios, we need to understand the "shape" of a module to determine whether its dependencies also need to be checked; however, declaration files are expensive to generate. In cases where `--declaration` isn't on, it can be wasteful to spend time on that.

# Proposal

In some cases, it can be cheaper just to assume that a change to a module should trigger a re-check of its transitive dependencies - so we could consider the JavaScript output (or maybe even just the TypeScript input) to determine the initial shape, and then "graduate" to using the declaration files if they're referenced often enough.

- figure out the set of dependent modules. If the set of dependencies is "large", then use the `.d.ts` output as the shape; otherwise, use the `.js` output
- if a module gets changed often enough and it's using `.js` to determine shape, we switch to using its `.d.ts` output to determine shape

_Originally posted by @DanielRosenwasser in https://github.com/microsoft/TypeScript/issues/41219#issuecomment-829703912_
Repository: TypeScript
Issue: JSDoc: Infer return value of function
Labels: Bug

Issue Type: <b>Bug</b>

Typescript works:
```ts
type Data = { a: string };

function test<T>(funct: (arg: Data) => T): T {
   return funct({a: 'test'});
}

test(a => a.a);  // return type: string => works OK
```

JSDoc bug:
```ts
/** @typedef {{ a: string }} Data */

/**
 * @template T
 * @param { (arg: Data) => T } funct 
 * @returns {T}
 */
function test(funct) {
   return funct({a: 'test'});
}

test((/** @type { Data } */ a) => a.a); // return type: string => works OK
test(a => a.a);                         // return type: any => not works - BUG
```


VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:36:32.643Z)
OS version: Darwin x64 20.3.0

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|2, 2, 2|
|Memory (System)|16.00GB (0.91GB free)|
|Process Argv|--crash-reporter-id 2e37b1f3-b89a-4c4c-8add-c119edc3cc5b --crash-reporter-id 2e37b1f3-b89a-4c4c-8add-c119edc3cc5b|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (17)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-openapi|42C|4.5.0
swagger-viewer|Arj|3.0.1
bracket-pair-colorizer-2|Coe|0.2.0
vscode-simpler-icons|dav|1.6.5
vscode-eslint|dba|2.1.20
gitlens|eam|11.4.1
EditorConfig|Edi|0.16.4
json-tools|eri|1.0.2
code-runner|for|0.11.3
jsdoc|lll|1.0.3
dotenv|mik|1.0.1
prettify-json|moh|0.0.3
vscode-typescript-tslint-plugin|ms-|1.3.3
vscode-yaml|red|0.18.0
sort-lines|Tyr|1.9.0
vscode-icons|vsc|11.4.0
html-css-class-completion|Zig|1.20.0

(3 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt678:30270856
pythonvspyt602cf:30294773
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30276681
pythonvsnew554cf:30291488
pythontb:30283811
vspre833cf:30267465
pythonptprofiler:30281270
vscnewfilehidden:30294815
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553

```

</details>

<!-- generated by issue reporter -->
Repository: pytorch
Issue: nn.Module custom setattr leads very confusing behaviors
Labels: module: nn,triaged,enhancement

## 🐛 Bug

Because that module/buffer/param is never actually set as object attribute, they never overwrite any existing attributes with the same name s.t. the custom `__getattr__` never gets triggered. This leads to extremely confusing behaviors like this: 

```py
In [11]:
    ...: class Net(torch.nn.Module):
    ...:     x = None  # placeholder
    ...:
    ...:     def __init__(self):
    ...:         super().__init__()
    ...:
    ...:         self.x = torch.nn.Linear(2, 3)
    ...:         print(self.x)
    ...:
    ...:         children = list(self.children())
    ...:         assert len(children) == 1 and isinstance(children[0], torch.nn.Linear)
    ...:
    ...:         print(self.x)
    ...:

In [12]:

In [12]: Net()
None
None
Out[12]:
Net(
  (x): Linear(in_features=2, out_features=3, bias=True)
)
```

This comes up in real code where I have an abstract property in base class (enforced by `abc`) and I want to overwrite it with a module in subclass `__init__`, and the placeholder thing is necessary to make `abc` happy.

cc @albanD @mruberry @jbschlosser @ezyang
Repository: TypeScript
Issue: Intellisense not surfacing all options for overloaded TS function argument with generic
Labels: Bug,Help Wanted,Domain: Completion Lists

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
- VS Code Version: 1.55.2
- OS Version: macOS 11.3

Steps to Reproduce:

1. See code sample

<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->

For example code:

```ts
interface Options {
  authenticationType: 'patient' | 'provider' | 'none'
}

function wrap<TBody = any>(options: Options & {authenticationType: 'provider'}, apiHandler: () => {}): () => {}
function wrap<TBody = any>(options: Options & {authenticationType: 'patient'}, apiHandler: () => {}): () => {}
function wrap<TBody = any>(options: Options & {authenticationType: 'none'}, apiHandler: () => {}): () => {}
function wrap<TBody = any>(options: Options, apiHandler: () => {}): {} {
  return apiHandler()
}
```

When invoking `wrap()` intellisense only surfaces the very first overload:

<img width="953" alt="Screen Shot 2021-04-30 at 5 23 43 PM" src="https://user-images.githubusercontent.com/570070/116755720-d9f9f800-a9d8-11eb-92a5-ace09b3e56cf.png">

However, when I remove the generic from each overload, all values of `Options` are displayed:

<img width="897" alt="Screen Shot 2021-04-30 at 5 23 20 PM" src="https://user-images.githubusercontent.com/570070/116755683-c77fbe80-a9d8-11eb-9b27-fe7fb0b907aa.png">
Repository: flutter
Issue: ClipRect does not clip a sized child Column
Labels: framework,f: material design,has reproducible steps,found in release: 2.10,found in release: 2.13,team-design,triaged-design

This issue has been [reported](https://github.com/flutter/flutter/issues/78325) [before](https://github.com/flutter/flutter/issues/29357) but falsely declared as "solved" through a workaround, and timed out in the other instance.

I created a [DartPad example](https://dartpad.dev/95967e6fe54a5ceee387f4da44e84a13?null_safety=true) of the problem. The column width ignores the available space given by its parent, instead using the width of the clipper's parent.

<details>
<summary>$ flutter doctor -v</summary>

```
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version
    10.0.19042.928], locale en-US)
    • Flutter version 2.0.5 at C:\flutter
    • Framework revision adc687823a (2 weeks ago), 2021-04-16
      09:40:20 -0700
    • Engine revision b09f014e96
    • Dart version 2.12.3

[√] Android toolchain - develop for Android devices (Android SDK
    version 30.0.3)
    • Android SDK at C:\Users\-\AppData\Local\Android\Sdk\
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\-\AppData\Local\Android\Sdk\
    • ANDROID_SDK_ROOT = C:\Users\-\AppData\Local\Android\Sdk\
    • Java binary at: C:\Program Files\Android\Android
      Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files
      (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019
    16.8.3)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual
      Studio\2019\Community
    • Visual Studio Community 2019 version 16.8.30804.86
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.1
    • Flutter plugin version 55.1.5
    • Dart plugin version 211.6693.108

[√] VS Code (version 1.55.2)
    • VS Code at C:\Users\-\AppData\Local\Programs\Microsoft VS
      Code
    • Flutter extension version 3.1.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft
      Windows [Version 10.0.19042.928]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome
      90.0.4430.93
    • Edge (web)        • edge    • web-javascript • Microsoft Edge
      90.0.818.49

• No issues found!
```
</details>
Repository: pytorch
Issue: torch 1.8.1+cuda crashes when setting breakpoints.
Labels: triaged

I do apologise if this is a colab issue and not a pytorch issue, but I can run the following in my laptop (torch 1.4.0).
```python
import torch
import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self, channels):
        super().__init__()
        self.cnns = nn.ModuleList(
            [nn.Conv2d(channel_in, channel_out, kernel_size=3, stride=2)
            for channel_in, channel_out in zip(channels[:-1], channels[1:])]
        )
        self.top = nn.Linear(40*2*2, 10)

    def forward(self, x):
        breakpoint()
        for layer in self.cnns:
            x = F.relu(layer(x))

        return self.top(x.reshape(len(x), -1))

model = Model([1, 10, 20, 40])
model(torch.randn(2, 1, 28, 28)).shape # outputs (2, 10)
```

Here is [a colab notebook](https://colab.research.google.com/drive/1Dqp3l7XlY28CNAIgLQ0vI4-L2HhoWaNf?usp=sharing) which crashes. I'm not using GPUs but the version states that it is `1.8.1+cu101`.
Repository: TypeScript
Issue: Missing IntelliSense for optional property from array type constraints
Labels: Suggestion,Domain: Completion Lists,Experience Enhancement

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->

searched a related issue: https://github.com/microsoft/TypeScript/issues/30058

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?strict=true&ssl=1&ssc=1&pln=40&pc=4#code/C4TwDgpgBAWnUF4oG8BQUNQEYEMBOA-AFxQB2ArgLZYR4A06mAZgPYskDOweAlqQOaoAvqlRNypAMbAeLUlGAQuAHgAqUCAA9FpACYdYcAHwAKSSVUBKFKJFiJ02fMVcAgnjxqN2iHoNwYAG0AXVNzKCsbYVEAehioSRwOaABGIlQXYBM0TCg4qFYWKH4WYCg+RQAbSp5k0mTGDHzcPGLS8tIqmrqGoUtY+MTkqAAmdMzsxoK2EgByAGZF2YZc5vw2soqIatrfXv7UfKHoefGlYHc8E0CpnNzmGahZlJflqdX4lo2yIq2dnogUyEDGCByOSWgABYzm4PNdbu9MPlCt8-t09oD7kjPusSptOtt0fVMZgRKCANxAA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type ZZZ = {
    bar?: number,
    foo: string
}

function test<T extends ZZZ>(c: T) {

}

function testArr<T extends ZZZ[]>(c: T) {

}

// case 1:
test({
    // foo got intellisense
    // bar got intellisense
})

// case 2:
test({
    foo: '333',
    // bar got intellisense
})

// case 3:
testArr([
    {
        foo: '111',
        // bar got no intellisense
    },
])

// case 4:
testArr([
    {
        // foo got intellisense
        // bar got intellisense
    }
]);
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->

case 3 missing the IntelliSense for option property `bar`

### 🙂 Expected behavior

show completion for property `bar`
<!-- What you expected to happen instead, and why -->
Repository: godot
Issue: VisualScriptCustomNode color default value not updating
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. -->
3.3.0

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Win10 GLES3

**Issue description:**
<!-- What happened, and what was expected. -->
The ColorPicker for default values used by VisualScriptCustomNode  dues not update its value
I expect it to work like in VisualScriptPropertySet

**Steps to reproduce:**
see custom_node.gd in Minimal reproduction project

https://user-images.githubusercontent.com/20573784/116782864-da9f9680-aa8b-11eb-885f-fac1d0005a97.mov

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->

[error VS custom color.zip](https://github.com/godotengine/godot/files/6409562/error.VS.custom.color.zip)
Repository: go
Issue: image/jpeg: unexpected EOF when decoding image file
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.3 windows/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
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\***\AppData\Local\go-build
set GOENV=C:\Users\***\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\***\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\***\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.3
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\***\AppData\Local\Temp\go-build2404133136=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?
I work with a web platform, where multiple users can post their content, including images. We're moving from legacy solution based on PHP and re-implementing it in Go. One of the functionality required for a platform is resizing/cropping images. We used `github.com/disintegration/imaging` for that and encountered this problem with that library originally. What happens is that for some particular `jpeg` images, there is an error when you try to decode it using standard library.

Please note, that Firefox/Chrome/etc browsers open and display that image correctly, as well as `imagick` (part of legacy solution) does resize/cropping of it without any problems. With `image/jpeg` I'm getting `unexpected EOF` when trying to decode an image.

Here is a sample code to reproduce an error:
```go
package main

import (
	"image"
	_ "image/jpeg"
	"os"
)

func main() {
	f, err := os.Open("1.jpg")
	if err != nil {
		panic(err)
	}
	defer f.Close()

	_, _, err = image.Decode(f)
	if err != nil {
		panic(err)
	}
}

```
Output:
```
panic: unexpected EOF
...
```
Archived image:
[1.zip](https://github.com/golang/go/files/6409698/1.zip)



### What did you expect to see?
No panic.


### What did you see instead?
Panic.
Repository: godot
Issue: AudioStreamRandomPitch doesn't play correct sounds when instanced fast
Labels: bug,topic:audio

**Godot version:** 3.3


**OS/device including version:** Windows 7

**Issue description:**
When instancing AudioStreamPlayer3D that use AudioStreamRandomPitch as their stream, and then trying to assign different audio streams to the `AudioStreamRandomPitch.stream` fields, they play the same sound when instanced within the same function call.

I am using set-up similar to the minimal reproduction project one in a bigger project. It never caused any issues when the nodes were instanced in separate function calls. When directly changing the `AudioStreamPlayer3D.stream` property to an AudioStream, this bug doesn't occur.

**Steps to reproduce:**
Open the minimal reproduction project and run it. You should hear only one sound, but played twice (sounds a bit like a delay effect).

To see that the instances behave as intended when instanced slowly, do this: In `main.gd`, comment out one of the `instance_audio` function calls and restart the program to hear the singular sound. You can do the same with both sounds.

To see that the bug doesn't occur when changing the `AudioStreamPlayer3D.stream` property directly, uncomment the only commented line in `AudioPlayer.gd` and comment out the one above it, then restart the program .

**Minimal reproduction project:**
[MinimalReproductionProject.zip](https://github.com/godotengine/godot/files/6410071/MinimalReproductionProject.zip)
Repository: go
Issue: go/types, go/constant: improve documentation on constant.Kind and relationship to concrete types
Labels: Documentation,NeedsInvestigation

ISTM that go/types and go/constant don't currently do a good job at explaining which constant.Kind can be encountered in which contexts. For example, before seeing #43891 I wasn't aware that a floating point constant may have Kind() == Int.

And while that issue explains that go/constant may use a more efficient representation, it doesn't mention if it may use a _less efficient_ representation, especially in relationship with the type checker. For example, in the following example

```
var foo func(int)
const k = 4.0
_ = 1 << k
foo(k)
```

it is not clear to me whether the types.TypeAndValue for the ast.Ident `k` as used in the bit shift and function call are guaranteed to be a constant.Int or not. It currently seems to be, and existing code in `vet` doesn't defensively use ToInt before using Uint64Val

Summarizing, I'd like to see documentation that at least
- mentions that constant kinds aren't directly related to concrete types
- explains which simplifying guarantees go/types makes, if any
- states how defensively code has to be written in practice

/cc @griesemer
Repository: godot
Issue: SkeletonIK system in version 3.3 is not working correctly.
Labels: bug,topic:animation

**1.SkeletonIK system in version 3.3 is not working correctly.**
![IK_____________1](https://user-images.githubusercontent.com/75214342/116794483-ab6a4300-aae6-11eb-8979-cf865b1f3885.png)

**2. Animation works wrong scale.**                   Is it possible to get around this?
![Scale________1](https://user-images.githubusercontent.com/75214342/116794487-b1f8ba80-aae6-11eb-972c-211b9ed9569c.png)

**Godot and blender project:**
[Ik_test.zip](https://github.com/godotengine/godot/files/6410270/Ik_test.zip)
Repository: node
Issue: gcc-11 builds with --enable-lto cause test segfaults + runtime errors
Labels: build

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: 16.0.0, 14.16.1, possibly others
* **Platform**: Linux

### What steps will reproduce the bug?

1. Switch active compiler to gcc-11
2. Build node with --enable-lto
3a. To reproduce test segfault, run _cctest_
3b. To reproduce runtime errors, use this build of node to e.g. compile a recent version of Firefox

### How often does it reproduce? Is there a required condition?

Every time.

### What is the expected behavior?

Node passes tests and runs correctly.

### What do you see instead?

See e.g. https://bugs.gentoo.org/787158

### Additional information

Enabling LTO for the same node versions works fine with gcc-10.
Repository: godot
Issue: Window size rectangle in the editor does not take shrink into account
Labels: bug,topic:editor,topic:2d

**Godot version:**
3.3

**OS/device including version:**
Windows 10

**Issue description:**
In the editor, the rectangle representing the window size does not take "shrink" into account.

For instance, a project with windows settings 1024x600 and shrink=2, resulting with 512x300 effective pixels in the game window, will still have a 1024x600 root rectangle in the editor. This makes the scale of objects very different in game from in editor, making it hard to work on UI layouts.

**Steps to reproduce:**
1. Create a new project with root node Control
2. In projet settings>Window, check size is 1024x600 and set shrink=4
3. See that size of the root rect is still 1024x600
4. (opt) Add a label with text "hello world" and set it's layout to full rect, and compare the difference between editor (text is very small compared to the root rect) and in game (text is big and pixelated)

**Minimal reproduction project:**
(see steps to reproduce)