sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: E0603 is misleading on non-exhaustive enums
Labels: A-diagnostics,T-compiler,D-confusing,D-incorrect

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur. 
-->

Given the following code: (no link, as not reproducible in a single file)

Library:
```rust
pub enum Foo {
    Alpha,
    #[non_exhaustive]
    Beta,
}

impl Foo {
    pub fn beta() -> Self {
        Self::Beta
    }
}
```

External user (in this case a test):
```rust
use example::Foo;

#[test]
fn demo() {
    assert!(matches!(
        Foo::beta(),
        Foo::Beta
    ));
}
```

The current output is:

```
error[E0603]: unit variant `Beta` is private
 --> tests/demo.rs:7:14
  |
7 |         Foo::Beta
  |              ^^^^ private unit variant
  |
note: the unit variant `Beta` is defined here
 --> /home/jhpratt/example/src/lib.rs:4:5
  |
4 |     Beta,
  |     ^^^^
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
error[E0638]: `..` required with variant marked as non-exhaustive
 --> tests/demo.rs:7:9
  |
7 |         Foo::Beta
  |         ^^^^^^^^^
  |
help: add `..` at the end of the field list to ignore all other fields
  |
7 |         Foo::Beta { .. }
```

Right now, the cause of the error is misleading, as it seems to imply that an enum variant is private (which is impossible). The error message should be updated to match the error provided when there are some fields present, but not the `..` as required. The exact wording might vary a bit, but I copied it verbatim here. Given the explanation of E0603, I believe that this is the wrong error code altogether.

@rustbot modify labels to +A-diagnostics +T-compiler +D-confusing +D-incorrect
Repository: go
Issue: cmd/link/internal/ld: hang in TestRuntimeTypeAttrExternal on netbsd-386-9_0
Labels: OS-NetBSD,NeedsInvestigation

```
goroutine 36 [syscall, 2 minutes]:
syscall.Syscall6(0x1da2, 0x84c3da0, 0x0, 0x98e4000, 0x0, 0x0, 0x0, 0x0, 0x50, 0xbbabe538)
	/tmp/workdir/go/src/syscall/asm_unix_386.s:43 +0x5
syscall.wait4(0x1da2, 0x84c3da0, 0x0, 0x98e4000, 0x50, 0x8223200, 0x1)
	/tmp/workdir/go/src/syscall/zsyscall_netbsd_386.go:35 +0x5b
syscall.Wait4(0x1da2, 0x84c3dc4, 0x0, 0x98e4000, 0x9d880a0, 0xffffff10, 0xbffffff)
	/tmp/workdir/go/src/syscall/syscall_bsd.go:145 +0x3b
os.(*Process).wait(0x91ac060, 0x674, 0x824da80, 0x824da84)
	/tmp/workdir/go/src/os/exec_unix.go:44 +0x66
os.(*Process).Wait(...)
	/tmp/workdir/go/src/os/exec.go:129
os/exec.(*Cmd).Wait(0x9da2420, 0x0, 0x0)
	/tmp/workdir/go/src/os/exec/exec.go:507 +0x4d
os/exec.(*Cmd).Run(0x9da2420, 0x8eca060, 0x9da2420)
	/tmp/workdir/go/src/os/exec/exec.go:341 +0x43
os/exec.(*Cmd).CombinedOutput(0x9da2420, 0x26, 0x0, 0x0, 0x0, 0x9da2420)
	/tmp/workdir/go/src/os/exec/exec.go:567 +0x75
cmd/link/internal/ld.testRuntimeTypeAttr(0x8a01420, 0x8244829, 0x1b)
	/tmp/workdir/go/src/cmd/link/internal/ld/dwarf_test.go:983 +0x191
cmd/link/internal/ld.TestRuntimeTypeAttrExternal(0x8a01420)
	/tmp/workdir/go/src/cmd/link/internal/ld/dwarf_test.go:957 +0x53
testing.tRunner(0x8a01420, 0x824d818)
	/tmp/workdir/go/src/testing/testing.go:1194 +0xbf
created by testing.(*T).Run
	/tmp/workdir/go/src/testing/testing.go:1239 +0x214
```

