sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: `Organize imports` yields no-op edits
Labels: Bug,Help Wanted

# Bug Report

### 🕗 Version & Regression Information

VSCode stable & insiders
ts stable & nightly

### 💻 Reproduction

<!-- Please post the relevant code sample here as well-->
Create a typescript file:
```ts
import 'a';
import 'b';
import 'c';
import 'd';

//
```


Run command `Organize Imports`

### 🙁 Actual behavior

_VSCode insiders (1.71.0); built-in typescript (4.8.2); verbose_

-   Request `Organize Imports`
    ```svelte
    {
      seq: 54,
      type: "request",
      command: "organizeImports",
      arguments: {
        scope: { type: "file", args: { file: "c:/dev/bug/index.ts" } },
        skipDestructiveCodeActions: false
      }
    }
    ```


-   Response `Organize Imports`
    ```svelte
    {
      seq: 0,
      type: "response",
      command: "organizeImports",
      request_seq: 54,
      success: true,
      body: [
        {
          fileName: "e:/dev/bug/index.ts",
          textChanges: [
            {
              start: { line: 1, offset: 1 },
              end: { line: 2, offset: 1 },
              newText: "import 'a';\nimport 'b';\nimport 'c';\nimport 'd';\n",
            },
            { start: { line: 2, offset: 1 }, end: { line: 3, offset: 1 }, newText: "" },
            { start: { line: 3, offset: 1 }, end: { line: 4, offset: 1 }, newText: "" },
            { start: { line: 4, offset: 1 }, end: { line: 5, offset: 1 }, newText: "" },
          ],
        },
      ],
    }
    ```

-   File update
    ```svelte
    {
      seq: 55,
      type: "request",
      command: "updateOpen",
      arguments: {
        changedFiles: [
          {
            fileName: "e:/dev/bug/index.ts",
            textChanges: [
              {
                newText: "import 'b';\nimport 'c';\nimport 'd';\n",
                start: { line: 2, offset: 1 },
                end: { line: 2, offset: 1 },
              },
              { newText: "", start: { line: 2, offset: 1 }, end: { line: 3, offset: 1 } },
              { newText: "", start: { line: 3, offset: 1 }, end: { line: 4, offset: 1 } },
              { newText: "", start: { line: 4, offset: 1 }, end: { line: 5, offset: 1 } },
            ],
          },
        ],
        closedFiles: [],
        openFiles: [],
      },
    }
    ```


### 🙂 Expected behavior

-   Response `Organize Imports`
    ```svelte
    {
      seq: 0,
      type: "response",
      command: "organizeImports",
      request_seq: 54,
      success: true,
      body: []
    }
    ```
Repository: PowerToys
Issue: Fancy Zone: Enable KVM Multi-Monitor support by numbering zones to be sequential across monitors
Labels: Idea-Enhancement,FancyZones-Layouts,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

Windows would be restored to their last known zone. Instead of numbering from from 1-64 (128?) on each monitor, allow for numbering across monitors, so the zone numbering on the next monitor can start at any number. Example: Monitor A has zones 1, 2, and 3. Monitor B has zones 4, 5, and 6.

### Scenario when this would be used?

When switching between devices with a KVM supporting 2 or more monitors, Windows 10 does not remember which monitor has what windows, so it dumps all the windows on the first monitor to start up (This is fixed in Windows 11 with System > Display > Remember window locations based on monitor connection). For setups with non-rectangular shaped arrangements, the Fancy Zones 'Canvas' option is not a usable solution.

### Supporting information

You can somewhat 'force' the numbers used on zones by assigning a hotkey to a zone and editing the custom-layouts.json. Entering the hotkey will reapply the zone and the new zone numbers will be displayed, and windows can be assigned to those zones. However, upon testing by swapping away from a Windows 10 machine and then back, all of the windows are still placed on the first monitor to be restored. Possible fix: if zone index does not exist, wait X seconds and try again before reassigning to next available zone (or however FancyZones works for this). This gives the monitor chance to turn on.
Note: upon entering the zone editor you will get an error and the layout will be removed from the monitor and from custom-layout.json.

