sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Item Tooltip's location in ItemList not updating when scaling ItemList
Labels: bug,topic:gui

### Godot version

3.3.4 stable

### System information

Windows 10

### Issue description

Hovering over an item in an ItemList usually pops open a hint tooltip.  However, if you scale the ItemList's  is rect_scale(2.0, 2.0), the ItemList scales correctly, but hovering over the scaled item will not popup a tooltip.  On further investigation, if I hover over the original position of the item before scaling, the tooltip pops up.

Normal scale:
![Tool1](https://user-images.githubusercontent.com/26915986/136592064-46117b71-19b1-49f2-9c27-beb2c392cfeb.png)
:
Double Scale:
![tool2](https://user-images.githubusercontent.com/26915986/136592157-289db720-f81b-42de-8a93-7e1dcdb60ed5.png)

Tooltip location needs to scale as well.  This may apply to other controls as well.

### Steps to reproduce

1. Create a project with an ItemList.
2. Populate ItemList with 5 items: One Two Three Four Five
3. Create a button to scale the project.
4. Run and hover over the "Five" item and a tooltip pops up displaying "Five".
5. press the button to scale project
6. Hover over the "Five" again and no tooltip pops up.
7. Hover over the location where "Five" used to be and a tooltip pops up displaying "Five". 

### Minimal reproduction project

[ToolTips.zip](https://github.com/godotengine/godot/files/7312866/ToolTips.zip)
Repository: react
Issue: Improve "native" component stacks host component frames
Labels: Type: Discussion,Component: Developer Tools,Size: Small-Medium

React and React DevTools generate [component stacks](https://github.com/facebook/react/blob/main/packages/react-devtools/CHANGELOG.md#component-stacks) in the same format as native Error stacks. For user components (class and function components) this is done by intentionally causing the component's render method to throw an Error, and then stitching the error stack frames together:
https://github.com/facebook/react/blob/5fa4d79b00988f354073bc27313363dd5cce9cd3/packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js#L62-L203

This results in a component stack like this:
![image](https://user-images.githubusercontent.com/29597/136594272-3d290470-b0fb-48ac-b0a1-a32402448649.png)

But for "host components" (e.g. `HTMLDivElement` or `View`) when we have no source location to show, we fall back to showing just "at div" or "at View".

We could probably more closely mirror what JavaScript engines do by appending a "location" like `(native)` or `(unknown location)` (as the [v8 docs](https://v8.dev/docs/stack-trace-api#appendix%3A-stack-trace-format) suggest) or `(anonymous)` as v8 seems to actually do in testing.

The trick would be matching the specific browser/engine's behavior for this. For example, running the following code in Chrome or Node...

```js
JSON.stringify({}, () => console.log(new Error('')));
```

...will show the stack frame:
```
    at JSON.stringify (<anonymous>)
```
while Firefox will show:
```
Error: 
    <anonymous> file:///path/to/script:7
```

Improving this format so that host components more closely mirror native Error stacks will help simplify things like React Native's error parsing.
Repository: create-react-app
Issue: npx create-react-app my-app --template typescript couldn't start
Labels: stale,needs triage,issue: bug report

Right after creating a new app with typescript template `npx create-react-app my-app --template typescript`, it wouldn't start when I do `yarn start`. Errors below:

```
  yarn run v1.22.10
  $ react-scripts start
  We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you.
  
  It looks like you're trying to use TypeScript but do not have typescript installed.
  Please install typescript by running yarn add typescript.
  If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files).
  
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

Versions below:

npm  7.11.2
yarn 1.22.10
node v14.13.1

It only worked after doing `yarn add typescript web-vitals` and `yarn add -D @types/react @types/react-dom`.
Repository: flutter
Issue: [Performance] Widget still in Memory when popped
Labels: framework,f: routes,perf: memory,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-framework,triaged-framework

Having even empty BottomNavigationBar causes a memory leak
Removing BottomNavigationBar causes the leak to disappear.

## Details

Running code and do the steps:

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
      onGenerateRoute: (RouteSettings settings) {
        final args = settings.arguments;
        switch (settings.name) {
          case "/bar":
            return MaterialPageRoute(builder: (_) => BarPage());
        }
      },
    );
  }
}

class HomePage extends StatelessWidget {
  HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Home screen'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          Navigator.of(context).pushNamed("/bar");
        },
        child: const Icon(Icons.navigation),
        backgroundColor: Colors.green,
      ),
    );
  }
}

class BarPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Bar screen'),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: [],
      ),
    );
  }
}
```

- run the app and open dev tools
- press on FAB to open BarPage and then press back button to close it
- repeat multiple times
- do a heap snapshot in Memory tab of dev tools
- observe multiple instances of BarPage still present in memory

**Target Platform:** Android, iOS
**Target OS version/browser:**
**Devices:** 

## Logs

<details>
<summary>Logs</summary>

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[!] Android Studio
    ✗ Android Studio not found at /Volumes/Data/Applications/Android Studio 4.0.1.app/Contents
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.1)
[✓] VS Code (version 1.60.2)
[✓] Connected device (3 available)

! Doctor found issues in 1 category.

```

</details>
Repository: pytorch
Issue: `torch.fx.symbolic_trace()` loses module class information
Labels: triaged,module: fx

## 🐛 Bug

Tracing a model with `torch.fx.symbolic_trace()` loses all submodule class information. This can be a problem for FX-based tools that rely on class information. See https://github.com/pytorch/vision/pull/4549 for a prototype example.

## To Reproduce

```python
from torch import fx, nn


class SomeBlock(nn.Sequential):
    def __init__(self, in_chan, out_chan):
        super().__init__(nn.Conv2d(in_chan, out_chan, 3), nn.BatchNorm2d(1), nn.ReLU())
        self.myname = self.__class__


class SomeModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layers = nn.ModuleList([SomeBlock(3, 32), SomeBlock(32, 64), SomeBlock(64, 128)])

    def forward(self, x):
        for l in self.layers:
            x = l(x)
        return x


model = SomeModel()
gm = fx.symbolic_trace(model)

previous_class = model.layers[0].__class__  # <class '__main__.SomeBlock'>
new_class = gm._modules["layers"]._modules['0'].__class__ # <class 'torch.nn.modules.module.Module'>
assert model.layers[0].__class__ == gm._modules["layers"]._modules['0'].__class__, f"{previous_class} != {new_class}"
```

Returns:
```
Traceback (most recent call last):
  File "./deleteme.py", line 26, in <module>
    assert model.layers[0].__class__ == gm._modules["layers"]._modules['0'].__class__, f"{previous_class} != {new_class}"
AssertionError: <class '__main__.SomeBlock'> != <class 'torch.nn.modules.module.Module'>
```

## Expected behavior

The two classes should match. The submodule should maintain its class information.

## Environment

 - PyTorch Version (e.g., 1.0): pytorch-1.11.0.dev20211005
 - OS (e.g., Linux): macOS
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source): n/a
 - Python version: 3.8
 - CUDA/cuDNN version: n/a
 - GPU models and configuration: n/a
 - Any other relevant information: n/a



cc @ezyang @SherlockNoMad
Repository: TypeScript
Issue: Trigger Node type acquisition on matching shebang
Labels: Suggestion,Domain: JavaScript,Experience Enhancement

Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:11:02.929Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-37-generic

Steps to Reproduce:

1. `npm init -y`
2. set `"type": "module"`
3. creating new `index.js` file
4. writting `fs` doesn't sugget to import fs, so it doesn't add `import fs from 'fs'` line.
Repository: rust
Issue: No "consider borrowing here" suggestion for method on complex trait bound
Labels: A-diagnostics,T-compiler

Using Bevy (see minimal repo [here](https://github.com/alice-i-cecile/bevy_compiler_errors/blob/main/src/main.rs), the following code provides an unhelpful error message. The compiler does not notice that `&A` meets the trait bounds required and suggest a fix.

```rust

use bevy::prelude::*;

// The user requested A in the system, rather than &A
fn missing_reference_in_query_system(query: Query<A, With<B>>) {}

fn main() {
    App::new().add_system(missing_reference_in_query_system)).run();
}
```

The error message is

```rust
        the trait bound `A: WorldQuery` is not satisfied
        the trait `WorldQuery` is not implemented for `A`
```

Something along the lines of "The trait `WorldQuery` is implemented for `&A`, consider borrowing here." would go a long way to improve this. 

Basic attempts at minimally reproducing this give the correct error message: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c762dafa29c2c0bc89425661f383917b. This also works with `needs_ref` as a standalone function.
Repository: go
Issue: x/tools/gopls: document how to debug high CPU usage issues 
Labels: Documentation,NeedsInvestigation,gopls,Tools,gopls/performance

https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md has the instruction for memory usage debugging. 
We need a similar section that explains what information is needed for investigation and how to profile CPU usage
Repository: svelte
Issue: No error for missing directives `=`
Labels: feature request

### Describe the bug

Hi
There was a typo in my code and I didn't notice it for a while. Svelte needs to show an error if the `=` was missing. Please check the [REPL](https://svelte.dev/repl/ef6b6fb2c44e4bf3b2ce656641676985?version=3.43.1).
Thanks

### Reproduction

https://svelte.dev/repl/ef6b6fb2c44e4bf3b2ce656641676985?version=3.43.1

### Logs

_No response_

### System Info

```shell
System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 7.85 GB / 15.84 GB
  Binaries:
    Node: 14.17.6 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (94.0.992.38)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    rollup: ^2.3.4 => 2.58.0
    svelte: ^3.0.0 => 3.43.1
```


### Severity

blocking all usage of svelte
Repository: rust
Issue: Unhelpful error message for malformed Bevy Query type parameters
Labels: A-diagnostics,T-compiler

Following the reproduction [here](https://github.com/alice-i-cecile/bevy_compiler_errors/blob/main/src/main.rs), this code:

```rust
use bevy::prelude::*;

#[derive(Component)]
struct A;

#[derive(Component)]
struct B;

// The user needs to include both &A and &B in the first type parameter of Query
fn missing_brackets_in_query_system(query: Query<&A, &B>) {}

fn main() {
    App::new()
        .add_system(missing_brackets_in_query_system)
        .run()
}
```

Produces the following error:

```
type mismatch resolving `for<'w, 's> <ReadFetch<B> as Fetch<'w, 's>>::Item == bool`
required because of the requirements on the impl of `FilterFetch` for `ReadFetch<B>`
```

In this case, the user should be grouping `&A, &B` into the first type argument of `Query` using our `all_tuples`-impl'ed macro.
The compiler however sees that `&B` is used in the place of the query filter, and complains that it's an invalid query due to missing internal traits.

Obviously, implementing `FilterFetch` or `ReadFetch` for `B` is not the approach the user should be taking to solve this problem!
Repository: rust
Issue: Bevy malformed system errors are extremely unhelpful due to macro-magic
Labels: A-diagnostics,T-compiler

Following the full reproduction (with more context) [here](https://github.com/alice-i-cecile/bevy_compiler_errors/blob/main/src/main.rs), the following code produces the two following errors:

```rust
use bevy::prelude::*;

#[derive(Debug)]
struct MyResource;

// The user has forgotten to add the Res wrapper around MyResource
fn malformed_system_parameter_system(my_res: MyResource) {}

// The user has invalidly requested a mutable reference to Commands,
// rather using `mut commands: Commands`
fn requesting_commands_as_reference_system(commands: &mut Commands) {}

fn main() {
    App::new()
        //
        .add_system(malformed_system_parameter_system)
        //
        .add_system(requesting_commands_as_reference_system)
        .run()
}
```

Errors:

```
the trait bound `fn(MyResource) {malformed_system_parameter_system}: IntoSystem<(), (), _>` is not satisfied
required because of the requirements on the impl of `IntoSystemDescriptor<_>` for `fn(MyResource) {malformed_system_parameter_system}`

the trait bound `for<'r, 's, 't0> fn(&'r mut bevy::prelude::Commands<'s, 't0>) {requesting_commands_as_reference_system}: IntoSystem<(), (), _>` is not satisfied
required because of the requirements on the impl of `IntoSystemDescriptor<_>` for `for<'r, 's, 't0> fn(&'r mut bevy::prelude::Commands<'s, 't0>) {requesting_commands_as_reference_system}`
```

Errors like this occur constantly whenever users try to include a parameter to a function that is transformed into a system that does not implement `SystemParam`.
As you might expect, there is quite a bit of type magic required to get this to work at all, and we use an `all_tuples` macro to work around the lack of variadic generics.

The ideal error message would identify which argument(s) is at fault, and complain that it does not implement `SystemParam`.
Repository: pytorch
Issue: Invalid handling of out args with type Tensor[] in native_functions.yaml
Labels: module: internals,triaged,module: codegen

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

Attempting to define a function in native_functions.yaml with an out arg of type Tensor[]:

```
- func: foo.out(Tensor t, *, Tensor(a!)[] out) -> Tensor(a!)[]
```

generates the following function in `build/aten/src/ATen/Functions.h`:

```
TORCH_API inline ::std::vector<at::Tensor &> foo_out(at::TensorList out, const at::Tensor & t) {
    return at::_ops::foo_out::call(t, out);
}
```

which does not compile: https://stackoverflow.com/questions/922360/why-cant-i-make-a-vector-of-references.

## To Reproduce

Add these to native_functions.yaml and try starting a build:
```
- func: foo.out(Tensor t, *, Tensor(a!)[] out) -> Tensor(a!)[]
- func: foo(Tensor t) -> Tensor[]
```




cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh
Repository: excalidraw
Issue: Handle canvas cache GC ourselves
Labels: bug

There's a bug in Safari which prevents releasing a `canvas` from memory even if there's no reference to it, and you need to set its dimensions to `0` for GC to take place. At least on iOS https://bugs.webkit.org/show_bug.cgi?id=195325 (the bug is for Safari 12, but I'm pretty sure it's still there), but I think I've seen it referenced on desktop as well — haven't investigated myself apart from the fact that the memory leak (https://github.com/excalidraw/excalidraw/issues/3803) is way more noticeable on Safari.

Since we leave GC up to a `WeakMap` (we're using the element objects as keys), this is an issue.

We need to handle GC ourselves, but if we keep keying by element objects that would be pretty intractable.

An alternative is to start keying by element ids and simply dispose of the cache entry when the element is removed from the scene (and maybe when it's deleted as well). This should ensure the cache is at most as big as the number of elements on scene.

(part of solving https://github.com/excalidraw/excalidraw/issues/3803)
Repository: flutter
Issue: ContinuousRectangleBorder doesn't match iOS implementation
Labels: framework,a: fidelity,f: cupertino,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-design,triaged-design

There was a prior PR #27523 that attempted to change it to an approximation, which was based on this article (by a company selling an app which creates such approximations): https://www.paintcodeapp.com/news/code-for-ios-7-rounded-rectangles

I'd imagine Apple uses a specific bezier curve and suspect that many of the `lineTo`s within that code are probably just due to discrete pixels that happen to line up.

That said, SwiftUI (not exactly sure when it was made a public API) now includes `RoundedRectangle` with  `RoundedCornerStyle.continuous`.

This seems to be similar to the aforementioned approximation, but **does NOT match** iOS 15's built-in apps. Specifically, the grouped sections within Settings. The closest approximation for those sections seems to be with a `cornerRadius` of ~10.2.

Although Apple's own implementations aren't consistent, Flutter's `ContinuousRectangleBorder` should probably match one of them (probably the SwiftUI `RoundedRectangle` as that's the primary public API analogue).

Currently, `ContinuousRectangleBorder` requires a `borderRadius` of ~24 to resemble the `RoundedRectangle` with a `cornerRadius` of ~10.2
Repository: flutter
Issue: [flutter_markdown]: rendered text is not selectable
Labels: package,team-ecosystem,has reproducible steps,P3,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

https://googleflutter.com/flutter-selectabletext/

Why not make the Text selectable by default. This seems to make sense for content.
Repository: TypeScript
Issue: Generic readonly array of objects in function messes IntelliSense for optional props
Labels: Bug,Help Wanted,Effort: Difficult,Domain: Completion Lists

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

generic readonly array, readonly optional missing, function readonly, readonly array object optional...
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

Probably since ~4.2.0

"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 is the behavior in every version I tried, and I reviewed the FAQ for entries about **readonly**

### ⏯ Playground Link

https://www.typescriptlang.org/play?ts=4.5.0-beta#code/GYVwdgxgLglg9mABAMQDwBVEFMAeUtgAmAzogE5YCGhCANgJ6IDelAXImCALYBGWZAGkQ8A-O2JQyMMAHMAvgG0AugD4AFDnboh9dmqhaAlIgC8KxADc4MQsaYAoOffvI1CluwBMQuUuMB6f2FEGixiMAByKERiAAs4AHdEEAAHRGlEAEkwfFpaGGICQqA

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
function F<T extends readonly {a: number, b?: string}[]>(x: T, y: (t: T) => void) {
}

F([{a: 2, }]) // b doesn't show up in Intellisense after defining a
```

### 🙁 Actual behavior

No IntelliSense for optional properties in a readonly array of objects.

### 🙂 Expected behavior

IntelliSense for optional properties in a readonly array of objects.


I want this for my custom \<Form /\> React component, where I have a `fields` props, being it a `ReadonlyArray<{id: string, props?: Props}>`, and I have another prop for the component, the `onSubmit` function, that takes the id's const strings from the `fields` props to call the server with the corresponding Form data. It works, but the `props` property vanishes after defining the id, and it has lots of possible properties, so IntelliSense is pretty important there.
Repository: pytorch
Issue: question on installing GPU-enabled Pytorch
Labels: module: binaries,module: cuda,triaged,module: lts

I installed pytorch GPU version using the following command

`conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c conda-forge`

But the following test shows that CUDA version of Pytorch was not installed. How to install the GPU-enabled Pytorch version?

![image](https://user-images.githubusercontent.com/5430158/136644932-63c6b431-81b8-430e-a9aa-df3c7303eaf5.png)

![image](https://user-images.githubusercontent.com/5430158/136644948-490701fb-3976-446e-aff6-bae4805589e1.png)


I also verified that there is CUDA already available on the machine.

```
C:\WINDOWS\system32>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:15:10_Pacific_Standard_Time_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0

```

cc @ezyang @seemethere @malfet @ngimel
Repository: flutter
Issue: [Proposal]change AboutDialog's background color based on app theme
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

Is there any way to change AboutDialog's background color accroding to my apps theme ? I searched all over the internet and have'nt find anything. Is it possible to create a custom about dialog ? 
![image](https://user-images.githubusercontent.com/53110175/136648015-cd6d6356-7c01-41a7-bc6c-1f09a3c9cd3c.png)