sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: rustdoc fails to properly resolve `Self` in a submodule when the type is not in scope 
Labels: T-rustdoc,E-mentor,E-medium,C-bug,A-intra-doc-links

When a doc comment refers to `Self` inside an `impl` block for a type that is not in scope, `rustdoc` can't properly resolve `Self`.

It does resolve `Self` to a more specific name (`Foo` in the example below), but then it can't find that name.

A minimum example:
```rust
struct Foo {
	foo: i32,
}

mod bar {
	impl crate::Foo {
		/// Baz the [`Self::foo`].
		pub fn baz(&self) {
			println!("bazzing the foo");
		}
	}
}
```

This produces a broken link in the documentation and the following warning:
```
$ cargo doc
 Documenting foo v0.1.0 (/tmp/2021-05-02-18-45-24/foo)
warning: unresolved link to `Foo::foo`
 --> src/main.rs:7:16
  |
7 |         /// Baz the [`Self::foo`].
  |                      ^^^^^^^^^^^ no item named `Foo` in scope
  |
  = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

warning: 1 warning emitted

    Finished dev [unoptimized + debuginfo] target(s) in 0.66s
```

### Meta

I tested this using:

* rustdoc 1.53.0-nightly (42816d61e 2021-04-24)
* rustdoc 1.51.0 (2fd73fabe 2021-03-23)

Both show the same problem.

@rustbot modify labels: +A-rustdoc

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"tdelabro"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: flutter
Issue: Allow excluding specific plugins from the host platform build on specific platforms
Labels: c: new feature,tool,customer: google,c: proposal,team-ecosystem,P2,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

Currently I have dependencies like `firebase_messaging` but I only need them for mobile (android/ios) not for desktop (macOS) - it is causing longer build times (cocoa pods) for my macOS version as well as a larger application when it is not used at all.

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->

Allow for platform specific `pubspec.yaml`s or dependencies.
Repository: create-react-app
Issue: Devtools -> sources: showing strange hierarchy 
Labels: needs triage,issue: bug report

### Describe the bug
I'm checking the "sources" tab in chorme devtools and the hierarchy is very strange

