sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Split up and reorganize RPC tests
Labels: oncall: distributed,triaged,better-engineering,module: rpc

## Issue description

Right now all RPC tests are in https://github.com/pytorch/pytorch/blob/master/torch/testing/_internal/distributed/rpc/rpc_test.py which is a 6500+ line file containing tests for `CudaRpcTest`, `FaultyAgentRpcTest`, `RpcTest`, `RpcTestCommon`, `TensorPipeAgentRpcTest`, `TensorPipeAgentCudaRpcTest`. These classes are then imported by various files such as https://github.com/pytorch/pytorch/blob/master/torch/testing/_internal/distributed/rpc_utils.py. It would be helpful to separate the tests so it is easier to know what you are adding to. (I encountered this when accidentally adding to RpcTest and the test began to be run internally which I did not want)





cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501 @jjlilley @mrzzd
Repository: rust
Issue: Refutable slice pattern with let produces a possibly misleading diagnostic for &[T; N] and a much better diagnostic with &[T]
Labels: A-diagnostics,T-compiler,A-slice-patterns,D-newcomer-roadblock,D-terse

I just saw someone write this code:
```rust
fn main() {
    let x = &[];
    let Some([val,..]) = Some(x);
}
```
which produces this diagnostic:
```
error[E0528]: pattern requires at least 1 element but array has 0
 --> src/main.rs:3:14
  |
3 |     let Some([val,..]) = Some(x);
  |              ^^^^^^^^ pattern cannot match array of 0 elements
```
and they then used this message to misunderstand the implications of slice patterns, perhaps thinking that this code would somehow panic at runtime. Changing the type of `x` to a slice like so:
```rust
fn main() {
    let x: &[u8] = &[];
    let Some([val,..]) = Some(x);
}
```
produces a better diagnostic which mentions the much deeper problem with this construction: The pattern is refutable on two accounts (the `Option` and the slice length). The diagnostic only mentions one, but I'd still prefer to see this in the former case:
```
error[E0005]: refutable pattern in local binding: `None` not covered
   --> src/main.rs:3:9
    |
3   |     let Some([val,..]) = Some(x);
    |         ^^^^^^^^^^^^^^ pattern `None` not covered
    |
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
note: `Option<&[u8]>` defined here
    = note: the matched value is of type `Option<&[u8]>`
help: you might want to use `if let` to ignore the variant that isn't matched
    |
3   |     let val = if let Some([val,..]) = Some(x) { val } else { todo!() };
    |     ++++++++++++                              ++++++++++++++++++++++++
```

---
```
rustc 1.61.0 (fe5b13d68 2022-05-18)
```
Repository: TypeScript
Issue: Missing duplicate declaration error on "export import name = ..." with "const name = ..." in scope
Labels: Bug

# Bug Report

### 🔎 Search Terms

export import duplicate declaration

### 🕗 Version & Regression Information

- This is the behavior in every version I tried.

### ⏯ Playground Link

