sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: auto trait leakage can be used to leak arbitrary types
Labels: I-ICE,A-impl-trait,A-auto-traits,I-types-nominated,T-types

When leaking the hidden type of opaques when proving auto traits, we can leak their hidden type to the caller by relying on type inference. See https://github.com/lcnr/random-rust-snippets/issues/13 for minimized examples.

Note that this allows us to access foreign closures during typeck/borrowck. This very easily results in ICE, as this code expects all encountered closures to be local:
```rust
// crate dep
struct WaddupGamers<T, U>(Option<T>, U);
impl<T: Leak<Assoc = U>, U> Unpin for WaddupGamers<T, U> {}
pub trait Leak {
    type Assoc;
}
impl<T> Leak for T {
    type Assoc = T;
}
pub fn define<T>() -> impl Sized {
    WaddupGamers(None::<T>, || ())
}

// root
#![feature(type_alias_impl_trait)]
#![allow(unused)]
#![crate_type = "rlib"]

use dep::*;
fn require_auto<T: Unpin>(x: T) -> T { x }
type NameMe<T> = impl Sized;
fn leak<T>() -> NameMe<T>
where 
    T: Leak<Assoc = NameMe<T>>,
{
    // Proving `impl Sized: Unpin` constrains `NameMe<T>` to
    // the closure of `define`.
    let opaque = require_auto(define::<T>());
    let closure;
    loop {}
    return closure; // This constrains this infer var to that closure
}
```` 
results in
```
thread 'rustc' panicked at compiler/rustc_hir_typeck/src/coercion.rs:1202:62:
DefId::expect_local: `DefId(20:20 ~ dep[6a51]::define::{closure#0})` isn't local
```
https://github.com/rust-lang/rust/blob/fcc1615e47100b376d0a6166faccdd4a8253c314/compiler/rustc_hir_typeck/src/coercion.rs#L1202

There are a lot of such uses, this was simply the first one i've triggered.
Repository: pytorch
Issue: String representation of nn.MultiheadAttention should contain arguments
Labels: module: nn,triaged

### 🐛 Describe the bug

Following the recommendation of the [python docs](https://docs.python.org/3/reference/datamodel.html#object.__repr__), the string representation of an object should contain enough information to be re-constructable. Hence, the `nn.MultiheadAttention` class should follow this, like other modules do, c.f. `nn.Linear`, `nn.RNN`, etc.

Current behaviour:
```
import torch.nn as nn
repr(nn.MultiheadAttention(num_heads=2, embed_dim=4)) = 'MultiheadAttention( (out_proj): NonDynamicallyQuantizableLinear(in_features=4, out_features=4, bias=True))'
```
Expected behaviour:
```
repr(nn.MultiheadAttention(num_heads=2, embed_dim=4)) = 'MultiheadAttention(num_heads=2, embed_dim=4)'
```
For example the string representation of a linear layer allows you to reconstruct it:
```
repr(nn.Linear(in_features=3, out_features=5)) = 'Linear(in_features=3, out_features=5, bias=True)'
```
as it contains all the information about the arguments passed. Modules with more parameters such as `nn.RNN` solves this by repeating all arguments that was passed.



### Versions

PyTorch version: 2.5.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 15.1.1 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.29.6
Libc version: N/A

Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 10:07:17) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-15.1.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M1 Max

Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] pytorch-lightning==2.3.3
[pip3] torch==2.5.1
[pip3] torchmetrics==1.4.0.post0
[pip3] torchtext==0.17.2
[pip3] torchvision==0.20.1
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] pytorch-lightning         2.3.3                    pypi_0    pypi
[conda] torch                     2.5.1                    pypi_0    pypi
[conda] torchmetrics              1.4.0.post0              pypi_0    pypi
[conda] torchtext                 0.17.2                   pypi_0    pypi
[conda] torchvision               0.20.1                   pypi_0    pypi


cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: vscode
Issue: Hover dialog no longer closes when pressing Esc, must be focused
Labels: info-needed,editor-hover


Type: <b>Bug</b>

I used to press `ctrl+k ctrl+i` to open the hover menu, and press `esc` to close it. 

Now, the hover menu is no longer focused when opened, and in order to close it, it is necessary to click it with the mouse or use the very long shortcut sequence `ctrl+k ctrl+i` (open) + `ctrl+k ctrl+i` (again, to focus) `esc` (close).

Could you please revert to when the hover was focused on open? I'm not sure the current behavior is accessible either.

VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Linux x64 6.8.0-49-generic
Modes:

<details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

```