I think the code in lines 30-54 of fancyzones > FancyZonesLib > ZoneIndexSetBitmask.h is relevant to this, as it always starts at 0 and I suspect is called for each monitor layout.
For auto moving, reference WindowMoveHandler.cpp line 276 which ends in a call to remove the zone index. Maybe this statement is where a pause can be inserted if the monitor can't be found??

![snapshot](https://user-images.githubusercontent.com/48608128/187037420-8082f122-5d9f-4dc5-b3e8-c0fbbc17f13a.png)
![snapshot-1](https://user-images.githubusercontent.com/48608128/187037424-f1b65666-fe32-497a-b093-6b55980e0b83.png)
Repository: rust
Issue: Using an import instead of a fully-qualified path causes a borrowck error
Labels: A-resolve,A-borrow-checker,T-compiler,C-bug

```
fn foo(x: &mut dyn std::any::Any) {
  println!("{:?}", x.type_id());
}
```
fails compiling with `error[E0521]: borrowed data escapes outside of function`, while it compiles without the `mut`.
(The problem can be worked around by adding `let x: &dyn std::any::Any = x;` before the `println`.)

Tested on rustc 1.65.0-nightly (c07a8b4e0 2022-08-26) and on stable.
Repository: PowerToys
Issue: Updating Nvidia drivers breaks FancyZones
Labels: Issue-Bug,FancyZones-Layouts,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

0.61.1

### Running as admin

- [X] Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

Have PowerToys running in the system tray.
Using Nvidia's GeForce Experience, use the Express Installation to update drivers (I updated to version 516.94). I was not instructed to restart my device afterward.
Now, attempt to drag a window into a selected zone while pressing shift.
FancyZones should no longer be functioning, despite PowerToys still running in the system Tray.

### ✔️ Expected Behavior

The window should snap into place when pressing shift.

### ❌ Actual Behavior

The FancyZones UI did not show up and windows would not snap. Upon restarting PowerToys, the customized zones had reset to their defaults instead the ones I had selected before updating the drivers.

### Other Software

Windows 10 Pro build 19044.1889
Nvidia GeForce Game Ready Driver Version 516.94
Nvidia GeForce Experience Version 3.25.1.27
Repository: rust
Issue: Associated type bound with HRTBs causes an opaque type inference failure
Labels: A-lifetimes,A-trait-system,A-associated-items,T-compiler,C-bug,T-types,fixed-by-next-solver,A-higher-ranked

<!--
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.
-->
[URLO thread](https://users.rust-lang.org/t/associated-type-bound-with-hrtbs-says-type-doesnt-implement-trait/80441)

I tried this code:
[Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=41d3b1bd3f245f45df4a12ec93f290cf)
```rust
pub trait Trait {}

impl<'a, T> Trait for &'a T where T: Trait {}

impl<'a> Trait for &'a str {}

fn check_hrtb<T>(_: T)
where
    for<'a> &'a T: IntoIterator,
    for<'a> <&'a T as IntoIterator>::Item: Trait,
{
}

fn check<'a, T>(_: T)
where
    T: 'a,
    &'a T: IntoIterator,
    <&'a T as IntoIterator>::Item: Trait,
{
}

fn main() {
    check(["hi"]); // Works
    check_hrtb(["hi"]); // Fails with error below
}
```

I expected to see this happen: `check_hrtb` should infer the type of `T` correctly.

Instead, this happened: The compiler indicates that the trait bounds were not met, however removing the HRTB and using  a normal lifetime in `check` works correctly.
```
error[E0277]: the trait bound `for<'a> <&'a _ as IntoIterator>::Item: Trait` is not satisfied
  --> src/main.rs:24:16
   |
24 |     check_hrtb(["hi"]);
   |     ---------- ^^^^^^ the trait `for<'a> Trait` is not implemented for `<&'a _ as IntoIterator>::Item`
   |     |
   |     required by a bound introduced by this call
   |
   = help: the following other types implement trait `Trait`:
             &'a T
             &'a str
note: required by a bound in `check_hrtb`
  --> src/main.rs:10:44
   |
7  | fn check_hrtb<T>(_: T)
   |    ---------- required by a bound in this
...
10 |     for<'a> <&'a T as IntoIterator>::Item: Trait,
   |                                            ^^^^^ required by this bound in `check_hrtb`
```

In the URLO thread quinedot noted that adding an explicit type causes the code to compile with no other changes 
```diff
-    check_hrtb(["hi"]);
+    check_hrtb::<[&str; 1]>(["hi"]);
```
[Playground with fix](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=ab18432256eeafbd24428c6ebd25ecfd)

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.63.0 (4b91a6ea7 2022-08-08)
rustc 1.65.0-nightly (2022-08-26 c07a8b4e09f356c7468b)
```
Repository: neovim
Issue: LSP server silently fails when in folder that contains "[  ]"
Labels: bug,platform:windows,complexity:low,lsp

### Neovim version (nvim -v)

NVIM v0.7.2 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compiled by runneradmin@fv-az276-503

### Language server name/version

svelte

### Operating system/version

windows 10

### Steps to reproduce using "nvim -u minimal_init.lua"

```
mkdir "[ test ]" && cd "[ test ]"
git clone https://github.com/aungkyawhein/hello-world-svelte
cd hello-world-svelte
```

* Open neovim with minimal config
* :e src/App.svelte

### Expected behavior

LSP server starts and works no matter what folder the project is in.

### Actual behavior

LSP Server fails to start on folders with "[  ]" naming and silently fails.

### Log file

https://gist.github.com/thegamerx1/374e4d71dec141a098a692837d9432ba
Repository: godot
Issue: Placeholder material slots cannot be extracted when clicked from the import window
Labels: bug,topic:editor,confirmed,topic:import,topic:3d

### Godot version

v4.0.alpha14.official [106b68050]

### System information

Windows 10, Vulkan Clustered

### Issue description

When a glTF file using placeholder materials is imported, clicking one of them in the import window crashes the editor.


### Steps to reproduce

Export a model from Blender using:
File -> Export -> glTF 2.0

In the export settings:
Geometry -> Materials: Placeholder

Import the file in Godot, click one of the material slots (named "\<Unnamed Material\>").
![image](https://user-images.githubusercontent.com/14290756/187050025-059d1514-5631-4640-8cb7-8290a6ac9c30.png)
The editor crashes.

### Minimal reproduction project

There is two glTF models in the reproduction project bellow.
One is exported with materials, it works.
The other one is exported with placeholder, it crashes the editor

[BrokenPlaceholdersMaterials.zip](https://github.com/godotengine/godot/files/9438779/BrokenPlaceholdersMaterials.zip)
Repository: godot
Issue: External material are not displayed in the import preview, only in the scene
Labels: bug,discussion,topic:editor,topic:import,topic:3d

### Godot version

v4.0.alpha14.official [106b68050]

### System information

Windows 10, Vulkan Clustered

### Issue description

When a glTF file is imported using the "external" materials option , the original materials are still displayed in the import window.
However, the external materials are the one displayed in the scene view (which is correct).

### Steps to reproduce

Import the file in Godot.
In the import settings, click one of the material slots.
Click "Use external" and choose a material.
It is not displayed in the import preview, only in the scene view.

Import view:
![suz1](https://user-images.githubusercontent.com/14290756/187053139-1536c802-8b2b-456d-92f0-471707f6d319.PNG)

Scene view:
![suz2](https://user-images.githubusercontent.com/14290756/187053140-f7798c32-d729-47b4-ae2d-64074467bfdd.PNG)


### Minimal reproduction project

There is one glTF model in the reproduction project bellow.
The import is configured to use the external "red_material.tres".

[ExternalMaterialsNotVisibleInImportWindow.zip](https://github.com/godotengine/godot/files/9438886/ExternalMaterialsNotVisibleInImportWindow.zip)
Repository: godot
Issue: 4.0 GDExtension: global_get_singleton not returning expected singletons.
Labels: bug,topic:core,confirmed,topic:gdextension

### Godot version

v4.0.alpha.custom_build.0c5f25495

### System information

Ubuntu 22.04 Vulkan

### Issue description

I'm writing a set of GDExtension/GDNative Go bindings and attempting to load all of the global singletons. I have tried loading them both at level 3 initialization time (`GDNATIVE_INITIALIZATION_EDITOR`) and/or when `_ready` is called on a extension class. A select number of them fail to load and while I expected that Javascript and JavaClassWrapper fail because they require certain environments. I did not expect the Server types to fail.
```
ERROR: Failed to retrieve non-existent singleton 'JavaClassWrapper'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'JavaScript'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'DisplayServer'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'RenderingServer'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'AudioServer'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'PhysicsServer2D'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'PhysicsServer3D'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'NavigationServer2D'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'NavigationServer3D'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'XRServer'.
   at: get_singleton_object (core/config/engine.cpp:251)
ERROR: Failed to retrieve non-existent singleton 'CameraServer'.
```
I might add that calling `Engine.get_singleton("DisplayServer")` for example, does work from GDScript. Is there something special about these 'Server' singletons? How is the initialization for these singletons meant to work from GDExtension?

### Steps to reproduce

Call `global_get_singleton` on a `GDNativeInterface` with any of the failing cases shown in the Issue Description.

**Example**
```c
# include "gdnative_interface.h"

const GDNativeInterface *api;

void deinitialize(void *userdata, GDNativeInitializationLevel p_level) {}

void initialize(void *userdata, GDNativeInitializationLevel p_level) {
    if (p_level == GDNATIVE_INITIALIZATION_EDITOR) {
        api->global_get_singleton("DisplayServer");
    }
}

GDNativeBool loadExtension(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization) {
    r_initialization->minimum_initialization_level = GDNATIVE_INITIALIZATION_EDITOR;
    r_initialization->initialize = initialize;
    r_initialization->deinitialize = deinitialize;
    api = p_interface;
    return 1;
}
```
Repository: pytorch
Issue: Support setting strides on quantized weights of Embedding
Labels: oncall: quantization,low priority,triaged

### 🚀 The feature, motivation and pitch

For quantized Embedding, [deberta in transformers](https://github.com/huggingface/transformers/blob/21f6f58721dd9154357576be6de54eefef1f1818/src/transformers/models/deberta/modeling_deberta.py#L694) will choose weights from original weights, but I get: 
`*** RuntimeError: Setting strides is possible only on uniformly or per channel quantized tensors`.

Below are the details of quantized weights of Embedding. torch.per_channel_affine_float_qparams should be a per channel quantization schema, right?
---------
tensor([[ 0.0064, -0.0069, -0.0082,  ..., -0.0215, -0.0056, -0.0003],
        [-0.0069,  0.0087, -0.0225,  ..., -0.0136, -0.0069,  0.0065],
        [-0.0071,  0.0225, -0.0071,  ..., -0.0182, -0.0219,  0.0151],
        ...,
        [-0.0037,  0.0060, -0.0203,  ..., -0.0176,  0.0088,  0.0102],
        [-0.0126, -0.0350, -0.0074,  ..., -0.0284,  0.0032, -0.0218],
        [ 0.0065, -0.0123,  0.0018,  ..., -0.0170,  0.0065,  0.0018]],
       size=(50265, 768), dtype=torch.quint8,
       quantization_scheme=torch.per_channel_affine_float_qparams,
       scale=tensor([0.0013, 0.0022, 0.0037,  ..., 0.0014, 0.0013, 0.0047]),
       zero_point=tensor([ 87.2115,  50.1056,  93.9225,  ...,  77.6577,  81.5797, 115.6229]),
       axis=0)


### Alternatives

No

### Additional context

_No response_

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel
Repository: godot
Issue: Changes of variables nested in subcategories are not shown as a change of the parent category in the inspector
Labels: bug,topic:editor,usability

### Godot version

4.0.alpha14

### System information

linux

### Issue description

Categories do not sum up the changes made in subcategories:

https://user-images.githubusercontent.com/71937306/187070627-3eded58c-ea05-49f4-a19d-8157cc9a6eed.mp4




### Steps to reproduce

Change any variable sorted in a subcategory and fold the parent category



### Minimal reproduction project

_No response_
Repository: flutter
Issue: Flutter adds additional one frame touch latency compared to native
Labels: platform-ios,engine,a: fidelity,P2,team-ios,triaged-ios

| Bad        | Expected           | 
| ------------- |:-------------:| 
| <video src="https://user-images.githubusercontent.com/96958/187072879-717668ac-a4fe-4e43-adc4-60d3774e5e1a.mov"> | <video src="https://user-images.githubusercontent.com/96958/187072886-6cbe0e23-78d5-4086-ad5f-756832ea4bb3.mov"> |

Repository: https://github.com/knopp/flutter_scroll_overlay

When touch event is received, instead of immediately beginning a frame Flutter waits for next vsync. But that skips an entire frame. By the time vsync comes, the frame should be already rendered and ready to go. But instead it has just began. On iOS touch events seem to be delivered within few milliseconds of the display link callback so there should be enough time.

You can pause the "bad" video to see that during scrolling Flutter lags behind native by one frame exactly.

The expected video is with quick and dirty engine modification that forces BeginFrame immediately on input event. 

The way vsync is implemented in Flutter might need some work. It should make sure that repaints are synchronized with display updates, but it shouldn't be causing additional latency.
Repository: rust
Issue: Trait not implemented for X where X is one of the "other types implement trait"
Labels: I-ICE,T-compiler,C-bug

### Description
Code that works in a `#[test]` does not seem to work when consuming the library. I've double checked for anything that wasn't exported in the library code that the test had access to and can't seem to find anything. For easy replication I pushed [this branch](https://github.com/WalterSmuts/constfft/tree/example-compilation) where the final commit shows adding both a `#[test]` and a `examples/same_as_test.rs` file that contains exactly the same code where one passes compilation and one fails.

### Note
This requires the `nightly` compiler since the crate is making use of `generic_const_exprs`. 

I tried this code:
```rust
fn main() {
    same_as_example()
}

fn same_as_example() {
    use constfft::RealFft;
    use constfft::RealIfft;
    [1.0_f64; 3].real_fft().real_ifft();
}
```

I expected the compiler to successfully compile.

Instead, the compiler produced the following error:
```
error[E0277]: the trait bound `RealDft<f64, 2, constfft::Odd>: RealIfft<f64, 2, _>` is not satisfied
 --> examples/same_as_test.rs:8:29
  |
8 |     [1.0_f64; 3].real_fft().real_ifft();
  |                             ^^^^^^^^^ the trait `RealIfft<f64, 2, _>` is not implemented for `RealDft<f64, 2, constfft::Odd>`
  |
  = help: the following other types implement trait `RealIfft<T, SIZE, OUTPUT_SIZE>`:
            RealDft<T, SIZE, constfft::Even>
            RealDft<T, SIZE, constfft::Odd>
```

### Meta
`rustc --version --verbose`:
```
$ rustc --version --verbose
rustc 1.64.0-nightly (848090dcd 2022-07-22)
binary: rustc
commit-hash: 848090dcd18553b790461132ca9d2a020aeea9a2
commit-date: 2022-07-22
host: x86_64-unknown-linux-gnu
release: 1.64.0-nightly
LLVM version: 14.0.6
```
and also tried:
```
$ rustc --version --verbose
rustc 1.65.0-nightly (eaadb8947 2022-08-27)
binary: rustc
commit-hash: eaadb8947b850a025404082f6297766c4680a42a
commit-date: 2022-08-27
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
```
Repository: flutter
Issue: Support two finger multi-select behavior seen on iOS
Labels: c: new feature,platform-ios,framework,f: material design,f: cupertino,f: gestures,c: proposal,P2,team-design,triaged-design

## Use case

On some native iOS apps (email, notes, messages, etc.), by dragging both fingers down you can select multiple items in a list. 

https://www.youtube.com/watch?v=9kPDMbCaP5s


## Proposal

It would be nice to have this available as part of the Cupertino library, potentially tied to Cupertino listTile.  

cc: @jmagman
Repository: rust
Issue: `rustc --print targets_list` should give hint about `target-list`
Labels: A-diagnostics,T-compiler

Given the command line code:

```
rustc --print targets_list
```

The current output is:

```
error: unknown print request `targets_list`
```

Suggested output is:

```
error: unknown print request `targets_list`
Maybe you meant `target-list`?
Use `???` to list valid print requests.
```

I.e. it should list valid print requests with small edit distance (and/or offer a way to get all print requests).

Ideally something like `rustc --print-target-list` or `rustc --target-list` should also be recognized.

Rustc version `rustc 1.64.0-nightly (3924dac7b 2022-07-29)`.