sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Unsized parameters are not flagged in trait definitions
Labels: A-diagnostics,T-compiler,T-types

### Code

```Rust
trait Trait<T: ?Sized> {
    fn method(t: T); 
}
```


### Current output

```Shell
<none>
```


### Desired output

```Shell
A warning that the `?Sized` constraint is useless
```


### Rationale and extra context

Any concrete choice of `T` that's unsized will result in [E0277](https://doc.rust-lang.org/stable/error_codes/E0277.html) when the trait is implemented, so marking it as unsized isn't allowing anything that wasn't already valid. This exact error will appear if `method` has a default implementation.

Similar redundant constructions like comparing unsigned values to 0 are flagged, so I'd expect this to be too. 

### Other cases

_No response_

### Rust Version

```Shell
stable 1.80.1
```


### Anything else?

_No response_
Repository: go
Issue: runtime: consider using batched shuffle in selectgo
Labels: Performance,help wanted,NeedsInvestigation,compiler/runtime

This is a minor optimization opportunity. [runtime.selectgo](https://github.com/golang/go/blob/27093581b2828a2752a6d2711def09517eb2513b/src/runtime/select.go#L121) typically does a shuffle of a fairly small number of channels. https://lemire.me/blog/2024/08/17/faster-random-integer-generation-with-batching/ introduces an optimization for such shuffles. It might be worth incorporating the technique into selectgo. (math/rand/v2 is probably not possible due to backwards compat.)
Repository: rust
Issue: E0382: Add help for fixing a partially moved struct by manual assignment
Labels: A-diagnostics,T-compiler

### Code

```Rust
#[derive(Debug)]
struct A {
    a: String,
    b: String,
}


fn main(){
    let mut a: A = A { a: "test1".to_string(), b: "test2".to_string()};
    std::mem::drop(a.b);
    // A is now partially moved
    // a.b = "fix".to_string(); // fixing the partial move
    dbg!(a); // no error
}
```


### Current output

```Shell
error[E0382]: use of partially moved value: `a`
  --> src/main.rs:13:5
   |
10 |     std::mem::drop(a.b);
   |                    --- value partially moved here
...
13 |     dbg!(a); // no error
   |     ^^^^^^^ value used here after partial move
   |
   = note: partial move occurs because `a.b` has type `String`, which does not implement the `Copy` trait
```


### Desired output

```Shell
error[E0382]: use of partially moved value: `a`
  --> src/main.rs:13:5
   |
10 |     std::mem::drop(a.b);
   |                    --- value partially moved here
...
13 |     dbg!(a); // no error
   |     ^^^^^^^ value used here after partial move
   |
   = note: partial move occurs because `a.b` has type `String`, which does not implement the `Copy` trait
help: reassign a.b to a new value
12 |     a.b = String::default();
   |     ++++++++++++++++++++++++ assigning to a new value returns the struct to a useable state
```


### Rationale and extra context

I was not aware for a long time this was possible. It is not explained in user-facing docs where it would be nice to have, and is often enough since often only the other fields are necessary, or the new owner returns a new value you could replace into this.

Its a more natural way of resolving this compared to using mem::replace before the value is moved.

### Other cases

_No response_

### Rust Version

```Shell
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
binary: rustc
commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23
commit-date: 2024-08-06
host: x86_64-pc-windows-msvc
release: 1.80.1
LLVM version: 18.1.7
```


### Anything else?

I'm not at all sure that "help:" is the correct way of phrasing this, as usually "help:" is used for cases where only one fix exists. Theres many ways to work around this, but i can't recall whether there is any existing phrasing for "have you considered this option?"
Repository: stable-diffusion-webui
Issue: [Feature Request]: Applying Hires fix should keep the original image in the batch gallery
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

I don't have "Always save all generated images" enabled. I generate a batch of images, select some of them to hires fix and only save the ones I like. The hires fixed image replaces the original one in the batch gallery, making it impossible to apply hires fix with different settings on the original one. I want keep the original image in the batch gallery so that it can be hires fixed multiple times. Hires fixed copies should be appended to the list of images in the batch gallery.

### Proposed workflow

1. Don't have "Always save all generated images" option enabled
2. Generate an image
3. Hires fix it using the upscale button in the toolbar under the batch gallery
4. Upscaled image is appended to the list of images in the batch gallery
5. Run the hires fix again on the original image
6. Go to 4.

### Additional information

There is a setting "Save a copy of image before applying highres fix."
1. It only save the images to disk and only if  "Always save all generated images" is enabled
2. "highres fix" is misspelled
Repository: godot
Issue: D3D12: Incorrect OmniLight3D dual paraboloid shadows
Labels: bug,platform:windows,topic:rendering,topic:3d

### Tested versions

- Reproducible in v4.3:stable

### System information

Godot v4.3.stable - Windows 10.0.19045 - d3d12 (Forward+) - dedicated NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 31.0.15.4601) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

