sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: clang format on OS X ssl verification failure
Labels: module: lint,triaged

```
$ python3 tools/clang_format_all.py 
Downloading clang-format to /Users/ezyang/Dev/pytorch-tmp/.clang-format-bin
https://oss-clang-format.s3.us-east-2.amazonaws.com/mac/clang-format-mojave
Error downloading /Users/ezyang/Dev/pytorch-tmp/.clang-format-bin/clang-format: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1097)>
```

This affected both the stock python2 and python3 binaries on my system
Repository: TypeScript
Issue: Date.prototype.toJSON has incorrect return type
Labels: Suggestion,Awaiting More Feedback

# Bug Report

`Date.prototype.toJSON()` can return a `string` or `null` according to the spec https://tc39.es/ecma262/#sec-date.prototype.tolocaledatestring. For example `new Date("").toJSON()` returns `null`.

Currently, the return type of `toJSON()` is specified as a string:
https://github.com/microsoft/TypeScript/blob/131875bb849c0a9c56c26d09881453aace0cbfed/lib/lib.es5.d.ts#L879

### 🕗 Version & Regression Information

Typescript 4.2.3

### 💻 Code

```ts
new Date("").toJSON().slice(0,5);
```
produces an error at runtime since `new Date("").toJSON()` is `null`, but doesn't produce a typescript error because `new Date("").toJSON()` is assumed to be string.

### 🙂 Expected behavior

TypeScript should warn about the potentially `null` value when an arbitrary string is passed into `Date`. However, if the `Date` object can be guaranteed to be valid (for example `new Date()`), the return type of `toJSON()` should be `string`.
Repository: go
Issue: cmd/internal/obj/x86: using AH in instruction with REX prefix substitutes SPL without an error
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.8 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Didn't check.

### What operating system and processor architecture are you using (`go env`)?

windows, amd64

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