Looks to me like the external (system) linker wedged somehow.

[2021-03-05T02:30:31-b62da08/netbsd-386-9_0](https://build.golang.org/log/a90168a43a8ff7c7132c9c356d53b2868ad5d79a)

CC @bsiegert @coypoop
Repository: TypeScript
Issue: Checking if Enum | falsely in if condition if value of Enum might be zero
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms
checker, enum, undefined, dx
<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

Check if a value has `enum | falsely` types, and one member of the enum is zero. And the value In top level of If/while/etc's conditions.

It's a common bug case. Even after condition, CFA could strip the zero value. But If we does not use the enum value, we will never find it out.

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

```ts

enum E {
    Foo,
    Bar
}

function foo (v: E | undefined) {
    if (!v) { // Should be suggestion or error?
        throw new Error("Hoops")
    }

    console.log("Acceptable") // But without E.foo
}

```


## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->
Repository: TypeScript
Issue: Duplicate identifier error when merged interface is declared before class
Labels: Bug,Rescheduled

# Bug Report

### 🔎 Search Terms

interface accessors getters declaration merge

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about interfaces, merging, and getters

### ⏯ Playground Link

[Playground link](https://www.typescriptlang.org/play?ssl=1&ssc=1&pln=14&pc=1#code/MYGwhgzhAEBiD29oG8CwAoaXoHMCmALtAB4AUAlAFzQB2ArgLYBGeATitK4XazdAAwBuaAF9oAenHR4AawwiMASxoE2AMzDA8cRCgzYS1eszbDJ0uegXolK9Zu0AhMOzSZsxI4xaszUmvBEsvIYoJAwzq762PhEZFS03mwcXAQ8fEKiEv6BFiHoQA)

### 💻 Code

```ts
class Foo {
    get x(): number { return 0; } // ok
}
interface Foo {
    x: number; // ok
}

interface Bar {
    x: number; // not ok
}
class Bar {
    get x(): number { return 0; } // not ok
}
```
### 🙁 Actual behavior

`Bar` throws an error but not `Foo`

### 🙂 Expected behavior

Neither or both throw an error (probably both).

While exploring whether an interface can merge with a class in order to narrow the type of a class's inherited getter (there is no documentation, but the answer seems to be that accessor properties are not properly representable in interfaces as of 4.2.2), I came across seemingly unpredictable conditions for what `tsc` would accept. Eventually, it became apparent that the order of the interface and class declarations has bearing on whether an error is thrown.
Repository: pytorch
Issue: Should we remind users not to use the dataset  on GPU when it's the argument of DataLoader?
Labels: module: dataloader,triaged

## 📚 Documentation

<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->

https://pytorch.org/docs/stable/data.html
```
DataLoader(dataset, batch_size=1, shuffle=False, sampler=None,
           batch_sampler=None, num_workers=0, collate_fn=None,
           pin_memory=False, drop_last=False, timeout=0,
           worker_init_fn=None, *, prefetch_factor=2,
           persistent_workers=False)
```
If the dataset is already on GPU,
1. it will throw exception if pin_memory is True.
2. if the process start method is spawn, it will throw exception about storage sharing.


It took me a lot time to debug https://github.com/fastai/fastai/issues/2899

cc @SsnL @VitalyFedyunin @ejguan
Repository: pytorch
Issue: [JIT] raise unittest.SkipTest and self.skipTest cannot be used to skip tests in JitTestCase
Labels: oncall: jit

Something about `JitTestCase` causes tests to hang in fbcode if a test is skipped using `raise unittest.SkipTest` and `self.skipTest(..)`.


See internal diff for more information: D26838029

cc @gmagogsfm
Repository: pytorch
Issue: CUDA error: an illegal memory access was encountered when updating model weights using GradScaler
Labels: module: nn,module: cuda,triaged,module: amp (automated mixed precision)

I am trying to use torch.cuda.amp to save GPU memory. However, CUDA error was triggered when I use GradScaler to make a step in the optimizer. My training loop is as follows:
```Python
def _train_epoch(model, dl_train, criterion, optimizer, scheduler, scaler,
        epoch_idx):
    model.train()

    for i, sample in enumerate(dl_train):
        optimizer.zero_grad()

        with autocast():
            images, lung_masks, labels, edts = sample
            images = images.cuda()
            lung_masks = lung_masks.cuda()
            labels = labels.cuda()
            edts = edts.cuda()

            output = model(images)
            loss = criterion(output, labels, edts, lung_masks, w_dtc)

            scaler.scale(loss).backward()

        scaler.step(optimizer)
        scaler.update()

    scheduler.step()
```
I use checkpoint to save memory, so I put backward inside the autocast block.
Here is the error message:
```
  File "train_unet_edt.py", line 115, in _train_epoch
    scaler.step(optimizer)
  File "/home/kaiming/anaconda3/envs/torch/lib/python3.7/site-packages/torch/cuda/amp/grad_scaler.py", line 320, in step
    if not sum(v.item() for v in optimizer_state["found_inf_per_device"].values()):
  File "/home/kaiming/anaconda3/envs/torch/lib/python3.7/site-packages/torch/cuda/amp/grad_scaler.py", line 320, in <genexpr>
    if not sum(v.item() for v in optimizer_state["found_inf_per_device"].values()):
RuntimeError: CUDA error: an illegal memory access was encountered
```
My hardware and software specs are as follows:
- OS: Ubuntu 20.04.2 LTS;
- NVIDIA Driver: 460.32.03;
- CUDA: Anaconda's cudatoolkit 11.0.221;
- PyTorch: 1.7.0;
- GPU: NVIDIA RTX 3090.

Any idea?

cc @mcarilli @ptrblck @ngimel @aocsa @albanD @mruberry @jbschlosser
Repository: material-ui
Issue: [Popover] Wrong positioning
Labels: bug 🐛,component: Popover

https://codesandbox.io/s/simplepopover-material-demo-forked-hj680
Notice how popover is shifted from expected position. This seems to be caused by the 'incorrect' `top` `left` CSS property values.

Those position values are traced back to `getBoundingClientRect()` call in referenced codes below.
https://github.com/mui-org/material-ui/blob/7855f2b967b7edaae012f35e18480fa72374fcfd/packages/material-ui/src/Popover/Popover.js#L140
https://github.com/mui-org/material-ui/blob/7855f2b967b7edaae012f35e18480fa72374fcfd/packages/material-ui/src/Popover/Popover.js#L219

Certain CSS properties combinations change containing block calculation for child DOM elements. [Details explained here](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block). 
When `container` is set to some DOM element happens to be the situation, position values would need an extra calculation based on the value from `getBoundingClientRect()`, e.g., subtract position value of the container.

All components internally use popover (e.g. `Menu`) should suffer the same problem.
Repository: storybook
Issue: Vue component: Doesn't see default property values
Labels: bug,vue,block: argstable

**Describe the bug**
**1 case:**
Vue component in .vue file. Properties are defined via `vue-types` libriary. 
Example:
```
import VueTypes from 'vue-types';
props: {
    radius: VueTypes.number.def(50),
    strokeWidth: VueTypes.number.def(5),
}
```
looks like:
![image](https://user-images.githubusercontent.com/2129431/110101085-37e0d980-7db4-11eb-87ab-aedbed626678.png)

**2 case:**
Vue component is defined in .js file using jsx syntax (render function). 
Example (components.js):

```
export default {
  name: 'Component',
  props: {
    color: {
      type: String,
      default: '#ff9900'
    },
    colors: {
      type: Array,
      default: () => ['#ff9900', '#000000']
    },
  },
  render() {
    return <ColorPicker color={this.color} colors={this.colors} />
  }
}
```
looks like:
![image](https://user-images.githubusercontent.com/2129431/110101924-3532b400-7db5-11eb-9fed-abf6cd577cef.png)
Repository: pytorch
Issue: OpInfo mechanism to test for nondeterminism
Labels: module: tests,triaged,module: determinism

At the moment, `OpInfo` tests do not provide a way to test for determinism in a unified way.

Tests like:
```
('index_copy', (S, S), (0, index_perm_variable(2, S), (2, S)), 'dim_alert_nondeterministic', (), [0], [expectedAlertNondeterministic('index_copy')])
```
do not have an equivalent `OpInfo` test yet.

cc @mruberry @kurtamohler @VitalyFedyunin @walterddr
Repository: TypeScript
Issue: tsc not respecting types/typeRoots config for imported modules
Labels: Suggestion,Awaiting More Feedback

# Bug Report

Codebase is pulling in type declarations from the parent `../node_modules/@types/` folder, despite attempting to restrict the `types` and `typeRoots` to ignore it.

```sh
client/
  node_modules/@types/foo/ # server shouldn't ever see this!
  tsconfig.json
  
  server/
    node_modules/foo/ # server should see this as a module with no type declarations
    tsconfig.json
```

### 🔎 Search Terms
* Stop typescript from including types from parent node_modules
* Prevent typeRoots from using parent node_modules

__Related Issues__:
* How to block typescript 2.0 from walking up all parent directories while resolving modules? #13992
* Declarations are unexpectedly used from node_modules in parent directory #30124

The issue is very similar to the ones described above, but neither were resolved beyond saying that unwanted types could be excluded with `"types": []`. This only seems to work for excluding global types (e.g. `@types/node`) as far as I can tell, there is no way to prevent typescript pulling in types for a module that is explicitly imported. See [repro](https://github.com/danprince/typeroots-bug-repro) for more context. 

### 🕗 Version & Regression Information
We are seeing this problem with `typescript@3.9.9`, but I have created a reproduction that also confirms it on `typescript@latest` and `typescript@next` too.

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about excluding types and type roots.

### 💻 Code
Reproduced in repo with CI demonstrating incorrect behaviour here: https://github.com/danprince/typeroots-bug-repro

### 🙁 Actual behavior
The server codebase ends up including `../node_modules/@types/foo/index.d.ts` as part of the compilation (through an `import foo from "foo"`) even with `"typeRoots": ["./node_modules/@types"]` and `"types": []`.

Our current workaround is to remove the parent `node_modules` as part of our CI step.

We could also work around this by shadowing the declarations in the local `node_modules/@types` dir, or using `paths` hack to point typescript towards a non-existent version of the module, but it shouldn't be that hard.

All I want is to tell `tsc` is to never _ever_ look in `../node_modules/@types`.

### 🙂 Expected behavior
Never look in `../node_modules/@types` for anything. I know that conflicts with the `"moduleResolution": "node"` to some degree, but it should be possible to configure that as far as type declarations are concerned.
Repository: flutter
Issue: Hiding overflow indicator of `UnconstrainedBox`
Labels: framework,a: quality,c: proposal,P3,team-framework,triaged-framework

Currently `UnconstrainedBox` always shows the overflow indicator on debug builds.
But when using this widget I usually intend the overflow in the unconstrained axis so I don't want to see that error.
For instance as the child of a `SliverFillRemaining` like I show in the reproduction.
The reason I need to use the `UnconstrainedBox` here is that if I would set `hasScrollBody` to false for the `SliverFillRemaining` it will use the incorrect intrinsic height of the text because of #27293.
However, there are other valid reasons to want this behaviour.

**Reproduction:**
```dart
class Bug extends StatelessWidget {
  const Bug({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(builder: (context) {
        return Scaffold(
          body: CustomScrollView(
            physics: const BouncingScrollPhysics(),
            slivers: [
              SliverToBoxAdapter(
                child: Container(
                  color: Colors.red,
                  height: MediaQuery.of(context).size.height - 100,
                ),
              ),
              SliverFillRemaining(
                fillOverscroll: true,
                child: Center(
                  child: UnconstrainedBox(
                    alignment: Alignment.topCenter,
                    constrainedAxis: Axis.horizontal,
                    child: Padding(
                      padding: const EdgeInsets.all(32),
                      child: Text(
                        'This is some very large text that will wrap to the next line on a phone\n' *
                            5,
                      ),
                    ),
                  ),
                ),
              ),
            ],
          ),
        );
      }),
    );
  }
}
```

**Possible solutions:**
1. Add a property to `UnconstraintedBox` to hide the error
2. Add an `UnconstrainedOverflowBox` widget
3. Add something like the `constrainedAxis` property to `OverflowBox`
Repository: excalidraw
Issue: Generate unique random name instead of "unknown user" when collaborating
Labels: enhancement

When sharing a board with a lot of collaborators, you end up with a lot of "unknown user".

It might be nice to have an option to force prompt username. For example, if username is not set already and you open the link, display a popup that prompt name and greyd out the board.

Even if the popup is not mandatory and you can discard it with a click, most user will blindly fill it and it would give a smoothier experience for everyone.

I'm thinking of two implementations :
- add a button next to the share link, that enable prompt username for the board.
- make the prompt a default behaviour when you create a collaborative board. (could be toggle on/off server side for selfhosted instances)
Repository: PowerToys
Issue: [KBM] missing shortcuts if executed fast one after another
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Priority-3,Planning-Consideration

## ℹ Computer information

- PowerToys version:  v0.33.1 
- PowerToy Utility: Keyboard Manager
- Running PowerToys as Admin: Yes
- Windows build number: Version 20H2 (OS Build 19042.804)

## 📝 Provide detailed reproduction steps (if any)

1. Remap shortcut Win (Left) + Ctrl (Left) + A  -->  Left (Arrow key)
2. Remap shortcut Win (Left) + Ctrl (Left) + D  -->  Right (Arrow key)
3. Open any text editor with some random text
4. Hold Ctrl + Win through the next steps 
5. Slowly press A then D repeatedly cursor should move left then right
6. Press A then D as fast as possible repeatedly. Now instead of moving cursor letters A and D are typed randomly

### ✔️ Expected result

Moving cursor left and right
In general case executed remapped shortcut

### ❌ Actual result

Typing A and D characters
In general case remapped shortcuts not working if executed quickly one after another

### ❌ Problem

After more testing the problem seems to be not the fast execution of shortcuts

The problem is that both A and D characters are pressed at the same time for a brief moment that in turn executes Win + Ctrl + A shortcut and types letter D. 

Expected behavior could be seen by using copy and paste shortcuts by holding Ctrl and pressing C and V almost at the same time, letters are not typed and both shortcuts are executed
Repository: godot
Issue: [macOS] [3.2.4] Godot windows remain "stuck" for ~500ms or so when dragging
Labels: bug,platform:macos,topic:porting

**Godot version:**
Godot 3.2.4 RC3, but also the latest `3.2` commit (f2ad10f957f7765d9733145112f5df6583b53adf)


**OS/device including version:**
Macbook Pro 13" 2018 with Intel Graphics
macOS Big Sur 11.2.2
GLES3

**Issue description:**
Any window displayed by the Godot process has a short, but noticeable period (maybe half a second) of "being stuck" when clicking & dragging it with the mouse. To clarify,

- I hover the mouse pointer over the window's title bar
- I click and hold the mouse button
- I move the mouse
- Now, instead of moving, the window remains stuck in place for about half a second, before then finally moving

Some extra observations:

- This happens with *any* window displayed by Godot (project manager, editor window, a running game, etc.)
- I've noticed a similar effect with some other non-Godot apps, so it might be a wider issue in Big Sur. When I encounter it again, I will make a note of the affected app.


**Steps to reproduce:**

- Start Godot
- Drag the project manager window with the mouse

**Minimal reproduction project:**

- Not needed