sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: PackedStringArray.to_byte_array creates an array of pointers, not values
Labels: bug,topic:core

### Godot version

4.0.beta1

### System information

macOS 12.5.1 arm64

### Issue description

Calling `to_byte_array` on `PackedStringArray` produces a byte representation of the internal pointers used to manage the strings in PackedStringArray, rather than the string data itself.

This is… interesting, as it demonstrates that `PackedStringArray` isn't really a "packed string array" at all. It's not a packed array of strings, it's a regular old array of pointers that can themselves be pointing anywhere in memory.

I've been working on a patch that will allow easy conversion to and from a true packed array of strings (with various encodings), separated by NULLs, but the more I work on it, the more I think that this isn't a good way of doing things. For one thing, Godot has a [canonical way of encoding variable-length data](https://github.com/godotengine/godot/blob/92bcd3c01d5188480793c03b2b50e97363ceb624/core/io/marshalls.h#L215), and this isn't it.

`PackedStringArray` seems like a bit of an odd duck among the `PackedXArray` classes. It's the only one that stores variable-length data, and the only one that stores it out-of-line. It feels like most of the time it should probably be a `TypedArray<String>` instead, or a plain old `Vector<String>` when not exposed to the API directly. But it's probably too late to make that change now.

At the very least, `PackedStringArray.to_byte_array` should not be defined in the API.

### Steps to reproduce

1. Create a GDScript file.
2. Create a PackedStringArray, populated with some values.
3. Call `to_byte_array` on that array.
4. Print the result.

You will see the result has exactly eight values for each string, containing apparently random bytes, instead of the bytes representing the characters in the strings.

### Minimal reproduction project

[PackedStringArrayBugDemo.zip](https://github.com/godotengine/godot/files/9662309/PackedStringArrayBugDemo.zip)
Repository: go
Issue: bytes: bytes.Clone(), using copy is faster than append.
Labels: Performance,NeedsInvestigation

```go
// default
func clone(b []byte) []byte {
	if b == nil {
		return nil
	}
	return append([]byte{}, b...)
}

// fast
func cloneV2(b []byte) []byte {
	if b == nil {
		return nil
	}
	nb := make([]byte, len(b))
	copy(nb, b)
	return nb
}

// normal
func cloneV3(b []byte) []byte {
	if b == nil {
		return nil
	}
	nb := make([]byte, 0, len(b))
	return append(nb, b...)
}

var toTestB = []byte("JFIOSJFOISJFOIAJFKSDFSDlkadjfskfdskdfj31231111111111111111111111111111111111111111111")

func Benchmark_clone(b *testing.B) {
	for i := 0; i < b.N; i++ {
		clone(toTestB)
	}
}

func Benchmark_cloneV2(b *testing.B) {
	for i := 0; i < b.N; i++ {
		cloneV2(toTestB)
	}
}

func Benchmark_cloneV3(b *testing.B) {
	for i := 0; i < b.N; i++ {
		cloneV3(toTestB)
	}
}
```

Benchmark_clone
Benchmark_clone-6   	35159740	        74.59 ns/op	      96 B/op	       1 allocs/op

Benchmark_cloneV2
Benchmark_cloneV2-6   	43229692	        59.33 ns/op	      96 B/op	       1 allocs/op

Benchmark_cloneV3
Benchmark_cloneV3-6   	39171712	        71.48 ns/op	      96 B/op	       1 allocs/op
Repository: vscode
Issue: Code action widget accessibility strangeness
Labels: ux,accessibility,polish,editor-code-actions

![Recording 2022-09-28 at 09 13 49](https://user-images.githubusercontent.com/900690/192712837-0eee8b18-fe59-4cde-adf1-ed7b092598ad.gif)

I find it a bit strange that hovering over entries in the list puts the blue focus color and then pressing enter seems to take the element under the mouse. I think that is not very accessible or expected, I would have rather expected the blue element to stay stable and only change with keyboard up/down. Compare with quick open for example!




//cc @isidorn @daviddossett
Repository: godot
Issue: Making SceneTree dock floating removes ability to use certain shortcuts in the editor viewport (2D/3D)
Labels: bug,topic:editor,needs testing,topic:input

### Godot version

4.0 92bcd3c

### System information

Win 10

### Issue description

Because the canvas/3d viewport uses the shortcuts of the SceneTreeDock for some actions, like add child node, or delete node, when you make this window floating those actions stop working because shortcuts do not propagate to the sub window - which I think is correct behaviour (?).

This might be a good reason to duplicate those shortcuts on the canvas item editor or 3d node editor so they do not depend on the SceneTreeDock.

This may also help resolve issues like https://github.com/godotengine/godot/issues/66511 and https://github.com/godotengine/godot/issues/63804, because then Add Node/Delete Node would not need to be global shortcuts, so would not be triggered by usages in unexpected places.

### Steps to reproduce

* Create scene, add node.
* Make SceneTree panel floating
* Try use Delete to delete node, or Ctrl+A to add child node.
* Doesn't work

### Minimal reproduction project

Editor only
Repository: rust
Issue: Type inference does not propagate back to {float} associated functions
Labels: C-enhancement,A-inference,T-types

I tried this code ([playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=7a122b478e41a0aa7aa89310700682f2)):

```rust
fn main() {
    let r = 1.0;
    let _ = r.sqrt();
    let _ = r == 0_f32;
}
```

I expected rustc to infer the type of r as f32 based on the last line.

Instead, rustc failed to compile my program:

```
error[E0689]: can't call method `sqrt` on ambiguous numeric type `{float}`
 --> src/main.rs:3:15
  |
3 |     let _ = r.sqrt();
  |               ^^^^
  |
help: you must specify a type for this binding, like `f32`
  |
2 |     let r: f32 = 1.0;
  |          +++++
```

In most cases, type inference works both forwards and backwards, so why didn't it work here?

This is similar to #24124, but with an even stronger reason to feel the code should work. #99405 may also be related.
Repository: vscode
Issue: Search tree - selected item should be kept in the viewport
Labels: bug,search,confirmed

Testing #161849

* View search results as a list
* Run a search that has many hits so that there is a vertical scrollbar
* Scroll down to the bottom and select one of the hits from the bottom of the screen
* Switch to viewing the results as a tree

**Expected:** Selected item is in the viewport
**Actual:** Selected item is not in the viewport
Repository: next.js
Issue: Anchor navigation work not correctly when update page.
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

{
  "next": "12.3.2",
   "react": "18.2.0",
   "react-dom": "18.2.0"
}

### What browser are you using? (if relevant)

Chrome

### How are you deploying your application? (if relevant)

1. Install packages

```bash
npm install
# or
yarn install
```

2. Run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.


### Describe the Bug

Page jumping when reload page.

See on video here:


https://user-images.githubusercontent.com/9007595/192767763-0b2eaa6d-a593-4e5d-810d-a50e76273ebc.mov



### Expected Behavior

Page should scroll to blue block with id anchor (blue block) without jumping. 

### Link to reproduction

https://github.com/nickorsk2017/next-anchor-bug

### To Reproduce

1. Install and run next.js project (see readme repository)
2. Open http://localhost:3000/#apps
3. Scroll page to top.
4. Reload page
Repository: stable-diffusion-webui
Issue: RX 570 No usage by the AI, CPU does the lifting
Labels: asking-for-help-with-local-system-issues

When I try to use the ai, i get it all launched in web, but it only uses my cpu. I followed the instructions to install it on linux [here](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs) but still didnt work.

OS: Ubuntu 22.04.1 LTS
Repository: next.js
Issue: Middleware rewrite unexpectedly adds query parameter
Labels: bug,Middleware

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```
Binaries:
  Node: 14.20.0
  npm: 6.14.17
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 13.0.1-canary.0
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
```

### Describe the Bug

When using version 12.2 or higher, rewrites from middleware will add a query parameter when linking to a dynamic route. It doesn't add the parameter when visiting a url directly.

For a dynamic route that's defined as `/pages/[...page].js`, the parameter that's added will be `?page=…`.

### Expected Behavior

No query parameter is added; client-side navigations work the same as server-side page loads.

### Link to reproduction

https://github.com/luukdv/next-bug-2

### To Reproduce

- Clone https://github.com/luukdv/next-bug-2
- Run `npm i && npm start`
- Open http://localhost:3000
- Click "Visit this link"
- The expected url is `/pages/test/` instead of `/pages/test/?page=test`
Repository: PowerToys
Issue: activation shortcut not working
Labels: Issue-Bug,Product-PowerToys Run,Area-Quality,Needs-Repro

### Microsoft PowerToys version

0.62.0

### Running as admin

- [ ] Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

press keyboard shortcut keys to activate or show powertoys run search window

### ✔️ Expected Behavior

search window should appear

### ❌ Actual Behavior

nothing happens. search window is not shown. very rarely search window shows up. additionally, I checked the 'Use Centralized keyboard hook' but that did not solve this problem.

### Other Software

_No response_
Repository: angular
Issue: PWA service worker: ignoreSearch=true is super slow in Chrome browser
Labels: area: service-worker,P3

### Which @angular/* package(s) are relevant/related to the feature request?

service-worker

### Description

When using ignoreSearch=true my Angular app became extremly slow showing image galleries, but only for my Chrome users. I have SAS tokens in the query params, who changes frequently. Unfortunately it is a very old known problem (Ref.: https://bugs.chromium.org/p/chromium/issues/detail?id=682677). hash for full url are saved in index, so when using ignoreSearch=true, every index needs to be checked, not effective and gives poor performance.

E.g. of datagroup
`"dataGroups": [
    {
        "name": "dynamicResources",
        "urls": [
            "**XXX/**"
        ],
        "cacheConfig": {
            "maxSize": 2000,
            "maxAge": "30d",
            "strategy": "performance"
        },
        "cacheQueryOptions": {
            "ignoreSearch": true
        }
    }
]`

### Proposed solution

Is it possible to create an option which causes the query parameters in urls for data groups to be completely ignored, so they are stored without and retrieved without and we keep the good performance?

### Alternatives considered

If not an option, then a workaround where you can overwrite ngsw-worker.js until Chrome is fixed.
Repository: godot
Issue: Multiple editors open crash on debugging scene
Labels: bug,topic:rendering,topic:thirdparty,needs testing,crash

### Godot version

Godot Engine v4.0.beta1.official (20d6672846b3fd1537603ac080116dcc914c10e3)

### System information

Arch Linux - Vulkan API 1.2.0 - Using Vulkan Device # 1: NVIDIA - NVIDIA GeForce MX450

### Issue description

I'm working on a Authoritative Multiplayer server implementation, to that end I currently have 4 projects:
- Game server
- Authentication server
- Gateway
- Game client

When running the Authentication Server and Gateway, and trying to run the Game client, debugging crashes with the following report:
```
ERROR: Can't create buffer of size: 24, error -2.
   at: _buffer_allocate (drivers/vulkan/rendering_device_vulkan.cpp:1348)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta1.official (20d6672846b3fd1537603ac080116dcc914c10e3)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x38a00) [0x7efce8b9ea00] (??:0)
[2] /usr/lib/libnvidia-glcore.so.515.76(+0x12528f2) [0x7efcd18528f2] (??:0)
[3] /usr/bin/godot4() [0x18a698f] (??:0)
[4] /usr/bin/godot4() [0x18a731d] (??:0)
[5] /usr/bin/godot4() [0x416240d] (??:0)
[6] /usr/bin/godot4() [0x3b814a4] (??:0)
[7] /usr/bin/godot4() [0xaab6bc] (??:0)
[8] /usr/bin/godot4() [0x3aa83d0] (??:0)
[9] /usr/bin/godot4() [0xabd250] (??:0)
[10] /usr/bin/godot4() [0xac3e08] (??:0)
[11] /usr/bin/godot4() [0xa7d53c] (??:0)
[12] /usr/lib/libc.so.6(+0x23290) [0x7efce8b89290] (??:0)
[13] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7efce8b8934a] (??:0)
[14] /usr/bin/godot4() [0xa88121] (??:0)
-- END OF BACKTRACE --
================================================================
```

Note 1: if I run the authentication and gateway directly from the directory without launching the editor, the client editor can actually debug.

Note 2: I can confirm this happens with whichever combination of open editors, not exclusively the ones mentioned before.

### Steps to reproduce

- Open a first project in the editor and run it
- Open a second project in the editor and run it
- Open a third project in the editor and run it

### Minimal reproduction project

_No response_
Repository: vscode
Issue: Back to back dialogs when I accept merge with unhandled conflicts
Labels: polish,merge-editor

Testing #161833

This is the first dialog I see when I accept merge with unhandled conflicts

![image](https://user-images.githubusercontent.com/10746682/192798360-c3bb308a-1108-4b6f-a542-b1869b3e69db.png)

When I accept merge, I see following dialog which I think is not necessary

![image](https://user-images.githubusercontent.com/10746682/192798476-c8999439-9e51-408e-9b25-7a6334b32794.png)

Pressing Cancel button in the second dialog leaves merge editor open which does not makes sense
Repository: pytorch
Issue: JIT fails to trace `sparse.mm` with a strange error
Labels: oncall: jit

### 🐛 Describe the bug

JIT fails to trace `sparse.mm` with a strange error. It says that "RuntimeError: Unsupported value kind: Tensor"

```py
import torch

class M(torch.nn.Module):
    def __init__(self):
        super().__init__()
        mat1_tensor = torch.randint(0, 1, [20, 1], dtype=torch.int32)
        mat1 = mat1_tensor.to_sparse()
        self.mat1 = mat1

    def forward(self, mat2):
        return torch.sparse.mm(self.mat1, mat2, )

mat2_tensor = torch.rand([1, 20], dtype=torch.float32)

f = M()
torch.jit.trace(f, mat2_tensor)
```

```
RuntimeError: Unsupported value kind: Tensor
```

### Versions

```
Collecting environment information...
PyTorch version: 1.13.0.dev20220923+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.9.13 (main, Aug 25 2022, 23:26:10)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.19.5-051905-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 515.65.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.3
[pip3] torch==1.13.0.dev20220923+cu116
[pip3] torchaudio==0.13.0.dev20220923+cu116
[pip3] torchvision==0.14.0.dev20220923+cu116
[conda] numpy                     1.23.3                   pypi_0    pypi
[conda] torch                     1.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchaudio                0.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchvision               0.14.0.dev20220923+cu116          pypi_0    pypi
```
Repository: vscode
Issue: Simpler dialog to accept content with merge conflicts
Labels: polish,merge-editor

Testing #161833

Current we show following dialog to accept contents with merge conflicts

![image](https://user-images.githubusercontent.com/10746682/192798360-c3bb308a-1108-4b6f-a542-b1869b3e69db.png)

Following dialog is shown by Git extension during the same

![image](https://user-images.githubusercontent.com/10746682/192799308-8619d43f-d409-4e86-bad6-bb50e285127e.png)

I liked the second dialog more and simpler. It is simple if the question is  **Are you sure you want to accept content.ts with merge conflicts?**
Repository: pytorch
Issue: `vector_norm` will trigger "Tracing failed sanity checks" for JIT when ord is boolean tensor
Labels: oncall: jit

### 🐛 Describe the bug

`vector_norm` will trigger "Tracing failed sanity checks" for JIT when ord is boolean tensor

```py
import torch

def f(A):
    ord = torch.tensor(True, dtype=torch.bool)
    return torch.linalg.vector_norm(A, ord=ord, )

A = torch.tensor(1.0, dtype=torch.float64)

torch.jit.trace(f, A)
```

```
torch.jit._trace.TracingCheckError: Tracing failed sanity checks!
encountered an exception while running the trace with test inputs.
```

### Versions

```
Collecting environment information...
PyTorch version: 1.13.0.dev20220923+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.9.13 (main, Aug 25 2022, 23:26:10)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.19.5-051905-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 515.65.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.23.3
[pip3] torch==1.13.0.dev20220923+cu116
[pip3] torchaudio==0.13.0.dev20220923+cu116
[pip3] torchvision==0.14.0.dev20220923+cu116
[conda] numpy                     1.23.3                   pypi_0    pypi
[conda] torch                     1.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchaudio                0.13.0.dev20220923+cu116          pypi_0    pypi
[conda] torchvision               0.14.0.dev20220923+cu116          pypi_0    pypi
```
Repository: vscode
Issue: Open in Merge Editor button shall always remove the conflict markers
Labels: feature-request,merge-editor

Testing #161833

1) Create conflicts
2) Open conflicts file
3) Open in Merge editor (file becomes dirty)
4) Close the original conflicts file (do not save)
5) Open the conflicts file again
6) Open in Merge editor
🐛 Conflict markers are not removed. I would expect Merge editor opens as in 3rd step
Repository: vscode
Issue: Show Codelens to accept incoming and accept current and accept both in result file
Labels: feature-request,merge-editor

Testing #161833

![image](https://user-images.githubusercontent.com/10746682/192802279-5d26bde1-c114-464c-9cf2-67c2221a4ca3.png)
Repository: vscode
Issue: Show a dialog before opening merge editor
Labels: under-discussion,merge-editor

Testing #161833

When user clicks Open in Merge Editor button, it would be helpful for the user to show an info dialog that this will recompute/removes/make the result file dirty so that user knows what is happening.
Repository: PowerToys
Issue: Direct shortcut to single tools (right click on PowerToys icon)
Labels: Needs-Triage

### Description of the new feature / enhancement

A right click on the PowerToys icon would reveal a list of all tools available. This could be either the icon on the taskbar or in the try area.

### Scenario when this would be used?

I do know that certain tools exsits but I do forget the shortcut, since I don't use the so often.
Right know I search for PowerToys, open it, search for the tool, look up the shortcut, use the shortcut, and forget the shortcut immediately again.
In this case, it would reduce time and clicks if it would be possible to choose and trigger the tool directly from a list. That way I don't have to forget the shortcut (`cause I could have never known it in the first place)

### Supporting information

_No response_
Repository: rust
Issue: Spurious and incorrect "irrefutable `if let` pattern" warning in the presence of or-patterns
Labels: A-diagnostics,T-compiler,L-irrefutable_let_patterns

The following program:
```rust
fn main() {
    let x: Result<i32, i32> = Ok(42);
    if let Ok(_) | Err(_) = x {}
}
```
...compiles successfully, but produces a warning:
```
warning: irrefutable `if let` pattern
 --> src/main.rs:3:8
  |
3 |     if let Ok(_) | Err(_) = x {}
  |        ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(irrefutable_let_patterns)]` on by default
  = note: this pattern will always match, so the `if let` is useless
  = help: consider replacing the `if let` with a `let`
```
..however, following the warning's advice to replace the `if let` with a `let`, resulting in the following program:
```rust
fn main() {
    let x: Result<i32, i32> = Ok(42);
    let Ok(_) | Err(_) = x;
}
```
..results in compilation failing with the following error:
```
error: top-level or-patterns are not allowed in `let` bindings
 --> src/main.rs:4:9
  |
3 |     let Ok(_) | Err(_) = x;
  |         ^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(Ok(_) | Err(_))`
```
In the future, if/when top-level or-patterns are allowed in `let`, then this warning would be correct. However, for the moment, this warning is mistaken, and should either not be emitted or should suggest the version wrapped in parentheses.
Repository: svelte
Issue: [Bug] Nested mount transition with onMount state update causes double render
Labels: transition/animation

### Describe the bug

1. I was making a page `Transition` component using `fly` transition to make pages fly in and out when user navigates.
2. I re-used that component inside one of my pages to animate some content.
3. I added `onMount` hook to the `Transition` component that checks if user prefers reduced motion and disables animation
4. Now If I reload browser window on a page that has nested `Transition` components, page's contents are rendered twice.

### Reproduction

https://codesandbox.io/s/spring-star-qllh4m?file=/App.svelte

### Logs

_No response_

### System Info

```shell
System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 113.00 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.14.0 - /usr/local/bin/node
    npm: 8.3.1 - /usr/local/bin/npm
  Browsers:
    Firefox Developer Edition: 105.0
```


### Severity

annoyance