[Playground Link](https://www.typescriptlang.org/play?target=99&module=1#code/HYQwtgpgzgDiDGEAEAxA9mgdAIRAJyQG8BYAKCQqQgA8Y08AXJAMwFdh4GBLNYJAIxAAvABQBKImUrSkeCA1Z4+AIkFDlAbimUAvmT2kyNOoyRcwJpmqQBeVBhz5MarYdIB6d0gCqHNGEhgJgYACy4oJAAbLmBkEGAAEyQoCGQAdxCQJkyYGAhgCJikUOQIMC4GBggkgCkAZUwyTyR4XigrYVskAEYAJgBmABZXMlaCtEiITEi0AHMRNXExDSA)

### 💻 Code

```ts
namespace Foo.Bar {
    export function baz() {
        return "baz";
    }
}

export import baz = Foo.Bar.baz;

const baz = 1234;

console.log(baz());
```

### 🙁 Actual behavior

No "duplicate" error on `baz`.

### 🙂 Expected behavior

An error telling me that "baz" is a duplicated symbol.

I'm not 100% certain that this is a "correct" error, though; the code is "legal" in the sense that there's effectively a secret scope in between the global scope and the module scope where you can plop things onto `module.exports` and use them, where your uses are turned into `exports.baz` without declaring a local variable. Maybe we should declare a local variable and not refer to `exports`? Maybe not?
Repository: godot
Issue: WebGL glGetBufferSubData warning
Labels: bug,platform:web,topic:rendering

### Godot version

3.5 rc 2

### System information

Intel Graphics 400, Linux, Firefox, GLES3

### Issue description

The below warning is printed to the console when running certain scenes in the WebGL2 renderer.
![Clipboard - May 25, 2022 2_27 PM](https://user-images.githubusercontent.com/16521339/170558390-a6acc8a3-ee82-406b-bf2b-51ba357c4a5e.png)

I beleive that particles are responsible for this.

In any case, It appears the issue comes from our OpenGL Buffer usage. We typically use ``*_draw`` hints and ``*_copy`` hints when creating Buffer objects. On desktop this is perfectly allowed as the hints are just hints. On the web, ANGLE is very strict about hints and appears to be telling us that we are causing a pipeline stall by reading from a buffer that was not created with a ``*_read`` hint. 

To resolve this issue, we likely need to create a staging buffer each time that we use ``glGetBufferSubData``, copy the data to the staging buffer and then copy the data to the CPU.

### Steps to reproduce

Run the Web editor and inspect the console output

### Minimal reproduction project

_No response_
Repository: flutter
Issue: Updated dimension in .ci.yaml doesn't propagate to task when re-run
Labels: team-infra,P2,triaged-infra

Example PR: https://github.com/flutter/flutter/pull/104727

The dimension change populated for first try: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_ios%20hot_mode_dev_cycle_macos_target__benchmark/1566/overview
But not in the retry: https://ci.chromium.org/p/flutter/builders/try/Mac_ios%20hot_mode_dev_cycle_macos_target__benchmark/1571 

Related issue for properties: https://github.com/flutter/flutter/issues/101715
Repository: TypeScript
Issue: Improve experience for .cts/.cjs files in inferred projects
Labels: Suggestion,In Discussion,Domain: Node ESM

In https://github.com/microsoft/TypeScript/issues/46698, we updated VS Code’s default `module` setting for inferred projects to be `esnext`. Now that we have `.cts` and `.cjs` files floating around, we ideally ought to allow the former to use import/export assignment syntax, and forbid both from using `import.meta`. Now that `--module nodenext` is out, that may be a better default that gets us most or all of the way there.

(Note that I’m not suggesting a change to the default `--moduleResolution` for inferred projects which is still `node`. IIRC, we may need changes to set the `impliedNodeFormat` of `.cts`/`.cjs` files even when `moduleResolution` is not one of the new modes, or we may need some other strategy to just silence some of these errors in `.cts` files under `--module esnext`.)
Repository: rust
Issue: Presence of type wildcard affects type inference in async
Labels: C-enhancement,A-diagnostics,T-compiler,A-inference

I've discovered code which compiles differently for `Foo::Bar` and `Foo::<_>::Bar` when used in an async context.

@ezrosent produced [this minimization](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5daa37cb9639d91491511571627b0f87). The core of the repro is:

```rust
async fn x() -> Result<usize> {
    let x = once(async { Result::Ok(3) }); // NOTE: This `Result` type is `anyhow::Result`
    let results = x.collect::<Vec<_>>().await;
    Result::Ok(*results.first().and_then(|x| x.as_ref().ok()).unwrap())
}
```

...which produces this error message:

```rust
  error[E0698]: type inside `async fn` body must be known in this context
 --> src/main.rs:7:26
  |
7 |     let x = once(async { Result::Ok(3) });
  |                          ^^^^^^ cannot infer type for type parameter `E` declared on the type alias `Result`
  |
note: the type is part of the `async fn` body because of this `await`
 --> src/main.rs:8:40
  |
8 |     let results = x.collect::<Vec<_>>().await;
  |                                        ^^^^^^
*/
```

Replacing `Result::Ok(3)` with `Result::<_>::Ok(3)` causes the code to compile.

I'm not sure if it's a bug that adding a type wildcard causes this to compile. If it is, then consider this a bug report 😃  If it's not, then the compiler error is pretty confusing, in which case consider this a request to improve the error message.
Repository: vscode
Issue: Notebooks draw on top of sidebar when editor area is scrolled
Labels: bug,notebook

Intentionally regression from #150238

**Repro:**
1. Open a notebook next to the sidebar
2. Open a number of new editor groups so that the editor area scrolls
3. Scroll the editor area

**Bug**
The notebook draws on top of the sidebar
Repository: TypeScript
Issue: `@` character in code block renders poorly in tooltip
Labels: Bug,Help Wanted

<!-- ⚠️⚠️ 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. -->
<!-- 🔧 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. -->
- VS Code Version: 1.67.2 (Universal)
- OS Version: Darwin arm64 21.4.0

Steps to Reproduce:

When having this chunk of source code:

````ts
/**
 * Description of CursorClass
 *
 * Example Usage:
 * 
 * ````ts
 * @IsCursor(CursorClass)
 * cursor?: CursorClass | null;
 * ````
 */
````

VSCode renders as this:
![image](https://user-images.githubusercontent.com/8191296/170440327-1c19d7c5-f2d0-4267-962a-4b62828a191b.png)

It should render as this:
![image](https://user-images.githubusercontent.com/8191296/170440500-1a8d81a6-0c20-424d-a218-8ce62be2ba7b.png)
Repository: flutter
Issue: [tool][web] Use `esbuild` to guarantee ES6 compatibility of our generated JS code.
Labels: tool,would be a good package,platform-web,P3,team-web,triaged-web

## Problem

Flutter Web currently generates several JS files to integrate with the browser, like flutter.js and flutter_service_worker.js.

While doing changes to those files, it's some times hard to remember what bits of ECMAScript are supported by which versions of each browser, and bugs like this happen:

* https://github.com/flutter/flutter/pull/104761
* https://github.com/flutter/flutter/pull/83732

(And possibly others)

## Proposal

Integrate in our build process something like [`esbuild`](https://esbuild.github.io/) that would let us:

* Write the JavaScript in whatever version we want, with the latest features
* Ensure that said javascript will run in our supported browsers (with `--target=es6`, for example), regardless of what features we use
* (optional) Minify the code.

PS: the `esbuild` pass could also happen as post-processing after a `flutter build web`, this doesn't need to be necessarily integrated with the flutter tool, so adding the "this may be a good package" label also.
Repository: flutter
Issue: [Impeller] OpenGLES Reactor must handle task pinning.
Labels: engine,P2,e: impeller,team-engine,triaged-engine

Today, if the tasks need to be executed on specific contexts, they must be re-threaded. The reactor must be able to do this on its own.

The `Context::HasThreadingRestrictions` API can be removed after this is fixed.
Repository: godot
Issue: GDscript editor keeps adding useless '# warning-ignore:return_value_discarded'
Labels: bug,topic:gdscript,topic:editor

### Godot version

v3.5.rc2.official [5f9bc7ea5] and v3.4.4.stable.official [419e713a2]

### System information

Ubuntu 21.10

### Issue description

I was fixing the warnings and wasing really paying attention to what the [ignore] link was doing and ended up with a dozen copies of "# warning-ignore:return_value_discarded" inserted into my files as it's not detecting them.

### Steps to reproduce

Open the attached new_script.gd in the built-in editor. Open the warning panel. Click on the [Ignore] on 

"[Ignore]Line 6 (RETURN_VALUE_DISCARDED):The function 'connect()' returns a value, but this value is never used."
or "[Ignore]Line 8 (RETURN_VALUE_DISCARDED):The function 'connect()' returns a value, but this value is never used."


### Minimal reproduction project

[MRE.zip](https://github.com/godotengine/godot/files/8783904/MRE.zip)
Repository: pytorch
Issue: torch.angle differs from np.angle for -0.
Labels: triaged,module: numpy,module: primTorch

### 🐛 Describe the bug

Discovered in https://github.com/pytorch/pytorch/pull/78349

```python
>>> import torch
>>> import numpy as np
>>> t = torch.tensor(-0.)
>>> torch.angle(t)
tensor(0.)
>>> np.angle(t.numpy())
3.141592653589793
```

cc: @mruberry 

### Versions

master

cc @mruberry @rgommers @ezyang @ngimel
Repository: ant-design
Issue: Close button position for Drawer
Labels: 💄 Design,Inactive

### What problem does this feature solve?

In some cases, it is more convenient and familiar to users to have a close button on the right. As example:
- windows users
- some actions in extra buttons, after successful completion of which you need to close the drawer

Related:
https://github.com/ant-design/ant-design/pull/30908
https://github.com/ant-design/ant-design/issues/33081

### What does the proposed API look like?

1. As minimum in this place raise higher the `closeIconNode` to give developers opportunity to move button with styles after `extra` . It seems that there is no reason to combine them under the Title. The structure does not look logical.
2. As prefered - add new property `closeIconPosition` for drawer.

```
<div
          className={classNames(`${prefixCls}-header`, {
            [`${prefixCls}-header-close-only`]: closable && !title && !extra,
          })}
          style={headerStyle}
        >
          <div className={`${prefixCls}-header-title`}>
            {closeIconNode}
            {title && <div className={`${prefixCls}-title`}>{title}</div>}
          </div>
          {extra && <div className={`${prefixCls}-extra`}>{extra}</div>}
        </div>
```

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: [Proposal] Find a way to reuse code fron `NavigationDestination` for widgets other than `NavigationBar` 
Labels: framework,f: material design,c: proposal,P3,team-design,triaged-design

# use case

For a responsive layout going from `NavigationBar` to `NavigationRail` would be easier if `NavigationRailDestination` and `NavigationDestination` extended the same base class.
Repository: godot
Issue: GDScript error messages use word Nil which doesn't exist in GDScript
Labels: enhancement,topic:gdscript

### Godot version

v4.0.alpha8.official [cc3ed63af]

### System information

Windows 10

### Issue description

There are several error messages which use word `Nil`, but there are no `Nil`s in GDScript. I suggest that those error messages should be changed to use the correct term `null`. 

Some error messages also somewhat incorrectly talk about `Nil`/`null` being a type while it actually isn't. I have made a [proposal](https://github.com/godotengine/godot-proposals/discussions/4045) to fix the null/void types. This bug report is however just about fixing the confusing error messages.

### Steps to reproduce

## example 1

```gdscript
var a: int = null
```

Current error message:
```
Trying to assign value of type 'Nil' to a variable of type 'int'.
```
This is especially bad error message as a type `null`/`Nil` doesn't actually exist. Better error message would be:
```
Trying to assign 'null' to a variable of type 'int'. Only assigning 'int' is allowed.
```

## example 2

```gdscript
var a = null
a.foo()
```

Current error message:
```
Invalid call. Nonexistent function 'foo' in base 'Nil'.
```
Better error message could be something like this:
```
'a' is 'null' so its methods cannot be called.
```

There are surely more error messages which use word `Nil`, but these are ones I have noticed so far.

### Minimal reproduction project

_No response_
Repository: axios
Issue: Axios httpsAgent with multiple requests
Labels: state::triage

#### Describe the issue
Using version 0.27.2, how can I make multiple HTTPS requests with `userAgent`?

Currently when I make consecutive HTTPS requests to different URL endpoints but with the same `userAgent`, the second call fails with `403`. When using an alternative HTTP client library (`superagent`) the same calls succeed.

#### Example Code
Axios
```ts
import { Agent } from "https";
import { readFile } from "fs/promises";
import axios from "axios";

const agent =  new Agent({
  pfx: await readFile('./cert.pfx'),
  passphrase: '123'
})

const data1 = { user: example, pass: example }
const config1 = {
  httpsAgent: agent,
  headers: { 'content-type': 'application/json' }
}

// OK 200
const response1 = await axios.post('https://example.com/login', data1, config1);

const data2 = { query: 'x + y' }
const config2 = {
  httpsAgent: agent,
  headers: {
    'content-type': 'application/json' ,
    'x-id': response1.headers.id
  }
}

// FAIL 403
const response2 = await axios.post('https://example.com/query', data2, config2);


```
Superagent
```ts
import { Agent } from "https";
import { readFile } from "fs/promises";
import * as superagent from "superagent";

const agent =  new Agent({
  pfx: await readFile('./cert.pfx'),
  passphrase: '123'
})

// OK 200
const response1: any = await superagent
      .post('https://example.com/login')
      .agent(agent)
      .set('content-type', 'application/json')
      .send({ user: example, pass: example })

// OK 200
const response2: any = await superagent
      .post('https://example.com/query')
      .agent(agent)
      .set('content-type', 'application/json')
      .set('x-id', response1.headers.id)
      .send({ query: 'x + y' })
```
How should the `httpsAgent` be used in Axios?

#### Expected behavior, if applicable
Consecutive calls should return 200s.

#### Environment
 - Axios Version [0.27.2]
 - Adapter [?]
 - Browser [-i]
 - Browser Version [-]
 - Node.js Version [18.2.0]
 - OS: [Ubuntu 20.04.1]
 - Additional Library Versions [-]

#### Additional context/Screenshots
Same functionality fails in node 14.19.3
Repository: go
Issue: proposal: encoding/json: skipping nil values when Unmarshal bytes
Labels: Proposal

Currently if w have struct like this:
```go
type Product struct {
	Variants    []Variant `json:"variants"`
}

func (p *Product) Transform(input []byte) error {
	return json.Unmarshal(input, p)
}
```
There is no way to skip nil values so unmarshalling this json:
```json
{
    "variants": [
         null,
        {
            "one": "two"
        },
        null,
    ]
}
```
Will produce:
```go
product := Product{
	Variants: [] Variant{ 
                 {
 			One: "",
		},
	        {
 			One: "two",
		},
		{
 			One: "",
		},
	}
}
```
Would be nice if `Unmarshal` can skip `nil` values using something like this:
```go
type Product struct {
	Variants    []Variant `json:"variants,skipempty"`
}

func (p *Product) Transform(input []byte) error {
	return json.Unmarshal(input, p)
}
```
What would product:
```go
product := Product{
	Variants: []Variant{ 
	        {
 			One: "two",
		},
	}
}
```
Repository: terminal
Issue: Tab drag causes mousedown in tmux
Labels: Help Wanted,Area-Input,Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-2

### Windows Terminal version

1.13.11432.0

### Windows build number

10.0.22000.0

### Other Software

tmux 3.0a inside WSL2

### Steps to reproduce

- Open a tmux session inside WSL2 (Ubuntu 20.04.3 in my case)
- Drag the current tab downwards so it overlays the screen area (and do it quite fast)

### Expected Behavior

The tmux session should be unaffected by the drag action outside of it.

### Actual Behavior

Onmousedown / drag apparently is triggered and causes the selection to change and scroll mode to start. This only happens if you drag quite fast.

https://user-images.githubusercontent.com/5270359/170699426-7528dbdd-d5cc-4ddd-9ffc-b82d7630a4ac.mp4

The latest preview version 1.14.1452.0 also has this issue and 1.12 had it as well.
Repository: vscode
Issue: Git toolbar crunch
Labels: polish,scm

![Recording 2022-05-27 at 14 47 32](https://user-images.githubusercontent.com/900690/170702208-2e45397d-d557-4439-a6fd-4cae09a83b23.gif)
Repository: TypeScript
Issue: 4.7 regression: Array.flat(infinity) leads to "Type instantiation is excessively deep and possibly infinite." error
Labels: Bug,Help Wanted,Cursed?

# 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.
-->

- Array.flat
- Type instantiation is excessively deep and possibly infinite.
- Nested arrays

### 🕗 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:
-->
- This changed between versions 4.6 and 4.7

### ⏯ 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.
-->
[TypeScript Workbench with relevant code](https://www.typescriptlang.org/dev/bug-workbench/?target=6&ts=4.7.0-beta#code/PTAEAEBcEMCcHMCmkBcoCiBlATABgIwCcAUMQJYB2kisAZtAMaKgDCA9hbWfKAN7GhQAB1hshAfjQBnSLErwA3MQC+pStTqNm6AB7UKAE0QH2nbqER7Ehqaw5cevVcUgBPIcwByiGcdMPbAF5QAEFYWGhXAB5dfSMTe3MAH1BvXwSzeCkAPiViBg4ZUALMqTQ06gyAgG0AXVBgurySotoAG2hIfWMG4sSsgDp2zoAKAEkzCjI3AEolIA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
interface Config {
  prop?: string;
}

interface ExtendedConfig extends Config {}

type NestedConfigs = Array<ExtendedConfig | NestedConfigs>;

const configs: NestedConfigs[] = [];

const flattened = configs.flat(Infinity);
```

### 🙁 Actual behavior

TypeScript raises the following error for the `configs.flat(Infinity)` call:

`Type instantiation is excessively deep and possibly infinite. ts(2589)`

### 🙂 Expected behavior

No error should be raised.