Accessing obj via package [here](https://github.com/twitchyliquid64/golang-asm). 

Repro - 

```golang
package main

import (
	asm "github.com/twitchyliquid64/golang-asm"
	"github.com/twitchyliquid64/golang-asm/obj"
	"github.com/twitchyliquid64/golang-asm/obj/x86"
	"log"
)

func main() {
	b, err := asm.NewBuilder("amd64", 64)
	if err != nil {
		log.Fatal(err)
	}

	p := b.NewProg()
	p.As = x86.AMOVB
	p.To.Type = obj.TYPE_REG
	p.To.Reg = x86.REG_AH
	p.From.Type = obj.TYPE_MEM
	p.From.Reg = x86.REG_R13
	p.From.Offset = 2 * 8

	b.AddInstruction(p)

	log.Printf("%x", b.Assemble())
}
```

```
λ go run assemble.go
2021/04/11 18:21:36 418a6510
```

### What did you expect to see?

An error.

### What did you see instead?

```
0:  41 8a 65 10             mov    spl,BYTE PTR [r13+0x10] 
```
Repository: godot
Issue: RigidBody2D bounces/glitches periodically with torque against moving KinematicBody2D
Labels: bug,topic:physics

**Godot version:**
3.2.3
3.3 RC 8

**OS/device including version:**
Ubuntu 20.10

**Issue description:**
This is more visible the higher the linear and angular dampening

At 50 linear/angular damp:
![bug](https://user-images.githubusercontent.com/14253836/114329506-243c3780-9b05-11eb-99af-b63f209046cb.gif)


**Steps to reproduce:**
1. Run the MRP

**Minimal reproduction project:**
[GodotTest.zip](https://github.com/godotengine/godot/files/6293270/GodotTest.zip)
Repository: TypeScript
Issue: Allow composite values to be used in type predicates
Labels: Suggestion,Awaiting More Feedback

# Allow composite values to be used in type predicates

## 🔍 Search Terms

Is, composite type, complex type, composite value, complex value, type predicate, type guard

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [X] This wouldn’t be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn’t change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn’t a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [X] This feature would agree with the rest of [TypeScript’s Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

Type predicates allow you to define functions that can tell the TypeScript compiler if a parameter is of a certain type.  
I suggest that this be extended to allow type predicates to narrow the type of composite objects involving parameters.  
That is, the left-hand-side of `is` types should be allowed to include object literals.

## 📃 Example

Say you have a type that involves a subset of another type:
```ts
type MyType = {property1: "static text", property2: "Hello" | "World"};
```
A type predicate for this would always require passing in the `property1` property, even though it’s unnecessary.  
Now, you can create a type predicate that only takes the value of `property2`, but still gurantees the result type:
```ts
function foo(text: string): {property1: "static text", property2: text} is MyType {
    return ["Hello", "World"].includes(text);
};
```
---

I’ve run into the problem of being unable to do this while developing my website.  
I had a tagged union:
```ts
type A = {t: "A", value: "X" | "Y"};
type B = {t: "B", value: string};
type U = A | B;
```
And I wanted to get a value of type `A` from user input, but default back to a `B` type if the value wasn’t 
To do this, I hoped to be able to do this:
```ts
function zit(x: string): {t: "A", value: x} is A {
    return ["X", "Y"].includes(x);
};
function gob(x: string): U {
    return zit(x) ? {t: "A", value: x} : {t: "B", value: x};
};
```
Repository: godot
Issue: Changing the background mode to Canvas on the Default Enviroment produces line glitches
Labels: bug,topic:rendering,confirmed,topic:3d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
Maybe related to this [issue](https://github.com/godotengine/godot/issues/46179)

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
Godot 3.3 RC 8 (Mono version)

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
OS: EndeavourOS (Arch Linux based)
GPU: Nvidia GTX 1050 Ti
Backend: OpenGL ES 3

**Issue description:**
<!-- What happened, and what was expected. -->
When changing the background mode to canvas, the grid and axis lines glitch when navigating the 3d viewport, This does not happen when adding a World Environment Node and changing it to canvas mode. I don't see any errors on the output console.

**Steps to reproduce:**
1 - Create an empty project
2 - Double click on default_env.tres
3 - On the Inspector Panel, go to Background -> Mode, choose Canvas 
4 - Navigate the 3d viewport
5 - Result:

![image](https://user-images.githubusercontent.com/53798244/114336031-50f34d80-9b0b-11eb-88e4-0e50efb2913c.png)

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
The project does not have any code, and only a empty scene. The glitch happens on the editor no need to run the game
[BackgroundTest.zip](https://github.com/godotengine/godot/files/6293651/BackgroundTest.zip)
Repository: godot
Issue: Errors parsing glTF files from glTF-Sample-Models, and SceneTree dock fails to display
Labels: bug,needs testing,topic:import

<!-- 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 3.3.rc8.official

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
OS: Windows 10 Home 20H2 VER 19042.906
GPU: GTX 960
GeForce Game Ready Driver: 465.89

**Issue description:**
<!-- What happened, and what was expected. -->
1. So many ERR_PARSE_ERROR message
ERROR: _parse_glb: Condition "chunk_type != 0x4E4F534A" is true. Returned: ERR_PARSE_ERROR
   At: editor/import/editor_scene_importer_gltf.cpp:98

2.  SceneTree can't display properly
![image](https://user-images.githubusercontent.com/73905273/114339298-6c9c3980-9b87-11eb-9111-b0938f8c33b4.png)


**Steps to reproduce:**
1. download gltf test models from https://github.com/KhronosGroup/glTF-Sample-Models
2. create a project in Godot 3.3.rc8.official
3. extract glTF-Sample-Models-master.zip in to project folder
4. wait for editor to imports models
5. open FlightHelmet/gltf/FlightHelmet.gltf

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Too huge to upload(4.34GB), just recreate by the steps above please
Repository: go
Issue: encoding/json: cannot unmarshal custom interface value
Labels: NeedsDecision

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.3 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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.3"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/user/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2204759132=/tmp/go-build -gno-record-gcc-switches"

</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
https://play.golang.org/p/VMWbHeo54sj
```go
p := private(*new(wrap))
err := json.Unmarshal([]byte("1"), &p)
fmt.Println(p, err)

p = new(wrap)
err = json.Unmarshal([]byte("1"), p)
fmt.Println(*p.(*wrap), err)

i := (interface{})(*new(wrap))
err = json.Unmarshal([]byte("1"), &i)
fmt.Println(i, err)

i = new(wrap)
err = json.Unmarshal([]byte("1"), i)
fmt.Println(*i.(*wrap), err)
```


### What did you expect to see?
Any interface should be able to be assignable:
```
1 <nil>
1 <nil>
1 <nil>
1 <nil>
```


### What did you see instead?
Instead it appears that `interface{}` is special, and unless `main.private` implements `json.Unmarshaler` it will `error` at runtime:
```
0 json: cannot unmarshal number into Go value of type main.private
1 <nil>
1 <nil>
1 <nil>
```
This restriction does not seem meaningful, and I could not find it documented in source why this was enforced. Can we not mutate the pointed value inside a provided interface regardless of type?
Repository: vscode
Issue: WebGL is slow in snap package
Labels: bug,linux,perf,snap

<!-- ⚠️⚠️ 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.1, 1.56.0-insider
- OS Version: Ubuntu 20.10

I often need to print a table (or data frame) in R in the integrated terminal via remote ssh like the following. In previous versions, the printing is almost as fast as in the native console.

![image](https://user-images.githubusercontent.com/4662568/114352681-b80e1200-9b9e-11eb-834b-5c4d0c622dcc.png)

In the recent release, the terminal becomes quite laggy to print such table via remote ssh in the integrated terminal. It looks like the printing is sent line by line. If I print the table in a tmux window, it becomes much worse, i.e. printing such a table which previously took less than 0.5s now takes more than 20s while in the middle the remote ssh connection becomes unstable sometimes.

To narrow down the problem, I tried the following:

1. Locally, printing the table in and out of tmux is very fast.
2. In a local vscode, open the integrated terminal and ssh to the server, start R, and print `mtcars`. It is very fast too but sometimes it becomes slow in tmux.
3. Use remote ssh to connect to the server. Open the integrated terminal and start R and print `mtcars`. It is fast. But in tmux to do the same, it is very laggy, i.e. the printing is almost done line by line.

To reproduce my steps, run

```sh
sudo apt install r-base
tmux
Rscript -e 'print(mtcars)'
```

However, put the output into a text file and `cat` the file, it is not laggy.

```sh
Rscript -e 'print(mtcars)' > mtcars.txt
cat mtcars.txt
```

The typing in the integrated terminal is laggy too. In current release (1.55.1), I need to switch to `"terminal.integrated.rendererType": "canvas"` so that typing is no longer laggy. In current insider, the setting is gone, and I have to use `"terminal.integrated.gpuAcceleration": "off"` and the laggy typing is fixed. However, in both cases, while the laggy typing is fixed, the laggy printing via remote ssh still persists.

<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 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. -->
Repository: create-react-app
Issue: test.concurrent.each run sequentially with react-scripts
Labels: needs triage,issue: bug report

### Describe the bug

I have a simple test that uses `test.concurrent()` and `test.concurrent.each()`:
```
function sleep(ms) {
  return new Promise((resolve) => setTimeout(resolve, ms));
}

async function asyncTest(id) {
  console.log(new Date(), 'starting', id);
  await sleep(2000 * (0.5 + Math.random()));
  console.log(new Date(), 'finished', id);
}

describe('each', () => {
  test.concurrent.each([1, 2, 3])('case %i', async (i) => asyncTest(i));
});

describe('single', () => {
  test.concurrent('case 4', async () => asyncTest(4));
  test.concurrent('case 5', async () => asyncTest(5));
  test.concurrent('case 6', async () => asyncTest(6));
});
```
When I run it with jest, it works as expected; cases are run in parallel:
```
/app # jest concurrent.test 2> /dev/null | awk '{$1=$1};1' | grep 2021-04
2021-04-12T07:01:41.426Z starting 1
2021-04-12T07:01:41.437Z starting 2
2021-04-12T07:01:41.439Z starting 3
2021-04-12T07:01:41.440Z starting 4
2021-04-12T07:01:41.442Z starting 5
2021-04-12T07:01:42.540Z finished 1
2021-04-12T07:01:42.543Z starting 6
2021-04-12T07:01:43.046Z finished 2
2021-04-12T07:01:43.536Z finished 5
2021-04-12T07:01:44.047Z finished 3
2021-04-12T07:01:44.344Z finished 4
2021-04-12T07:01:44.659Z finished 6
```
but when I run it with `react-scripts test`, the cases in `test.concurrent.each()` are run sequentially:
```
/app # react-scripts test concurrent.test 2> /dev/null | awk '{$1=$1};1' | grep 2021-04
2021-04-12T07:01:23.712Z starting 4
2021-04-12T07:01:23.728Z starting 5
2021-04-12T07:01:23.728Z starting 6
2021-04-12T07:01:23.730Z starting 1
2021-04-12T07:01:24.930Z finished 1
2021-04-12T07:01:24.937Z starting 2
2021-04-12T07:01:25.605Z finished 4
2021-04-12T07:01:25.992Z finished 6
2021-04-12T07:01:26.556Z finished 5
2021-04-12T07:01:27.218Z finished 2
2021-04-12T07:01:27.220Z starting 3
2021-04-12T07:01:28.939Z finished 3
```

### Did you try recovering your dependencies?
Yes,
```
/app # yarn --version
1.22.
```

### Environment

```
/app # npx create-react-app --info
npx: installed 67 in 4.882s

Environment Info:

  current version of create-react-app: 4.0.3
  running from /root/.npm/_npx/553/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Alpine Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  Binaries:
    Node: 14.16.0 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^16.12.0 => 16.14.0 
    react-dom: ^16.12.0 => 16.14.0 
    react-scripts: 4.0.0 => 4.0.0 
  npmGlobalPackages:
    create-react-app: Not Found
```
(Running inside docker container)
Repository: pytorch
Issue: torch.load is very slow with gzip.open
Labels: module: serialization,triaged,has workaround

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

model.pth.gz is about 160MB.

I found that `torch.load` is very slow if it load from gzip directly 
```python
import gzip

import torch


with gzip.open('model.pth.gz', 'rb') as f:
    model_weights = torch.load(f)
```

but got about 5~7x time faster if I put it in BytesIO first 
```python
import io
import gzip

import torch


with gzip.open('model.pth.gz', 'rb') as f:
    x = io.BytesIO(f.read())
    model_weights = torch.load(x)
```

The result
```bash
# directly
about 21 seconds
# with BytesIO
about 3 seconds
```

## To Reproduce

Steps to reproduce the behavior:

See above.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
The execution time of these two methods should be competitive.

## Environment
PyTorch version: 1.7.1
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce GTX 1080 Ti
Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.1.1
/usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.7.1
[pip3] torchvision==0.8.2
[conda] Could not collect

## Additional context

<!-- Add any other context about the problem here. -->


cc @mruberry
Repository: pytorch
Issue: Request setNumThreads API for Java
Labels: enhancement,oncall: mobile

## 🚀 Feature
The number of threads affects performance greatly. API setNumThreads is already available for Android.

Is it possible to port it to Java API?

## Motivation

Want to tune the number of threads for performance.

## Pitch

Make API setNumThreads work in Java API.

## 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: rust
Issue: Wrong span of `Path` if `ModSep` is inserted by proc macro
Labels: T-compiler,C-bug,A-proc-macros

I tried this code:

```rust
// macros/src/lib.rs
use proc_macro::TokenStream;
use quote::quote;
use syn::parse_macro_input;

#[proc_macro_derive(use_self)]
pub fn use_self(input: TokenStream) -> TokenStream {
    let item: syn::ItemEnum = parse_macro_input!(input);
    let ident = item.ident;
    let var0 = item.variants[0].ident.clone();
    TokenStream::from(quote! {
        #[automatically_derived]
        impl #ident {
            fn foo() -> Self {
                #ident::#var0
            }
        }
    })
}

// src/lib.rs
use macros::use_self;
#[derive(use_self)]
pub enum Direction {
    East,
}
```

Currently, the `Span::ctxt()` of `Direction::East` in the expansion is equal to `SyntaxCtxt::root()`. But this is obviously wrong because `::` is inserted by the macro.

This would be because the span of `::` is ignored in https://github.com/rust-lang/rust/blob/d68f7a2f50958d632ef8dc79212481e4f183ed36/compiler/rustc_parse/src/parser/path.rs#L149-L157
Repository: create-react-app
Issue: tsconfig compilerOptions paths alias config not working
Labels: stale,needs triage

there is a repo to recurrent this problem:
https://github.com/NoTalk-ly/create-react-app-path-alias-test
or
https://codesandbox.io/s/dry-snow-sfo15?file=/src/index.tsx.

how can I get the  **@src** path alias work ?