sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: syscall/js: `ValueOf` should accept `[]js.Value`  and `map[string]js.Value` as analogs of `[]any` and `map[string]any`
Labels: Proposal

`ValueOf` right now converts `js.Value` as `[its value]`.

So I naively assumed I could write this code:
```go
// racyAwait takes in multiple promises and race them against each other using Promise.race
func racyAwait(ctx context.Context, promises ...js.Value) (sucess []js.Value, err error)
  return await(ctx, js.Global().Get("Promise").Call("race", promises))
}
```
However it doesn't, I have to write this instead:
```go
// racyAwait takes in multiple promises and race them against each other using Promise.race
func racyAwait(ctx context.Context, promises ...js.Value) (success []js.Value, err error)
  r := make([]any, len(promises))
  for i, p := range promises {
    r[i] = p
  }
  return await(ctx, js.Global().Get("Promise").Call("race", r))
}
```
This just looks silly, I guess it also have a performance impact but it's not like `syscall/js.ValueOf` is particularly fast anyway.

---

I propose this change to it's behaviour:
```diff
 | Go                     | JavaScript             |
 | ---------------------- | ---------------------- |
 | js.Value               | [its value]            |
 | js.Func                | function               |
 | nil                    | null                   |
 | bool                   | boolean                |
 | integers and floats    | number                 |
 | string                 | string                 |
 | []interface{}          | new array              |
+| []js.Value             | new array              |
 | map[string]interface{} | new object             |
+| map[string]js.Value    | new object             |
```
Repository: next.js
Issue: Dynamic pages stuck on loading.tsx when JavaScript is disabled
Labels: Navigation,Pages Router

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.16.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.3
      eslint-config-next: 13.4.3
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Data fetching (gS(S)P, getInitialProps), Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/relaxed-davinci-o1i9yl?file=%2Fapp%2Fpage.tsx%3A5%2C15

### To Reproduce

Create a page that dynamically fetches some data on every request, either via `export const revalidate = 0` or the `no-store` configuration on fetch.

Set up a global `loading.tsx` in the `app` folder.

Build and run the project.

Disable JavaScript in the web browser and open the dynamic page. The `loading.tsx` page is shown indefinitely.

Note: You can disable JavaScript in Chrome by pressing `F12` to open the Chrome dev tools. Then press `Ctrl + Shift + P` and search for "disable JavaScript".

### Describe the Bug

When you open a dynamic page with JavaScript disabled, you get stuck on the global `loading.tsx` indefinitely.

This also means that this page is effectively invisible to web crawlers, which kills SEO for that page.

### Expected Behavior

The page should be loaded even with JavaScript disabled.

### Which browser are you using? (if relevant)

Google Chrome

### How are you deploying your application? (if relevant)

Locally and on Vercel
Repository: rust
Issue: `error[E0596]: cannot borrow ... as mutable, as it is not declared as mutable` help note is misleading
Labels: A-diagnostics,T-compiler

### Code

```Rust
fn once(it: &mut ()) {
    twice(&mut it)
}
fn twice(_: &mut &mut ()) {}
```


### Current output

```Shell
error[E0596]: cannot borrow `it` as mutable, as it is not declared as mutable
 --> src/lib.rs:2:11
  |
2 |     twice(&mut it)
  |           ^^^^^^^ cannot borrow as mutable
  |
note: the binding is already a mutable borrow
 --> src/lib.rs:1:13
  |
1 | fn once(it: &mut ()) {
  |             ^^^^^^^
help: try removing `&mut` here
  |
2 -     twice(&mut it)
2 +     twice(it)
  |

For more information about this error, try `rustc --explain E0596`.
```


### Desired output

```Shell
error[E0596]: cannot borrow `it` as mutable, as it is not declared as mutable
 --> src/lib.rs:2:11
  |
2 |     twice(&mut it)
  |           ^^^^^^^ cannot borrow as mutable
  |
help: consider changing this to be mutable
  |
1 | fn once(mut it: &mut ()) {
  |         +++

For more information about this error, try `rustc --explain E0596`.
```


### Rationale and extra context

The borrow itself is correct, as it will produce the expected type so the help label is wrong. Instead, the user should be pointed  to add the missing `mut` modifier for the binding.