</details>

<!-- generated by issue reporter -->
Repository: flutter
Issue: `flutter test --platform chrome` on plugins supporting `ffi` should skip `@TestOn('vm')`
Labels: a: tests,tool,platform-web,c: proposal,team-tool

### Use case

Some plugins support both web as well as native interop via `dart:ffi`. If you write a unit test that imports directly from the source tree without a conditional import (because it's guarded much higher in the import tree when actually used as a library), tests fail even though they're marked `@TestOn('vm')` because imports are evaluated regardless of the annotatni.

```
flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit
org-dartlang-app:///native_memory_test.dart:4:8: Error: Dart library 'dart:ffi' is not available on this platform.
import 'dart:ffi';
       ^
Context: The unavailable library 'dart:ffi' is imported through these packages:

    native_memory_test.dart => dart:ffi
    native_memory_test.dart => package:sentry_flutter => dart:ffi
    native_memory_test.dart => package:sentry_flutter => package:ffi => dart:ffi
    replay/replay_native_test.dart => package:sentry_flutter => dart:ffi
    replay/replay_native_test.dart => package:sentry_flutter => package:ffi => dart:ffi
```

Writing conditional imports just to be able to test stuff is rather cumbersome. 

### Proposal

I have a couple of alternative proposals how running `flutter test` for non-ffi-compatible targets could be improved:

1. add an exclude filter based on files to `flutter test` command
2. exclude files automatically if they contain `@TestOn('vm')`

I'm willing to submit a PR if we agree on a proposal (be it one from above or something else)
Repository: godot
Issue: PathFollow3D Ratio w/ Loop Enabled Incorrectly Sets to 1 When FPS is Capped to 60
Labels: bug,topic:animation,topic:3d

### Tested versions

- Reproducible in v4.3.stable.official [77dcf97d8]

### System information

Godot v4.3.stable - Ubuntu 24.04.1 LTS 24.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (nvidia; 535.183.01) - 12th Gen Intel(R) Core(TM) i9-12900F (24 Threads)

### Issue description

When capturing a video using Godot's movie writer option, I noticed that a platform I animate using a `Path3D` + `RemoteTransform3D` would seemingly disappear on the first frame that it would start to move; but never during normal gameplay without movie writer enabled.

After some digging, the issue seems to be a combination of a few things:

1. A frame rate cap of 60fps (which movie writer enforces, or that can be set using the `application/run/max_fps` setting)
2. The `loop` property of the `PathFollow3D` node being set to `true` (which it is by default)

When both these conditions are met, if the value of the `progress_ratio` property is monitored, you can see that on the first frame that it is beginning to be animated from `0.0` to `1.0` that it jumps to a value of `1.0` before going back down to `~0` and animating as expected:

```
0
0
0
1
0.00666666636243
0.01333333272487
0.01999999955297
0.02666666544974
```

If either of the prerequisites are not met (by either disabling `loop` or removing the FPS cap),  the log will instead read as you'd expect, without the jump to `1.0`:

```
0
0
0
0
0.00537359947339
0.01092915516347
0.01928600110114
0.02484155632555
0.03317489102483
```

When testing this in my main project, it consistently happened every time, in the MRP it seems to sporadically not do it and instead behave as expected, so it seems there may be some chance to it too.

I'm making the assumption, based on `loop` being disabled preventing it from happening is that when the value is being set to `1.0` at the start of the animation that it is some how getting a value slightly below `0` that is then looping back to `1.0`; which may mean the issue is with `AnimationPlayer` rather than `PathFollow3D`.

I feel as though it may have some relation to https://github.com/godotengine/godot/issues/98602 as setting the initial value in the animation player to `0.001` seems to prevent the erroneous value of `1.0` appearing; however, unlike that issue it's not affecting the initial value when the scene loads, it is only later in execution when the ratio is being animated that it happens.


### Steps to reproduce

- Run the MRP and take note of the values logged to the console
- Optionally, if testing with movie writer enabled, move frame by frame through the video and you should see the mesh disappear on the first frame that it begins to animate and immediately return on the next one

### Minimal reproduction project (MRP)

[path_follow_3d_60fps_bug.zip](https://github.com/user-attachments/files/18214320/path_follow_3d_60fps_bug.zip)
Repository: rust
Issue: Bad parse error on token sequences `safe unsafe` and `unsafe safe`
Labels: A-diagnostics,A-parser,T-compiler,D-confusing,D-invalid-suggestion,D-incorrect,D-terse

### Code

```Rust
// #1
unsafe extern {
    safe unsafe fn foo();
    unsafe safe fn bar();
}
// #2
unsafe safe fn baz() {}
safe unsafe fn qux() {}
// #3
unsafe safe extern "C" fn ham() {}
safe unsafe extern "C" fn egg() {}
```

### Current output

```Shell
# example #1:
`safe` must come before `unsafe`: `safe unsafe`
`unsafe` must come before `safe`: `unsafe safe`
# Example #2
items outside an `unsafe extern {...} block may not be annotated with `safe``
`safe` must come before `unsafe`: `safe unsafe`
`unsafe` must come before `safe`: `unsafe safe`
# example #3 is the same as #2
```

### Desired output

```Shell
# Example #1
error: `safe` and `unsafe` are incompatible
note: extern functions are unsafe by default
help: if you want to make this function safe, remove `unsafe`
# Example #2
error: items outside an `unsafe extern {...}` block may not be annotated with `safe`
help: remove `safe`
# example #3
error: items outside an `unsafe extern {...}` block may not be annotated with `safe`
note: extern functions are safe by default
help: remove `safe`
```

### Rationale and extra context

look at the errors for #2 and #3:
```
`safe` must come before `unsafe`: `safe unsafe`
`unsafe` must come before `safe`: `unsafe safe`
```
this means that it *thinks* that the order is incorrect

which is likely because they are both included in the check for order

### Other cases

```Rust
// #1
unsafe safe static FOO: i32 = 42;
unsafe safe const BAR: i32 = 42;
unsafe safe trait Baz {}
unsafe trait _X {}
unsafe safe impl _X for i32 {}
// #2 
unsafe extern {
    unsafe safe static QUX: usize = 42;
    // the rest of the examples just copy pasted
}
```
Output:
```shell
# #1 
items outside an `unsafe extern` blocks cannot be `safe`
# shuffle safe and unsafe like usual
# #2 
# same as 1 but without the 'items outside `unsafe extern` ...'
```
### Rust Version

```Shell
$ rustc --version --verbose
rustc 1.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: x86_64-unknown-linux-gnu
release: 1.83.0
LLVM version: 19.1.1
```

### Anything else?

This is a follow up to [#133586](https://github.com/rust-lang/rust/issues/133586) and [#133631](https://github.com/rust-lang/rust/issues/133630) 

 [#133586](https://github.com/rust-lang/rust/issues/133586) has the PR [#133618](https://github.com/rust-lang/rust/pull/133618) 
(all of the above are closed)
Repository: PowerToys
Issue: New+ creates files/folders shifted to the left of the cursor position, often on the wrong monitor in multi-display setups
Labels: Issue-Bug,Needs-Triage,Product-New+

### Microsoft PowerToys version

0.87.1

### Installation method

GitHub

### Running as admin

No

### Area(s) with issue?

New+

### Steps to reproduce

1. Enable the "new+" feature in PowerToys.
2. Use "new+" to create a new file or folder with a template.
3. Observe that the file or folder is created to the left of the mouse cursor position, often ending up on the adjacent monitor if you have multiple screens.

### ✔️ Expected Behavior

The new file or folder should be created at the exact position of the mouse cursor when the "new+" command is used.

### ❌ Actual Behavior

The new file or folder is created to the left of the mouse cursor's position, and on multi-monitor setups, it may end up on an adjacent screen. This can create confusion as it feels like no file or folder has been created.

### Other Software

Windows 10
Repository: svelte
Issue: Allow snippet to use `animate` directive
Labels: transition/animation

### Describe the problem

This is currently not allowed:

```html
{#snippet test(item)}
    <div animate:flip>{item}</div>
{/snippet}

{#each arr as item (item)}
    {@render test(item)}
{/each}
```

This would be useful if you for instance, make a snippet that renders a list of items;

```html
{#snippet test(item)}
    <div animate:flip>{item}</div>
{/snippet}

{#snippet list(array, itemSnippet)}
    {#each arr as item (item)}
        {@render itemSnippet(item)}
    {/each}
{/snippet}

{@render list(arr, test)}
```

As a practical example; I'm working on a drag-and-drop library [runic-reorder](https://github.com/Refzlund/runic-reorder?tab=readme-ov-file) which utilises above strategy.

This way of working with snippets expands the ease of use for design choices when creating a library.

I bring this up, as I noticed on [Svelte Playground](https://svelte.dev/playground/9936f34beb2e4809b9cb734f0fadfb22?version=5.15.0) that snippets are a lot like regular elements, and attaching `$.animation(div_1, () => flip, null);` within a snippet might be feasable🙏

### Describe the proposed solution

```html
{#snippet test(item)}
    <div animate:flip>{item}</div>
{/snippet}

{#each arr as item (item)}
    {@render itemSnippet(item)}
{/each}
```

or in compiled version words

```js
// snippet
const test = ($$anchor, item = $.noop) => {
    var div = root_1();
    var text = $.child(div, true);

    $.reset(div);
    $.template_effect(() => $.set_text(text, item()));
    $.animation(div, () => flip, null); // this
    $.append($$anchor, div);
};
```

### Importance

would make my life easier
Repository: kubernetes
Issue: [Flaking Test] k8s.io/client-go/tools: cache
Labels: priority/important-soon,sig/api-machinery,kind/flake,triage/accepted

### Which jobs are flaking?

https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-unit/1870087703664529408

### Which tests are flaking?

k8s.io/client-go/tools: cache

### Since when has it been flaking?

I see one failure instance today https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/ci-kubernetes-unit/1870087703664529408 but haven't been able to find others in k8s-triage

### Testgrid link

testgrid.k8s.io/sig-release-master-blocking#ci-kubernetes-unit

### Reason for failure (if possible)

_No response_

### Anything else we need to know?

_No response_

### Relevant SIG(s)

/sig api-machinery
Repository: PowerToys
Issue: When app makes itself full screen, behavior is full screen and window is full screen, but offset is at the zone
Labels: Issue-Bug,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

0.86.0

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

I don't know if this is specific [Windows App](https://apps.microsoft.com/detail/9N1F85V9T8BN?hl=en-us&gl=US&ocid=pdpshare), but that's where I'm seeing it.

When you connect to a cloud PC with this app, the window makes itself full screen. The behavior is correctly full screen, for example alt-tab switches between apps in the VM. And the RDP window size is correctly the size of the screen. But the _offset_ of the window is set to the offset of the zone I last had this window in. So I'm seeing the desktop of the client, and the window gets clipped by the edges of the monitor.

The fix is to right click on the window in the client desktop task bar and click "Restore"

### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: vscode
Issue: Dev notes on using extension services
Labels: debt,extensions

Inspired by https://github.com/microsoft/vscode/issues/236537

I've found it a little confusing to find the right extension service to work with so here are some random notes on things that have tripped me up.

- There are many different services with "extension" in the name, and when I need to do something, it's hard to know where to start.
  - Probably the most common ones are `IExtensionService`, `IExtensionsWorkbenchService`, `IExtensionManagementService`, and I don't fully understand the distinction
- In the above issue, we used `IExtensionManagementService#getInstalled` https://github.com/microsoft/vscode/blob/820447acdc9c613e8c02f74a4c278ec8be5a29f5/src/vs/platform/extensionManagement/common/extensionManagement.ts#L576 to check whether the Copilot extension was installed. This seemed reasonable but it actually returns all local and remote extensions, whether enabled or disabled due to being in the wrong EH. And, it returns them the two sets in random order based on a race. I think this is a serious footgun.
  - And I think we've made the same mistake in other places. If I look at references to `getInstalled` I see a lot of usages. eg I get `@ext:` completions in the settings editor for workspace extensions in a remote window that are only installed locally and not on the remote
  - I think `IExtensionsWorkbenchService#queryLocal` was the right thing to use but there's also `IExtensionService#extensions` and I'm not sure what the difference is
- There are two different types called `IExtension` at https://github.com/microsoft/vscode/blob/820447acdc9c613e8c02f74a4c278ec8be5a29f5/src/vs/workbench/contrib/extensions/common/extensions.ts#L56 and https://github.com/microsoft/vscode/blob/820447acdc9c613e8c02f74a4c278ec8be5a29f5/src/vs/platform/extensions/common/extensions.ts#L309
- The name `queryLocal` and `ILocalExtension` were a little confusing now that "remote extensions" exist

Some things that might help could be some tsdoc on the services and methods that explain when to use them or what exactly they return. Or a .md doc file with a "guide to extensions services" that lays this stuff out.
Repository: PowerToys
Issue: Pressing Alt Gr affects shortcut
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Triage

### Microsoft PowerToys version

0.87.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

1. Remap a shortcut of "`Ctrl(left)` `J` to `Left`"
2. Press `Alt Gr` and `Q` on a German keyboard to input "@"


### ✔️ Expected Behavior

The shortcut should stay effective

### ❌ Actual Behavior

The shortcut becomes ineffective

### Other Software

_No response_
Repository: PowerToys
Issue: New+ is hard to search for in GitHub
Labels: Issue-Docs,Needs-Triage,Product-New+

### Provide a description of requested docs changes

I think New+ is a great name. Very representative of the features in the application.

However, it is terrible to search for in GitHub. When you try searching for `is:issue state:open new+` the search results are the same as for `is:issue state:open new`. Putting it in brackets makes no difference. Most of the issues are regarding novel features, not this particular extension.

Would changing the name for NewPlus or something like it be an improvement? Or is this minor enough for not warranting a change, in face of a great name?
Repository: rust
Issue: MaybeUninit::uninit_array still refers to const as future
Labels: A-docs,T-libs

### Location

https://doc.rust-lang.org/std/mem/union.MaybeUninit.html#method.uninit_array

### Summary

It didn’t catch up on const {} being stabilized. It might now follow up, announcing that this method will be deprecated in edition 2027, or whatever the intention was.
Repository: react
Issue: [DevTools Bug]: Profiling not supported error points to stale documentation link.
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://vercel.com/login

### Repro steps

I opened developer tools and went to the react dev tools profiling tab. There it says "Profiling not supported. Profiling support requires either a development or profiling build of React v16.5+. Learn more at [reactjs.org/link/profiling](https://fb.me/react-devtools-profiling)."

When I follow this URL, the top of the page says, "This site is no longer updated. [Go to react.dev](https://react.dev/blog/2023/03/16/introducing-react-dev)"



### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
Repository: react
Issue: [DevTools Bug]: Profiling not supported error with up-to-date React.
Labels: Type: Bug,Status: Unconfirmed,Component: Developer Tools

### Website or app

https://vercel.com/login

### Repro steps

When I open React Developer Tools profiler page, I get the following error:

```
Profiling not supported.
Profiling support requires either a development or profiling build of React v16.5+.

Learn more at [reactjs.org/link/profiling](https://fb.me/react-devtools-profiling).
```

I first saw the problem on my own app, which is running React 18 and NextJS 15, but was able to reproduce the problem on every other NextJS react page I could find.

I am running Google Chrome 131.0.6778.204 on Fedora 40. My version of React Developer Tools is 6.0.1 (10/15/2024). 

If I test the same conditions, but on Firefox, profiling works, suggesting it is a problem with React Dev Tools.

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_