### Issue description

In the D3D12 renderer OmniLight3D dual paraboloid shadows seem to be broken: one side of shadow disappear. Vulkan have both sides of shadow.

D3D12 video

https://github.com/user-attachments/assets/30cba27f-3b8d-49b7-8f88-540db0980373

Vulkan video

https://github.com/user-attachments/assets/2331cacd-28fc-401e-a8a7-dda9250d265a

### Steps to reproduce

* Set d3d12 rendering driver in Project Settings
* Create OmniLight3D with dual paraboloid mode and enable shadows
* Check both sides of OmniLight3D

### Minimal reproduction project (MRP)

[d3d12_omni_dualp_shadow.zip](https://github.com/user-attachments/files/16651923/d3d12_omni_dualp_shadow.zip)
Repository: three.js
Issue: [Feature] USDZ and USD loader using TinyUSDZ
Labels: Loaders

### Description

I'd like to share the status of TinyUSDZLoader for three.js, Its a USD loader module in wasm.

![image](https://github.com/user-attachments/assets/4e488520-5e8f-489f-b7aa-f926150c913f)

https://x.com/syoyo/status/1825270359211548719

https://github.com/lighttransport/tinyusdz/tree/dev/sandbox/threejs

## Current status

A mesh with a texture possible.

## Advantage

* (Mostly) Full-featured USDZ support(both supports USDA Ascii and USDC binary) possible. On the contrary, current USDZLoader.js in three.js https://github.com/mrdoob/three.js/blob/dev/examples/jsm/loaders/USDZLoader.js is limited to USDA only.
* Better material/texture support(e.g. loading broader EXR image format possible thanks to TinyEXR(embedded in TinyUSDZ module)
* Portable. No need of SharedArrayBuffers and Atomics(whose are requirement of wasm build of OpenUSD)

## Disadvantage

* Larger WASM size. Roughly 2MB uncompressed, 600kb when compressed.

We still need to implement more stuffs(scene graphs, better reconstruction of material/texture suited for three.js), skinning/animations, etc. But I hope USDZLoader based on TinyUSDZ is the promising way to load USD/USDZ in  three.js. 

### Solution

N/A

### Alternatives

N/A

### Additional context

_No response_
Repository: godot
Issue: Projects using the "compatibility" rendering engine take a few seconds to run now
Labels: bug,platform:windows,topic:rendering,needs testing,regression,performance

### Tested versions

- Reproducible in: v4.3.stable.official [77dcf97d8]
- Not Reproducible in: v4.2.stable.official [46dc277], v4.2.2.stable.official [15073af]

### System information

Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4050 Laptop GPU (NVIDIA; 32.0.15.5599) - 13th Gen Intel(R) Core(TM) i7-13650HX (20 Threads)

### Issue description

When you click the "Run Project" button, or the "Run Current Scene" button, or the "Run Specific Scene" button, then the window for the project will take a few seconds to open. But that's only if the rendering engine is set to compatibility. This makes it slower to playtest, since before 4.3 the project would run almost instantly. And this happens no matter how big or small the project/scene is.

### Steps to reproduce

- Create a new project with "compatibility" as the rendering engine, or take an existing project and switch it to compatibility
- If needed, create an empty scene for the project (it doesn't have to be empty, the scene can be anything)
- Run the project

### Minimal reproduction project (MRP)

[new-game-project.zip](https://github.com/user-attachments/files/16651992/new-game-project.zip)
Repository: godot
Issue: [TRACKER] Direct3D 12 rendering driver issues
Labels: bug,enhancement,platform:windows,topic:rendering,tracker

This is a tracker for issues related to the Direct3D 12 (D3D12) rendering driver.

This issue does **not** track issues specific to ANGLE (the `opengl3_angle` rendering driver, which means OpenGL running over Direct3D).

- See also https://github.com/godotengine/godot/issues/95919.

```[tasklist]
### Bugs
- [ ] https://github.com/godotengine/godot/issues/94251
- [ ] https://github.com/godotengine/godot/issues/95053
- [ ] https://github.com/godotengine/godot/issues/95619
- [ ] https://github.com/godotengine/godot/issues/95767
- [ ] https://github.com/godotengine/godot/issues/98158
- [ ] https://github.com/godotengine/godot/issues/98207
- [ ] https://github.com/godotengine/godot/issues/98527
- [ ] https://github.com/godotengine/godot/issues/101845
```

```[tasklist]
### Enhancements
- [ ] https://github.com/godotengine/godot-proposals/issues/10078
```
Repository: tensorflow
Issue: HLO for TopK oddly casts uint8 input to uint32 before passing to radix sort. 
Labels: stat:awaiting tensorflower,type:bug,comp:ops,2.17

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

TF 2 (HEAD of internal repo)

### Custom code

Yes

### OS platform and distribution

Google-Internal Environment

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

V100 (also reproducible on other GPUs)

### Current behavior?

An Alphabet model invokes `tf.math.top_k` with a tensor of dtype uint8 and shape (1, 1,32768). 
![strange_hlo_text_with_uint32_radix_sort](https://github.com/user-attachments/assets/945af324-b00b-405b-8a68-06b7c33cb1e1)

For this call, XLA ends up calling radix sort. However, the radix sort is sub-optimal because TensorFlow casts the inputs to uint32 (instead of using original dtype uint8). Of course, radix sort is faster across smaller dtypes (with fewer bytes).

> @@(u32[1,32768]{1,0}, s32[1,32768]{1,0}, u8[271871]{0}) custom-call(u32[1,32768]{1,0}, s32[1,32768]{1,0}), custom_call_target="__cub$DeviceRadixSort

I would expect HLO text more like this, where the uint8 inputs are passed directly:

> (u8[1,32768]{1,0}, s32[1,32768]{1,0}, u8[310527]{0}) custom-call(u8[1,32768]{1,0}, s32[1,32768]{1,0}), custom_call_target="__cub$DeviceRadixSort"

We actually use TF indirectly via the jax2tf bridge, and I see this comment in the code hinting that uint8 is incompatible with `tf.math.top_k`:
https://github.com/google/jax/blob/0b87bf48f97ace10c7aee19c8f980788891a2df7/jax/experimental/jax2tf/jax2tf.py#L3167

However, recently, @dimitar-asenov (on XLA GPU) has made some changes to XLA sorting logic that provides support for radix-sorting uint8.

Could `tf.math.top_k` lower to HLO that avoids this up-cast to uint32 before radix sort? I believe this would halve the latency of radix sort for uint8.

### Standalone code to reproduce the issue

```shell
To repro, collect an XProf trace for the following snippet. See attached screenshot for sample trace.


import tensorflow as tf

data = tf.random.uniform(
          shape=(1, 32768),
          minval=0,
          maxval=256,
          dtype=tf.int32,
      )
data = tf.cast(data, tf.uint8)
_, box_indices = tf.math.top_k(data, k=1024)


Or feel free to just find and run my internal experimental `benchmark_tf_top_k_uint8` binary on a machine with a GPU.
```


### Relevant log output

_No response_
Repository: rust
Issue: `single_use_lifetimes`: false positive (suggests unstable anonymous lifetimes in `impl Trait`)
Labels: A-lints,C-bug,D-incorrect,F-lint-single_use_lifetimes

<!--
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.
-->

Consider this code ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9ec3f4e9344318db60186b47cd48e5f0)):

```rust
#[warn(single_use_lifetimes)]

// warning: lifetime parameter `'a` only used once
fn foo<'a>(x: impl IntoIterator<Item = &'a i32>) -> Vec<i32> {
  x.into_iter().copied().collect()
}

fn main() {
  foo(&[1, 2, 3]);
}
```

The warning is issued: ``warning: lifetime parameter `'a` only used once``. However, removing the lifetime as suggested makes code to not compile:

```rust
#[warn(single_use_lifetimes)]

// error[E0658]: anonymous lifetimes in `impl Trait` are unstable
fn foo(x: impl IntoIterator<Item = &i32>) -> Vec<i32> {
  x.into_iter().copied().collect()
}

fn main() {
  foo(&[1, 2, 3]);
}
```

So the compiler contradicts itself.

I suspect `single_use_lifetimes` does not correctly verify whether the compiler feature is available. My understanding is that it will be stabilized in 2024 edition (https://github.com/rust-lang/rust/issues/117587).



### 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.

I tried in the playground by setting "nightly" and  both 2021 and 2024 editions, and the problem is currently still there.
Repository: godot
Issue: Invisible nodes when pasting nodes from unsaved scene.
Labels: bug,topic:editor

### Tested versions

Reproducible in Godot 4.2.2 (Stable)

### System information

Godot v4.2.2.stable - macOS 14.5.0 - GLES3 (Compatibility) - Intel(R) Iris(TM) Plus Graphics OpenGL Engine (1x6x8 (fused) LP - Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz (4 Threads)

### Issue description

When pasting nodes from a newly created and unsaved scene, all nodes except for the root node will be invisible (maybe deleted). When re-adding the same nodes with the same name to the scene, the name will become [name]2 or more.

### Steps to reproduce

1) Click the + on the scene bar to add a new scene.
2) Choose "2D Scene". Works with other nodes as well.
3) Use Command-A to add a new Sprite2D, or use the + button to add a child Sprite2D to the root. Some other nodes work.
4) With only the Sprite2D selected, hold shift and click the root Node2D to select all nodes.
5) Copy them with Command+C
6) Without saving the scene, create a new scene like you did in step 1.
7) In the new scene, use Command+V to paste the nodes.
8) Like you did in step 3, add a new Sprite2D (or other node of the same kind added in step 3). The name with be Sprite2D2. Changing the name to Sprite2D and hitting enter will rename it to Sprite2D2.