### Other cases

```Rust
struct S;

impl S {
    fn once(self: &mut Self) {
        Self::twice(&mut self)
    }
    fn twice(_: &mut &mut Self) {}
}

also suffers from this.
```


### Anything else?

_No response_
Repository: storybook
Issue: [Feature Request]: Support for @storybook/server-vite
Labels: feature request,server,builder-vite

### Is your feature request related to a problem? Please describe

I've tried @storybook/server with storybook 7.0.12 + vite, but it seems that there is no support for this nor a vite specific packages. 

### Describe the solution you'd like

@storybook/server-vite to have vite support for storybook/server

### Describe alternatives you've considered

_No response_

### Are you able to assist to bring the feature to reality?

no

### Additional context

_No response_
Repository: vscode
Issue: Merge Editor - sub-optimal indentation when accept combination
Labels: feature-request,merge-editor

```
{
    "languageId": "yaml",
    "base": "\n  - template: templates/stages/publish.yml\n    parameters:\n      customNPMRegistry: ${{ parameters.customNPMRegistry }}\n      environment: Marketplace (no-approval)\n      ghCreateRelease: ${{ parameters.ghCreateRelease }}\n      ghReleaseAddChangeLog: ${{ parameters.ghReleaseAddChangeLog }}\n      isPreRelease: ${{ parameters.usePreReleaseChannel }}\n      nodeVersion: ${{ parameters.nodeVersion }}\n",
    "input1": "\n  - ${{ if eq(variables.publishExtension, 'true') }}:\n    - template: templates/stages/publish.yml\n      parameters:\n        customNPMRegistry: ${{ parameters.customNPMRegistry }}\n        environment: Marketplace (no-approval)\n        ghCreateRelease: ${{ parameters.ghCreateRelease }}\n        ghReleaseAddChangeLog: ${{ parameters.ghReleaseAddChangeLog }}\n        isPreRelease: ${{ parameters.usePreReleaseChannel }}\n        nodeVersion: ${{ parameters.nodeVersion }}\n",
    "input2": "\n  - template: templates/stages/publish.yml\n    parameters:\n      customNPMRegistry: ${{ parameters.customNPMRegistry }}\n      environment: Marketplace (no-approval)\n      ghCreateRelease: ${{ parameters.ghCreateRelease }}\n      ghCreateTag: ${{ variables.ghCreateTag }}\n      ghReleaseAddChangeLog: ${{ parameters.ghReleaseAddChangeLog }}\n      ghTagPrefix: ${{ parameters.ghTagPrefix }}\n      isPreRelease: ${{ parameters.usePreReleaseChannel }}\n      nodeVersion: ${{ parameters.nodeVersion }}\n",
    "result": "\n  - ${{ if eq(variables.publishExtension, 'true') }}:\n    - template: templates/stages/publish.yml\n      parameters:\n        customNPMRegistry: ${{ parameters.customNPMRegistry }}\n        environment: Marketplace (no-approval)\n        ghCreateRelease: ${{ parameters.ghCreateRelease }}\n        ghCreateTag: ${{ variables.ghCreateTag }}\n      ghReleaseAddChangeLog: ${{ parameters.ghReleaseAddChangeLog }}\n        ghTagPrefix: ${{ parameters.ghTagPrefix }}\n      isPreRelease: ${{ parameters.usePreReleaseChannel }}\n        nodeVersion: ${{ parameters.nodeVersion }}\n",
    "initialResult": "\n  - ${{ if eq(variables.publishExtension, 'true') }}:\n    - template: templates/stages/publish.yml\n      parameters:\n        customNPMRegistry: ${{ parameters.customNPMRegistry }}\n        environment: Marketplace (no-approval)\n        ghCreateRelease: ${{ parameters.ghCreateRelease }}\n        ghCreateTag: ${{ variables.ghCreateTag }}\n      ghReleaseAddChangeLog: ${{ parameters.ghReleaseAddChangeLog }}\n        ghTagPrefix: ${{ parameters.ghTagPrefix }}\n      isPreRelease: ${{ parameters.usePreReleaseChannel }}\n        nodeVersion: ${{ parameters.nodeVersion }}\n"
}
```
Repository: flutter
Issue: [go_router] Example for ShellRoute transition
Labels: d: examples,package,has reproducible steps,P3,p: go_router,found in release: 3.10,found in release: 3.11,team-go_router,triaged-go_router