![image](https://user-images.githubusercontent.com/19698636/116824799-57199e80-ab8c-11eb-9f0f-a0cbb6557fef.png)


### Which terms did you search for in User Guide?

(Write your answer here if relevant.)

### Environment

<!--
  To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
  This enables the maintainers quickly reproduce the issue and give feedback.

  Run the following command in your React app's folder in terminal.
  Note: The result is copied to your clipboard directly.

  `npx create-react-app --info`

  Paste the output of the command in the section below.
-->

Environment Info:

  current version of create-react-app: 4.0.3
  running from /home/croraf/.npm/_npx/72494/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
    Yarn: 1.21.1 - /usr/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
  Browsers:
    Chrome: 90.0.4430.85
    Firefox: 88.0
  npmPackages:
    react: ^17.0.1 => 17.0.1 
    react-dom: ^17.0.1 => 17.0.1 
    react-scripts: ^4.0.3 => 4.0.3 
  npmGlobalPackages:
    create-react-app: Not Found

### Steps to reproduce
Example:

1. clone this project https://github.com/rromic/darkdiagnosis
2. `cd frontend` `npm start`
3. Open devtools in Chrome and Sources tab
4. Your sources hierarchy will look like on the above image.


### Expected behavior

I kind of expect not to see randomly scattered different folders that I dont have in my folder structure.

### Actual behavior

There are many strange folders in the "localhost" origin that I don't have in my folder structure. Like: 

- <fullpath_to_my_projects_folder>/src
- <fullpath_to_my_projects_folder>/<my_project/src
- <fullpath_to_my_projects_folder>/<my_project/node_modules...
- ...


### Reproducible demo

Check before.


### NOTE
Here is an even more drastical example:
![image](https://user-images.githubusercontent.com/19698636/116830475-b4244d00-abaa-11eb-895b-1ac3a562e600.png)
Repository: TypeScript
Issue: Handle union type of void and Promise<void> in return types
Labels: Suggestion,In Discussion

# Suggestion

## 🔍 Search Terms

void, async, second-order functions

## ✅ 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 (and motivating example)

(I apologize if there is already discussion around this; I haven't been able to find it.)

It is sometimes convenient for a second-order function to receive a function that may or may not be asynchronous:

```
function mySecondOrderFn(firstOrderFn: () => void | Promise<void>) {
  return async () => {
    console.log("Calling firstOrderFn()")
    const output = await firstOrderFn()
    console.log("Finished calling firstOrderFn()")
  } 
}

// @ts-expect-error I'd like to be able to do this:
mySecondOrderFn(() => 2)

// @ts-expect-error Or this, for that matter:
mySecondOrderFn(async () => 2)
```

Unfortunately `() => void | Promise<void>` seems to cancel TS's normal type inference around `() => void`:
```
const x: () => void = () => 2
// @ts-expect-error Type 'number' is not assignable to type 'void | Promise<void>
const y: () => void | Promise<void> = () => 2
```

In addition (this is probably the root cause): `() => Promise<void>` by itself is pickier than I would expect since only `() => Promise<undefined>` and `() => Promise<any>` are assignable to it. I understand that `void` is not an inferrable type but this case does not require `void` to be inferred, does it?

I suspect this problem exists because of how `void` interacts with parameterized types. Maybe there isn't a general solution to that, but at least I think `() => Promise<2> extends () => Promise<void>` would be desirable to support as a special case, given the ubiquity of the `async/await` pattern.

## 💻 Use Cases

In my case, I'm writing an implementation of forEach. It is a context that applies backpressure so I want the first-order function to be able to return a Promise, but otherwise I don't care about the output.

`() => any` does suffice here; `() => any | Promise<any>` is marginally more expressive, although from a type perspective it is exactly the same. In either case I am exposed to the pitfalls of the `any` type, in particular that is easy to assign such output to a value by mistake (precisely what `void` exists to prevent you from doing).
Repository: pytorch
Issue: `torch._dirichlet_grad` returns `nan` value on cuda device
Labels: module: autograd,module: cuda,triaged,module: NaNs and Infs

## 🐛 Bug

`nan` value is returned by `torch._dirichlet_grad` when using cuda device.

## To Reproduce

Steps to reproduce the behavior:

```
>>> import torch
>>> torch.set_default_tensor_type(torch.cuda.FloatTensor)
>>> x = torch.tensor([0.15497829020023346, 0.845021665096283])
>>> c = torch.tensor([14539.8583984375, 79369.6484375])
>>> t = torch.tensor([93909.5078125, 93909.5078125])
>>> torch._dirichlet_grad(x, c, t)
tensor([    nan, -0.0010])
```

## Expected behavior

The code above works fine on cpu device:

```
>>> import torch
>>> torch.set_default_tensor_type(torch.FloatTensor)
>>> x = torch.tensor([0.15497829020023346, 0.845021665096283])
>>> c = torch.tensor([14539.8583984375, 79369.6484375])
>>> t = torch.tensor([93909.5078125, 93909.5078125])
>>> torch._dirichlet_grad(x, c, t)
tensor([1.0654e-05, 1.0648e-05])
```

## Environment

PyTorch version: 1.8.1+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1

OS: Arch Linux (x86_64)
GCC version: (GCC) 10.2.0
Clang version: 11.1.0
CMake version: version 3.20.1

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti

Nvidia driver version: 460.67
cuDNN version: Probably one of the following:
/usr/lib/libcudnn.so.8.1.0
/usr/lib/libcudnn_adv_infer.so.8.1.0
/usr/lib/libcudnn_adv_train.so.8.1.0
/usr/lib/libcudnn_cnn_infer.so.8.1.0
/usr/lib/libcudnn_cnn_train.so.8.1.0
/usr/lib/libcudnn_ops_infer.so.8.1.0
/usr/lib/libcudnn_ops_train.so.8.1.0

Versions of relevant libraries:
[pip3] numpy==1.20.2
[pip3] torch==1.8.1+cu111
[pip3] torchaudio==0.8.1
[pip3] torchfile==0.1.0
[pip3] torchvision==0.9.1+cu111
[conda] Could not collect

## Additional context

This issue was encountered in `torch.distributions.dirichlet._Dirichlet_backward` during training a pyro model. It happens with other values of `x`, `c`, and `t` during long training, above is one of such cases.


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @ngimel
Repository: rust
Issue: Adding `where Self: Sized` to a required method forces implicit `Sized` bounds on trait
Labels: A-trait-system,T-lang,T-compiler,C-bug

Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=efbde4267fa53c01fd24ee88c52727c9

Essentially, here's my contrived example:
```rust
pub trait Test {
    type Test;
    fn test(self) -> Self::Test where Self: Sized;
}

impl Test for [u8; 0] {
    type Test = ();
    fn test(self) -> Self::Test {}
}

impl Test for [u8] {
    type Test = ();
    fn test(self) -> Self::Test {}
}
```

Whether you include or remove the `Test::test` method for `[u8]`, this refuses to compile, as `[u8]: !Sized`.

I'm not sure if this is intentional or not, but considering how adding `where Self: Sized` to optional methods works fine, I find this at least surprising. I'm not sure whether this should be changed into a diagnostic which states that this kind of thing is explicitly forbidden for required methods, or if omitting the method should be allowed.

My main goal is to require a by-value method for sized types, but to not require it for unsized types and settle for just by-ref methods.
Repository: node
Issue: investigate flaky test-inspector-cli-heap-profiler on Raspberry Pi
Labels: arm,flaky-test

<!--
Thank you for reporting a flaky test.

Flaky tests are tests that fail occasionally in the Node.js CI, but not
consistently enough to block PRs from landing, or that are failing in CI jobs or
test modes that are not run for every PR.

Please fill in as much of the template below as you're able.

Test: The test that is flaky - e.g. `test-fs-stat-bigint`
Platform: The platform the test is flaky on - e.g. `macos` or `linux`
Console Output: A pasted console output from a failed CI job showing the whole
failure of the test
Build Links: Links to builds affected by the flaky test

If any investigation has been done, please include any information found, such
as how consistently the test fails, whether the failure could be reproduced
locally, when the test started failing, or anything else you think is relevant.
-->

* **Test**: test-inspector-cli-heap-profiler
* **Platform**: pi2-docker
* **Console Output:**
```
00:44:28 not ok 743 inspector-cli/test-inspector-cli-heap-profiler
00:44:28   ---
00:44:28   duration_ms: 30.804
00:44:37   severity: fail
00:44:37   exitcode: 1
00:44:37   stack: |-
00:44:37     /home/iojs/build/workspace/node-test-binary-arm/test/common/inspector-cli.js:84
00:44:37               reject(new Error([
00:44:37                      ^
00:44:37     
00:44:37     Error: Timeout (10000) while waiting for />\s+$/; found: 
00:44:37     Heap snapshot: 0/0
00:44:37     
00:44:37     Heap snapshot: 0/30077
00:44:37     
00:44:37     Heap snapshot: 10000/30077
00:44:37     Heap snapshot: 20000/30077
00:44:37     
00:44:37     Heap snapshot: 30000/30077
00:44:37     
00:44:37     Heap snapshot: 30076/30077
00:44:37     
00:44:37     Heap snapshot: 30077/30077Heap snaphost prepared.
00:44:37     
00:44:37         at Timeout.<anonymous> (/home/iojs/build/workspace/node-test-binary-arm/test/common/inspector-cli.js:84:18)
00:44:37         at listOnTimeout (node:internal/timers:557:17)
00:44:37         at processTimers (node:internal/timers:500:7)
00:44:37   ...
```
* **Build Links**: https://ci.nodejs.org/job/node-test-binary-arm-12+/10636/RUN_SUBSET=3,label=pi2-docker/console
Repository: PowerToys
Issue: [FancyZones] Make zones resizable by typing or hotkey to halve the movement rate
Labels: Idea-Enhancement,FancyZones-Editor,Product-FancyZones,Area-User Interface

### Provide a description of the new feature / enhancement

Currently, to resize a zone, you use a slider to move the borders of a zone.  This is generally good, but if you want to get the height or width of a zone to an exact dimension, you have to be super precise and end up bouncing your mouse back and forth for several minutes just to get the size to what you want.

There are two possible solutions to this that I can think of:
- Traditional: make the dimension indicators clickable and editable which would live-modify the dimension being changed.
- click-hold a border then holding down a designated hotkey will halve the movement rate of the bar on mouse move.  So, for example, every 2 pixels of mouse movement, the border would move in the same direction just 1 pixel.  This would create less movement so that the user could get it close, then hold down the hotkey and precisely dial it in.
Repository: PowerToys
Issue: [Run] Improve error message for file not found
Labels: Issue-Bug,Help Wanted,Priority-3,Run-Plugin

### Provide a description of the new feature / enhancement

See https://github.com/microsoft/PowerToys/issues/9911, the crash has been fixed but the error message is not ideal https://github.com/microsoft/PowerToys/issues/9911#issuecomment-810924947
Repository: godot
Issue: Tilemap collision is not updated right away when changing tile (update done in the next collision resolution step)
Labels: bug,topic:core,topic:physics,topic:2d

**Godot version:**
3.3


**OS/device including version:**
Arch Linux


**Issue description:**

I need to change a tile then query it's collision status immediately.

This works:
```
func _physics_process(delta):
	print($RayCast2D.is_colliding())

	if Input.is_action_just_pressed("ui_left"):
		print("Removing tile")
		$TileMap.set_cell(1, 0, -1)
		$TileMap.update_dirty_quadrants()
		$RayCast2D.force_raycast_update()
		print($RayCast2D.is_colliding())
```
```
True
True
Removing tile
False
False
False
False
```


This doesnt:

```
func _physics_process(delta):
	print($RayCast2D.is_colliding())

	if Input.is_action_just_pressed("ui_right"):
		print("Changing to different tile")
		$TileMap.set_cell(1, 0, 1)
		$TileMap.update_dirty_quadrants()
		$RayCast2D.force_raycast_update()
		print($RayCast2D.is_colliding())
```

```
True
True
Changing to different tile
False
True
True
True
```


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[test2.zip](https://github.com/godotengine/godot/files/6413248/test2.zip)
Repository: PowerToys
Issue: [runner] prevent the runner from starting on older than 1903
Labels: Area-Runner,Priority-3,Cost-Small

### Provide a description of the new feature / enhancement

0.37 has raised the Windows minimum version to 1903. The installer prevents PowerToys to be installed on older versions, but the runner still can be started when compiled locally. 
Add a warning and quit the runner in that case.
Repository: PowerToys
Issue: Update all modules to drop the module API to load/save settings
Labels: Area-Quality,Area-Module interface

### Provide a description of the new feature / enhancement

 - [ ] Update all modules to drop the old Settings requirement and use a file watcher to reload 
     - [ ] Color Picker
     - [ ] FancyZones **(planned for 0.41)**
     - [ ] File Explorer add-ons
     - [ ] Image Resizer
     - [x] Keyboard Manager
     - [ ] Power Rename
     - [ ] PowerToys Run
     - [ ] Shortcut Guide **(planned for 0.39)**
 - [ ] After all modules dropped the old Settings requirement, update the module interface to drop it as well
 - [ ] Remove old Settings references from the documentation
Repository: create-react-app
Issue: tsconfig.json overwitten by `react-scripts test`
Labels: stale,needs triage,issue: bug report

### Describe the bug

First of all, I've installed theese modules:

```
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.23",
"@types/node": "^12.20.11",
"@types/react": "^17.0.4",
"@types/react-dom": "^17.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"typescript": "^4.2.4",
"web-vitals": "^1.1.1"
```

I wanted to write module import code like this
```
import MyPage from '~/pages/MyPage'
```

So, I add this code to compilerOptions of tsconfig.json

```
"baseUrl": "./",
"paths": {
  "~/*": ["./src/*"],
},
```

And I found out that the path alias is working fine.

Then, When I closed and reopen the VSCode, (which triggers react-scripts test, I think)
the `path` option of tsconfig.json is removed.

### Did you try recovering your dependencies?

I'v already reinstalled my modules several times.

### Which terms did you search for in User Guide?

I couldn't find anyting but this https://github.com/facebook/create-react-app/issues/10178
which is similar issue to me.

### Environment

```
"dependencies": {
    "@testing-library/jest-dom": "^5.12.0",
    "@testing-library/react": "^11.2.6",
    "@testing-library/user-event": "^12.8.3",
    "@types/jest": "^26.0.23",
    "@types/node": "^12.20.11",
    "@types/react": "^17.0.4",
    "@types/react-dom": "^17.0.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3",
    "typescript": "^4.2.4",
    "web-vitals": "^1.1.1"
  },
  "scripts": {
    "start-cra": "react-scripts start",
    "build-cra": "react-scripts build",
    "test": "react-scripts test",  // <-- my issue is solved when I delete this script
    "eject": "react-scripts eject",
    "storybook": "start-storybook -p 6006 -s public",
    "build-storybook": "build-storybook -s public",
    "build": "rollup -c"
  },
```

### Steps to reproduce

<!--
  How would you describe your issue to someone who doesn’t know you or your project?
  Try to write a sequence of steps that anybody can repeat to see the issue.
-->

(Write your steps here:)

1. `npx create-react-app cra-test --template typescript`
2. open the project via vscode
3. add following options in tsconfig.json
```
"baseUrl": "./",
"paths": {
  "~/*": ["./src/stories/*"],
},
```
4. close vscode
5. reopen the project via vscode

### Expected behavior

nothing should happen

### Actual behavior

`paths` option is deleted in tsconfig.json
Repository: flutter
Issue: flutter_image NetworkImageWithRetry GIF support
Labels: a: images,package,team-ecosystem,has reproducible steps,P3,found in release: 2.0,p: flutter_image,triaged-ecosystem

Using flutter_image: ^3.0.0

`NetworkImageWithRetry()` shows the first frame of the GIF image only. There are no animations.

Same image works with `NetworkImage()`

```
              Image(
                image: NetworkImageWithRetry('https://media.giphy.com/channel_assets/sports/P658KMA9mwy4/200h.gif'),
                //fit: BoxFit.cover,
                width: 250,
                height: 250,
                errorBuilder: (context, object, stackTrace) {
                  return Text('Error');
                },
              ),
```

Flutter Doctor
```
[√] Flutter (Channel beta, 2.2.0-10.2.pre, on Microsoft Windows [Version
    10.0.19041.928], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] Android Studio
[√] Connected device (3 available)

• No issues found!
```
Repository: flutter
Issue: Show default flag values for `flutter config`
Labels: c: new feature,tool,c: proposal,P3,team-tool,triaged-tool

## Use case

Currently, running `flutter config` lists all available flags, but not its value or default value. For example:

```
--[no-]enable-web                            Enable or disable Flutter for web. This setting will take effect on the
                                                 master, dev, beta, and stable channels.
                                                 setting will take effect on the master, dev, beta, and stable channels.
                                                 Newer beta versions are available on the beta channel.
```

## Proposal

Add some text to show the default value of the flag, for example:

```
--[no-]enable-web                            Enable or disable Flutter for web. This setting will take effect on the
                                                 master, dev, beta, and stable channels.
                                                 setting will take effect on the master, dev, beta, and stable channels.
                                                 Newer beta versions are available on the beta channel.
                                                 Defaults to `false`.
```