https://github.com/user-attachments/assets/56a4855a-90f8-47c0-9c15-a2ac7abecae3



### Minimal reproduction project (MRP)

Just create a new project and follow the steps above.
Repository: vscode
Issue: VS Code crash/freeze my PC [Ubuntu]
Labels: freeze-slow-crash-leak

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?:  It is very random, I'm using Platformio and Ionic extensions. 

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.92.2
- OS Version: Ubuntu 24.04 LTS

Steps to Reproduce :

1. It usually happens when I try to open a project on a disk that is not mounted.

2. I mount the disk, I reopen the project from "Open Folder" and while it is loading sometimes my PC freezes. When this happens, the mouse stops responding and if I have playing a video, for example on YouTube in the Brave browser, the sound keeps repeating in a loop for only a very small fragment, I estimate of a few ms.

3. When I reset the PC and try to mount the disk where I have the projects, I can't because it says it has errors and I have to repair it to be able to mount it again.

![Captura desde 2024-08-18 20-39-02](https://github.com/user-attachments/assets/b19d8124-7226-43df-ae81-2b831151cd91)

4. This has been happening to me for quite some time, about more than a year, with versions prior to the one reported here and with different PCs. On both PCs I have Ubuntu and I use nVidia video cards with the corresponding proprietary driver.

5. Attached the log from the .config/Code/logs folder.
[20240818T203627.zip](https://github.com/user-attachments/files/16653357/20240818T203627.zip)

6. I have tried forcing the bug under exactly the same conditions when I forget to mount the disk in one case with the extensions disabled and in another enabled but I couldn't reproduce it again.

Any extra information I can get I will post again
Repository: TypeScript
Issue: `getTextOfJSDocComment` introduces a space in JSDoc comments
Labels: Bug,Help Wanted,Domain: JSDoc

### 🔎 Search Terms

getJSDocTags
getTextOfJSDocComment

### 🕗 Version & Regression Information

Tested on 5.5.4, also existed on previous versions. 


### ⏯ Playground Link

https://stackblitz.com/edit/gettextofjsdoccomment-dbm6rj?file=main.ts,package-lock.json

### 💻 Code

```ts
import ts from 'typescript';

const filename = 'example.ts';
const code = `
/** 
 * 
 * @see {@link entry()}
 */
class Foo  {};
`;

const sourceFile = ts.createSourceFile(
  filename,
  code,
  ts.ScriptTarget.ESNext,
  true
);

const visitNode = (node: ts.Node) => {
  ts.forEachChild(node, visitNode);
  const tags = ts.getJSDocTags(node);
  if (tags.length) {
    tags.forEach((tag) => {
      const comment = tag.comment!.slice(1) as any;

      console.log(
        tag.tagName.getText(),
        '> ',
        ts.getTextOfJSDocComment(comment)
      );

      //console.log(comment);
    });
  }
};

ts.forEachChild(sourceFile, visitNode);
```


### 🙁 Actual behavior

`getTextOfJSDocComment` returns `{@link entry ()}`. Notice the space inbetween. 

### 🙂 Expected behavior

`getTextOfJSDocComment` returns `{@link entry()}`. Notice the space inbetween. 

### Additional information about the issue

This is a variation of #58584. 

Also noticed it happened with `{@link core/inject}` becoming `{@link core /inject}`
Repository: pytorch
Issue: DISABLED test_device_mode_ops_sparse_mm_reduce_cpu_float16 (__main__.TestDeviceUtilsCPU)
Labels: triaged,module: flaky-tests,skipped,module: unknown

Platforms: asan, linux, mac, macos, win, windows

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_device_mode_ops_sparse_mm_reduce_cpu_float16&suite=TestDeviceUtilsCPU&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/28915224686).

Over the past 3 hours, it has been determined flaky in 30 workflow(s) with 90 failures and 30 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_device_mode_ops_sparse_mm_reduce_cpu_float16`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.



<details><summary>Sample error message</summary>

```
Traceback (most recent call last):
  File "C:\actions-runner\_work\pytorch\pytorch\test\test_utils.py", line 1164, in test_device_mode_ops
    for sample in samples:
  File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\testing\_internal\common_utils.py", line 388, in __next__
    input_idx, input_val = next(self.child_iter)
  File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\utils\_contextlib.py", line 36, in generator_context
    response = gen.send(None)
  File "C:\actions-runner\_work\pytorch\pytorch\build\win_tmp\build\torch\testing\_internal\common_methods_invocations.py", line 1227, in sample_inputs_sparse_mm_reduce
    torch.eye(m, m)
RuntimeError: Please register PrivateUse1HooksInterface by `RegisterPrivateUse1HooksInterface` first.

To execute this test, run the following from the base repo dir:
    python test\test_utils.py TestDeviceUtilsCPU.test_device_mode_ops_sparse_mm_reduce_cpu_float16

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0
```

</details>


Test file path: `test_utils.py`

cc @clee2000
Repository: godot
Issue: `StreamPeerBuffer` fails to return only a part of the string previously stored on it
Labels: discussion,topic:core

### Tested versions

- Reproducible in: 4.3.stable

### System information

Godot v4.3.stable - macOS 14.6.1 - GLES3 (Compatibility) - Intel(R) Iris(TM) Plus Graphics OpenGL Engine - Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz (8 Threads)

### Issue description

If you put a string or an utf8 string in a `StreamPeerBuffer` and then you try to get just a part of it you will get an empty or corrupted string.

### Steps to reproduce

Here is a small script to reproduce the issue.
```gdscript
extends Node


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	var buff = StreamPeerBuffer.new()
	buff.put_string("Hello, World!!!")
	buff.seek(0)
	print("->" + buff.get_string(5) + "<-")
	
	buff.clear()
	buff.put_utf8_string("Hello✩, World✩!!!")
	buff.seek(0)
	print("->" + buff.get_utf8_string(8) + "<-")
```

This script will print:
```
-><-
-><-
```


### Minimal reproduction project (MRP)

[streampeerbuffergetpartialstringbug.zip](https://github.com/user-attachments/files/16654388/streampeerbuffergetpartialstringbug.zip)