I have the same issue as #121355 but cannot figure out how to apply the solution in the below comment. Can we get a code snippet with the original poster's code with the fix applied?

See _ZoomPageTransition in flutter/lib/src/material/page_transitions_theme.dart.

_Originally posted by @chunhtai in https://github.com/flutter/flutter/issues/121355#issuecomment-1454137345_
Repository: transformers
Issue: Unexpected padding behaviour of `ClapFeatureExtractor`
Labels: Good Difficult Issue

### System Info

- `transformers` version: 4.29.2
- Platform: Linux-4.15.0-204-generic-x86_64-with-glibc2.31
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- Safetensors version: not installed
- PyTorch version (GPU?): 1.13.1+cu117 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help?

@ArthurZucker

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Adding `padding=True` argument to `ClapFeatureExtractor` changes the padding strategy from `repeatpad`, which is the default, to constant padding ([code](https://github.com/huggingface/transformers/blob/04ab5605fbb4ef207b10bf2772d88c53fc242e83/src/transformers/models/clap/feature_extraction_clap.py#L248)).

Code adapted from: https://huggingface.co/docs/transformers/model_doc/clap#transformers.ClapModel.forward.example

```python
from datasets import load_dataset
from transformers import AutoProcessor

# load data
dataset = load_dataset("ashraq/esc50")
audio_sample = dataset["train"]["audio"][0]["array"]

# load data processor
processor = AutoProcessor.from_pretrained("laion/clap-htsat-unfused")

# pre-process data
inputs1 = processor.feature_extractor(audio_sample, return_tensors="pt")
inputs2 = processor.feature_extractor(audio_sample, return_tensors="pt", padding=True)

print((inputs1["input_features"] - inputs2["input_features"]).max())
# Output: tensor(119.4260)
```

This becomes a problem, for instance, when using `ClapProcessor`. `ClapProcessor` shares `kwargs` between the `tokenizer` and the `feature_extractor` ([code](https://github.com/huggingface/transformers/blob/04ab5605fbb4ef207b10bf2772d88c53fc242e83/src/transformers/models/clap/processing_clap.py#LL87C9-L87C9)). When using text inputs of different length, you need to pass `padding=True` argument to the `tokenizer`, but doing so changes the behaviour of the `feature_extractor`.

### Expected behavior

1. Either don't allow `padding=True` argument. Assert its value to be one of the allowed values - `repeatpad`, `repeat`, and `pad` in case of `ClapFeatureExtractor`.
2. Or, use the default padding strategy if `padding=True`.

As for sharing `kwargs`, I don't think that's a good idea. Would having two arguments, `tokenizer_kwargs` and `feature_extractor_kwargs` be better?
Repository: go
Issue: cmd/go: GOAMD64=local to compile for local machine
Labels: Proposal,Proposal-Accepted

### Rational:

I am using `go install` to deploy code to a cluster since the go compiler compiles really fast and this save me from having to manage building and distributing binaries.
It would be nice if I could also take advantage of the small performance gain of newer instructions sets available with `GOAMD64`, `v2` and above however my cluster is made of heterogeneous machines and CPUs which not all support the latest features making it impossible or sub optimal to hardcode a level in my deploy script.

---

### Proposal:

Add `GOAMD64=local` level to the toolchain, the toolchain will at compile-time find what would be the highest compatible micro-architecture level of the compiling host's CPU and compile the binary as usual using the equivalent microarchitecture level.
Thus running `GOAMD64=local go build .` (or other building command) on a compiling host that supports at most `GOAMD64=v2` will produce an identical result as running `GOAMD64=v2 go build .`, same for all architecture levels on CPU that would support at most thoses respectively.

If a command of the toolchain that might be `GOAMD64` dependent for results is invoked with `GOAMD64=local` while the toolchain is built with `runtime.GOARCH != "amd64"` the invocation fails. (`go install`, `go build` ... but not things like `go env` or `go help`)

I am **not proposing** that `GOAMD64=local` become defaults, just that it exists, by default the toolchain will continue to emit `GOAMD64=v1` for `GOARCH=amd64` binaries (even for `go install` as spuriously changing the micro architecture level invalidates different level build caches which would make a `go build .` shortly followed by `go install .` much slower).
Repository: godot
Issue: Window flickering
Labels: bug,platform:windows,topic:rendering,topic:editor,needs testing

### Godot version

4.0.3-stable, I've tested it also on 4.0.2 and 4.0.0

### System information

Windows 10, NVidia 4070 latest drivers 

### Issue description

Only by clicking on the window I get a weird flickering on the screen. It happens even before selecting any project, in the launcher, but it is more apparent opening an empty project. It seems to react to just clicking with the mouse on the screen, but in the end it happens by itself.

https://github.com/godotengine/godot/assets/627698/694dfe93-6423-46ce-a69d-45815731da8d



### Steps to reproduce

Just open the launcher and click on it, you will start seeing black frames
Open an empty project, click in the editor also will give black frames.
Run an empty project, the window will start showing (not responding) in the title as you just click on it

### Minimal reproduction project

No need, it already happens in the launcher. It is more apparent with a full empty project running (check video)
Repository: PowerToys
Issue: FanceZones incompatible with "Activate a window by hovering over it with the mouse"
Labels: Issue-Bug,Product-FancyZones,Priority-2

### Microsoft PowerToys version

0.69.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

* Active FancyZones with a zone with 2 or more zones
* Activate FancyZone option to replace Windows snap feature
* Activate Windows option `Control Panel` -> `Ease of Access` -> `Change How Your Mouse Works` -> `Activate a window by hovering over it with the mouse`
* Try moving a specific window around multiple zones with the hotkeys win + left/right

### ✔️ Expected Behavior

Moved window stays activated and moves around zones with every hotkey activation.

### ❌ Actual Behavior

As soon as the active window moves and thus another window appears under the mouse pointer, the other window steals the window focus and on the next hotkey activation the other window starts to move.

The Windows snap feature alone doesn't have this behavior, when not using FancyZones the activated window stays the same and moves with every hotkey activation. This is the behavior I would expect from FancyZones, too.

### Other Software

Windows 10 Pro 22H2 19045.2846
Repository: next.js
Issue: Incorrect response status code when using NextResponse.rewrite(url, { status }) in middleware
Labels: bug,Runtime

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.12.1
      npm: 8.19.2
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.4-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.5
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/stefee/next-res-status-repro/commit/48b14d833ee8bc546a427b5d5fffd6bb9efbced9

### To Reproduce

Run

```
npm run dev
```

Open the application

### Describe the Bug

Response status code is 200

### Expected Behavior

Response status code should be 403

### Which browser are you using? (if relevant)

N/A

### How are you deploying your application? (if relevant)

next dev, standalone (Docker)
Repository: excalidraw
Issue: adding multiple images at once
Labels: enhancement,good first issue

```[tasklist]
### Tasks
- [ ] drag and drop multiple images
- [ ] file picker
```
Repository: PowerToys
Issue: Remapping shortcut not working in edge
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.69.1

### Installation method

PowerToys auto-update, Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

I have added the shortcut Ctrl (Right) + Shift (Right) + S to Printscreen, and the target app as "msedge".
I have already remapped a shortcut (Win + Shift Left + S) to the key Printscreen.

So when I press Printscreen in msedge, Win + Shift left + S is happening, whereas Ctrl (Right) + Shift (Right) + S is assigned in this target app.

And another observation, Ctrl (Right) + Shift (Right) + S is not working in msedge once it is remapped in powertoys.

### ✔️ Expected Behavior

On pressing Printscreen, it should work as Ctrl (Right) + Shift (Right) + S in MSEdge.

### ❌ Actual Behavior

It not working as above.

### Other Software

_No response_
Repository: pytorch
Issue: No pytorch_android 2.0.x builds
Labels: triaged,module: android,oncall: mobile

Hello,

PyTorch 2.0.0 was released in March, but there is no official build for Android yet. I was wondering if there is any plan to support this platform in the near future. 

Thank you for your time and attention.
Repository: next.js
Issue: App Directory: Unable to Redirect from middleware when having basePath and locales
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.15.0
      npm: N/A
      Yarn: N/A
      pnpm: 7.29.1
    Relevant packages:
      next: 13.4.4-canary.0
      eslint-config-next: 13.4.3
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/alikleit/next-middleware-issue

### To Reproduce

Following the documentation from next internationalization using `App Directory`, with adding a middleware to redirect from the root `/` to a specific locale `/en` . This work perfectly until adding a `basePath` :
```
// next.config.js
const nextConfig = {
  basePath: "/admin",
};
```

Starting the app in dev mode `pnpm dev` and redirect to `/admin`, middleware wont be triggered.

### Describe the Bug

Middleware is not triggered when in the root after setting basePath, with a Next app that uses only App Directory, and localized.

### Expected Behavior

Middleware should trigger on the root of the application using basePath. and redirect to a specifc locale

### Which browser are you using? (if relevant)

Edge

### How are you deploying your application? (if relevant)

_No response_
Repository: storybook
Issue: [Bug]: Measure addon incorrect measurements when zoomed in
Labels: bug,needs triage

### Describe the bug

Storybook 7
React-vite builder

When zooming in on the canvas in storybook, the measure tool doesnt size to match.

![image](https://github.com/storybookjs/storybook/assets/108636059/c11ecfe7-4014-44de-81ea-178d713f9b38)


### To Reproduce

Storybook 7 using react-vite builder, default setup.

### System

_No response_

### Additional context

_No response_
Repository: vscode
Issue: Select previous word in JSON string sometimes also selects `"`, but not always
Labels: bug,json

Type: <b>Bug</b>

Make these two json strings: "??" "N_FP"

For both strings, place the cursor just before the closing `"`.

For both strings, press CTRL+SHIFT+LEFT (also happens without shift).

Notice that for the first string the opening `"` is selected (or without shift, the cursor is moved to before it.)
Notice that for the second string the opening `"` is not selected.

Personally I'd expect the behaviour that the "N_FP" string has also in the "??" case.

VS Code version: Code - OSS 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-17T21:33:46.365Z)
OS version: Linux x64 6.1.29-1-MANJARO
Modes:
Sandboxed: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 899)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|0, 1, 1|
|Memory (System)|15.43GB (7.44GB free)|
|Process Argv|--unity-launch|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|gnome|
|XDG_CURRENT_DESKTOP|GNOME|
|XDG_SESSION_DESKTOP|gnome|
|XDG_SESSION_TYPE|x11|
</details><details><summary>Extensions (11)</summary>

Extension|Author (truncated)|Version
---|---|---
factoriomod-debug|jus|1.1.32
intellij-idea-keybindings|k--|1.5.9
mypy|mat|0.2.3
modestextension|Mod|0.0.9
python|ms-|2023.6.1
jupyter|ms-|2023.3.1201040234
jupyter-keymap|ms-|1.1.0
jupyter-renderers|ms-|1.0.15
vscode-jupyter-cell-tags|ms-|0.1.8
vscode-jupyter-slideshow|ms-|0.1.5
luna-paint|Tyr|0.16.0

(1 theme extensions excluded)

</details>
<!-- generated by issue reporter -->
Repository: go
Issue: x/tools/gopls: file watchers should be reevaluated after load
Labels: gopls,Tools,gopls/metadata

Normally I would just fix this bug, but given our proximity to the v0.12.0 release I'm filing it for later:

When state changes in gopls, we re-evaluate file watchers. Currently, this is done _synchronously_ to the state change processing, via `Server.didModifyFiles->updateWatchedDirectories`.

Problems with this:
- AFAIK there is no need to block change processing on updating watched directories. File watching is always going to be asynchronous, so I don't think we avoid any races by blocking while processing didChange notifications
- we should generally avoid blocking on server->client calls during notification processing, as it can lead to distributed deadlocks in certain clients
- we should `awaitLoaded` before re-evaluating file watches, as `go list` might surface new directories to watch after e.g. a go.mod change. We can't `awaitLoaded` during change processing.