sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tauri
Issue: [bug] If an underscore “_” is used for an argument, the function will not work.
Labels: type: bug,status: needs triage

### Describe the bug

If an underscore is used in the variable name of the argument on the React side, the function on the Rust side will not be called and no error message will be displayed in dev mode.

### Reproduction

App.tsx is here
```
import { useState } from "react";
import { invoke } from "@tauri-apps/api/tauri";
import "./App.css";

function App() {
  const [result, setResult] = useState("");

  async function handleProcess() {
    setResult(await invoke("greet", {
      msg_: "World"
    }));
  }

  return (
    <div>
      <button onClick={() => handleProcess()}>Print</button>
      <p>{result}</p>
    </div>
  );
}

export default App;
```
main.rs is here
```
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

#[tauri::command]
fn greet(msg_: String) -> String {
    format!("Hello {} from Tauri!", msg_)
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
```
It is worth noting that when executing the Rust-side greets function in app.tsx, the argument msg_ is used as input. If the argument name contains underscores, the Rust-side greet function will not be executed. This is the bug.

### Expected behavior

It works even if underscores are included.

### Full `tauri info` output

```text
npm run tauri info

> find_vanity_address@0.1.0 tauri
> tauri info


[✔] Environment
    - OS: Mac OS 13.6.3 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06) (Homebrew)
    ✔ cargo: 1.80.1
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: 
    - node: 18.17.0
    - yarn: 1.22.22
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: 1.7.1
    - tauri-build [RUST]: 1.5.3
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.6.0
    - @tauri-apps/cli [NPM]: 1.6.0

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: PowerToys
Issue: remaping shorcuts
Labels: Needs-Triage

### Description of the new feature / enhancement

Hi!

In remapping keyboard feature, the "action" of a chossen accord shortcut could be with more than only two keys.

In one of my specifc situation I need "ctrl+B+0" to perform a "Bold" text.

Thank you!

### Scenario when this would be used?

Many of my "daily life" shortcuts have more than two keys.

:-)


### Supporting information

_No response_
Repository: go
Issue: proposal: x/exp/xiter: add Nop, Nop2, Value, Value2
Labels: Proposal

### Proposal Details

This could probably go in golang.org/x/exp/xiter for now, but it should also be considered for plain package iter.

Nop yields an empty (no op) sequence. Nop2 yields an empty iter.Seq2. 

```go
// Value return an iter.Seq yielding the single value v.
func Value[T any](v T) iter.Seq[T] {
    return func(yield func(T) bool) {
        _ = yield(v)
    }
}
```

`Value2` isn't a great name, but seems the most straightforward.

See #68931, https://github.com/golang/go/issues/65629 and I forget where iter.Value first came up.
Repository: godot
Issue: the 3D scene isn't rendering
Labels: bug,topic:rendering,needs testing,topic:3d

### Tested versions

- Reproducible in: 4.0 and later 4.3.stable.
- Not reproducible in: 3.5

### System information

windows 10- godot 4.3 cpu(Inter(R) Core(TM) i5-5200U) gpu(intel(R) HD Graphics 5500)-(AMD Radeon R5 M330)

### Issue description

in **godot 4.3** when i create a 3D scene it appear as a black screen
-my **GPU** dose **not** support **vulcan**
-this is in **compatibility mode**
-i faced this problem since **godot 4.0**
![image](https://github.com/user-attachments/assets/2936820f-fea9-4b92-8ee0-74d11c7a388e)

the same problem is when i try to edit an **albedo**
![image](https://github.com/user-attachments/assets/94cbe5e3-7d8a-4706-83de-7fcf94ef70b0)


### Steps to reproduce

the problem appear directly when i open the project

### Minimal reproduction project (MRP)

[new-game-project.zip](https://github.com/user-attachments/files/16661370/new-game-project.zip)
Repository: next.js
Issue: middleware request.cookies.has() fails when route is hit via Link
Labels: bug,Middleware

### Link to the code that reproduces this issue

https://github.com/janson/nextjs-cookies-middlware/tree/main

### To Reproduce

1. deploy project to Vercel
2. visit /
3. visit /demo

### Current vs. Expected behavior

**Expected**

A _single_ console log message, `***** Setting cookie: experiments *****'` is displayed when the cookie is set upon first visiting `/demo`. No repeated message until the cookie is deleted or expired. 

**Current**
Cookie is set several times upon first visiting the `/` page. And again when visiting `/demo`.

<img width="1505" alt="Screenshot 2024-08-19 at 9 23 47 AM" src="https://github.com/user-attachments/assets/42039dc2-c200-47bb-a2d4-a0785aa3decf">


### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6031
  Available memory (MB): 65536
  Available CPU cores: 16
Binaries:
  Node: 20.12.0
  npm: 10.5.0
  Yarn: 1.22.21
  pnpm: 8.6.11
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A
✨  Done in 1.68s.
```


### Which area(s) are affected? (Select all that apply)

Middleware

### Which stage(s) are affected? (Select all that apply)

Vercel (Deployed), Other (Deployed)

### Additional context

* Verified on next.js v14.2.3 and v14.2.5
* Bug also observed with the [official doc's cookie+middleware example](https://nextjs.org/docs/app/building-your-application/routing/middleware#using-cookies)
    * Removing the explicit has/delete/has in L12-14 & wrapping L18-23 in a has() conditional.
Repository: react-native
Issue: [iOS] `accessibilityElementsHidden` does not work if the parent view is `accessible`
Labels: Platform: iOS,Issue: Author Provided Repro

### Description

When a parent view has the `accessible` prop set, VoiceOver reads all the text nodes and accessibility labels of its children even if one of them has a parent with the `accessibilityElementsHidden` / `aria-hidden` prop set.

### Steps to reproduce

1. Open the Expo Snack on an iOS device with Expo Go.
2. Enable VoiceOver (triple press on the power button, if enabled in the settings. Otherwise enable it in Settings > Accessibility > VoiceOver).
3. Verify that VoiceOver reads all three lines in both cases when it should only read "First layout" in the second one, like TalkBack on Android does.

### React Native Version

0.74.5

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
System:
  OS: macOS 14.6.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 536.33 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /opt/homebrew/bin/zsh
Binaries:
  Node:
    version: 21.6.1
    path: ~/.local/share/mise/installs/node/21.6.1/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.local/share/mise/installs/node/21.6.1/bin/npm
  Watchman:
    version: 2024.03.18.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/valou/.local/share/mise/installs/ruby/3.2.3/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11255304
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Users/valou/.local/share/mise/installs/java/adoptopenjdk-17.0.10+7/bin/javac
  Ruby:
    version: 3.2.3
    path: /Users/valou/.local/share/mise/installs/ruby/3.2.3/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
```


### Stacktrace or Logs

```text
N/A
```


### Reproducer

https://snack.expo.dev/@vbriand/voiceover-accessible-bug

### Screenshots and Videos


https://github.com/user-attachments/assets/50c266e2-7906-4c31-b138-090f0038abf1
Repository: pytorch
Issue: torch::tensor function does not work
Labels: needs reproduction,module: cpp,triaged

### 🐛 Describe the bug

~~~
#include <torch/torch.h>

int main(){
    torch::Tensor x = torch::tensor({1,2,3}); 
    return 0;
}
~~~

Standard Exception: tensor.sizes()[0] == (int64_t)init_list_.size() INTERNAL ASSERT FAILED at "../../libtorch/include/torch/csrc/api/include/torch/detail/TensorDataContainer.h":339, please report a bug to PyTorch. Expected a Tensor with size 3 in its first dimension, but got Tensor with size 0 in its first dimension Exception raised from fill_tensor at ../../libtorch/include/torch/csrc/api/include/torch/detail/TensorDataContainer.h:339 (most recent call first)

### Versions

it works before v1.8, does not work after v2.2

cc @jbschlosser
Repository: godot
Issue: `SubViewport` transparent background makes whole viewport transparent when using physical lighting
Labels: bug,topic:rendering

### Tested versions

- Found in 4.2.2.stable.official

### System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970 (NVIDIA; 32.0.15.5585) - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 Threads)

### Issue description

I'm trying to render a 3D object in a `SubViewport` to have that object overlaid on the screen with another 3D scene behind it. However when I enable physical lighting units, set the subviewport's `transparent_bg` to true, and use a `CameraAttributesPhysical`, everything in the subviewport is rendered transparent, not just the background. When using `CameraAttributesPractical`, or when having no camera attributes set at all, it works as intended with the subviewport scene being rendered to the parent `SubViewportContainer` and overlaid on the scene. However, when setting camera attributes to an instance of `CameraAttributesPhysical`, whether it's in a `WorldEnvironment` node, the subviewport's world 3D override, or the camera attributes, the whole subviewport becomes transparent when `transparent_bg` is enabled and is not rendered.

### Steps to reproduce

1. Observe when running the example scene or viewing the `SubViewport`'s inspector in the editor that the sphere is not rendered.
2. Clear the camera attributes in the `WorldEnvironment` node or replace them with an instance of `CameraAttributesPractical`
3. Run the scene or view the inspector for the `SubViewport` and observe that the sphere is rendered

### Minimal reproduction project (MRP)

Example scene:

```
[gd_scene load_steps=4 format=3 uid="uid://djjdj454opky6"]

[sub_resource type="Environment" id="Environment_dldea"]

[sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_ukoa2"]

[sub_resource type="SphereMesh" id="SphereMesh_xfy0c"]

[node name="Main" type="Node3D"]

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_dldea")
camera_attributes = SubResource("CameraAttributesPhysical_ukoa2")

[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true

[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
transparent_bg = true
size = Vector2i(1152, 648)

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(0.851086, 0.379608, -0.362698, 0, 0.690819, 0.723028, 0.525026, -0.615359, 0.587947, 0, 0, 0)
light_temperature = 5800.0
light_angular_distance = 1.0
shadow_enabled = true
sky_mode = 1

[node name="Camera3D" type="Camera3D" parent="SubViewportContainer/SubViewport"]
fov = 37.8493

[node name="MeshInstance3D" type="MeshInstance3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2)
mesh = SubResource("SphereMesh_xfy0c")
```
Repository: go
Issue: x/tools/internal/refactor/inline: a read from a non-address-taken variable should commute with global effects
Labels: NeedsInvestigation,Tools,Analysis,Refactoring

@lfolger reported a suboptimal inliner result of this form:

```go
    var g = foo()

    func f(x, y any) { f2(x, y) }

    // before
    f(complicated(), g)

    // after
    var ( x = complicated(); y = g )
    f2(x, y)
```

In this case, the inliner's effects analysis assumed conservatively that the read from global var g would not commute with the call to complicated(). However, the variable g is not address-taken and is assigned only in its declaration.

The inliner's effects analysis should enumerate all non-address-taken variables (non-exported variables that appear in an lvalue position only in their own declaration) and allow reads of them to commute with global effects such as complicated(), resulting in this more optimal inlining: `f2(g, complicated())`.
Repository: transformers
Issue: `truncate_dim` on `BertModel`
Labels: Feature request

### Feature request

I have a pipeline to finetune an instance of `BertModel`, on a `text-classification` task. 
I would like to use [this new embedding model](https://huggingface.co/aari1995/German_Semantic_V3#usage) as my base embedding now.
As can be seen in the example they provide, they are able to pass different values for `matryoshka_dim` into the `SentenceTransformer` instance through the `truncate_dim` argument.
However, I was not able to do this on the `BertModel` in the following code snippet that I have in my code:

```python
 self.bert_backbone = BertModel.from_pretrained(
            pretrained_model_name_or_path=self.config.embedding_model_file.model_name,
            cache_dir=Path(self.config.embedding_model_file.cache_dir),
        ).to(self.device)
```

And I do not want to use a `SentenceTransformer` instance either as in my training loop I would like to be able to get:

```python
bert_outputs: BaseModelOutputWithPoolingAndCrossAttentions = (
                    self.bert_backbone(
                        input_ids=input_ids, attention_mask=attention_mask
                    )
                )
                bert_logits: Tensor = bert_outputs.last_hidden_state[
                    :, 0, :
                ]  # Take the [CLS] token output
```

and I am not sure if this code would work also with a simple swap to `SentenceTransformer`. In any case, I think that this is a potential parameter that `BertModel` should support, and maybe it does but I am just missing it.

Thanks in advance!

### Motivation

To be able to extend the `BertModel` further

### Your contribution

.
Repository: vscode
Issue: Cannot move cell when change the window.zoomLevel
Labels: bug,notebook-dnd

### Applies To

- [X] Notebooks (.ipynb files)
- [ ] Interactive Window and\/or Cell Scripts (.py files with \#%% markers)

### What happened?

## Issues

- Cannot move cells using drag and drop
  (It is possible to move using `Alt` + `Arrows` )
- It is only possible to move TOP and BOTTOM, but other places is not.

## What I tried

- Reinstall extension
  - no effect
- Uninstall other all extensions
  - no effect
- Delete settings from settings.json
  - It work, and I found that `window.zoomLevel` cause the issue.
  - My setting is `window.zoomLevel = -1`
  - I tried changing the zoom level below (True -> can move, False -> can't move).
    ```python
    {
      -1: False,
      -0.1: False,
      -0: True,
      0: True,
      -0.1: False,
      -1: False,
    }
    ```

## Remarks

I'm Japanese and not good at English.
If you couldn't understand what I want to say, feel free to ask me.


### VS Code Version

バージョン: 1.92.2 (system setup) コミット: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9 日付: 2024-08-14T17:29:30.058Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.19045

### Jupyter Extension Version

v2024.7.0

### Jupyter logs

```shell
Visual Studio Code (1.92.2, attached-container, desktop)
Jupyter Extension Version: 2024.7.0.
Python Extension Version: 2024.12.3.
Pylance Extension Version: 2024.8.1.
Platform: linux (x64).
Workspace folder /projects, Home = /root
```


### Coding Language and Runtime Version

Python v3.10.14

### Language Extension Version (if applicable)

v2024.12.3

### Anaconda Version (if applicable)

_No response_

### Running Jupyter locally or remotely?

Local
Repository: node
Issue: Closing WritableStream from TransformStream causes Node.js process to crash
Labels: web streams

### Version

v20.16.0

### Platform

```text
Linux laptop 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
```


### Subsystem

_No response_

### What steps will reproduce the bug?

I ran this code and my Node.js process crashed with no output:

This causes a crash:
```
import { TransformStream } from "node:stream/web";

const { writable } = new TransformStream();

try {
  let writer = writable.getWriter();
  await writer.write(" ");
  writer.releaseLock();

  writer = writable.getWriter();
  await writer.close();
  writer.releaseLock();

  console.log("Done!");
} catch (err) {
  console.error("Error:", err);
}
```

This doesn't:

```
const stream = new WritableStream();

try {
  let writer = stream.getWriter();
  await writer.write(" ");
  writer.releaseLock();

  writer = stream.getWriter();
  await writer.close();
  writer.releaseLock();

  console.log("Done!");
} catch (err) {
  console.error("Error:", err);
}
```

### How often does it reproduce? Is there a required condition?

If I close the `WritableStream` on the `TransformStream` example without awaiting the `close()` promise then the process will proceed to log `Done!`.

### What is the expected behavior? Why is that the expected behavior?

I figured the stream would close or throw some kind of error if it cannot.

### What do you see instead?

The Node.js process crashes without any thrown errors and doesn't trigger the `beforeExit` or `exit` process events.

### Additional information
I've simplified my code into the reproducible above, that's why I create multiple writers.

_No response_
Repository: next.js
Issue: Using `revalidateTag()` inside dynamic route handler is unstable
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/younes101020/electra-v2/

### To Reproduce

1. Clone the repository
```bash
youyou@youyou:~/electra$ git clone git@github.com:younes101020/Electra-v2.git
```
2. create .env.development file in root directory and past .env.example into it and for TMDB_API_KEY + TMDB_ACCESS_TOKEN env you can retrieve them from https://www.themoviedb.org/settings/api
3. Install dependencies and start dev environment (you need docker compose)
```bash
youyou@youyou:~/electra$ yarn
youyou@youyou:~/electra$ yarn dev
```
4. go to /src/app/api/movie/[sessionid]/[accountid]/[movieid]/rating/route.ts file and replace:
```ts
// Replace this (this code is the only way I've found to fix the initial issue)
await new Promise((resolve) => {
      setTimeout(() => {
        resolve(revalidateTag(`rated:${params.accountid}`));
      }, 3000);
});
// By this
revalidateTag(`rated:${params.accountid}`)
```
5. Go to http://localhost:3000 logged in, click on any movie card image and add/update movies rating

### Current vs. Expected behavior

I expect the cache initiated by the unstable_cache() method to be revalidated each time a movie's score is assigned.

Sometimes the on-demand cache isn't revalidated while the route that executes revalidateTag() is called. I have the impression that the route handler returns a response even before letting revalidateTag() finish the job properly, so I've temporarily wrapped this function in a promise with a fairly long delay.

I think it would be good to return a promise to revalidateTag() instead of nothing once the cache has been revalidated or to run this function in a worker, it wouldn't bother me personally, I would only have to manage the UI with useOptimistic

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023
  Available memory (MB): 7908
  Available CPU cores: 12
Binaries:
  Node: 21.6.0
  npm: 10.8.1
  Yarn: 1.22.21
  pnpm: 9.1.2
Relevant Packages:
  next: 14.2.3 // There is a newer version (14.2.5) available, upgrade recommended! 
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: standalone
```


### Which area(s) are affected? (Select all that apply)

Runtime

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

_No response_
Repository: ollama
Issue: ollama golang client hides API errors
Labels: bug,api

### What is the issue?

While testing ollama in combination with k8sgpt I ran into an issue with ollama queries responding with:

```
invalid character 'p' after top-level value
```

After some hunting I found that the documentation for k8sgpt incorrectly adds a suffix to the ollama baseurl (`http://localhost:11434/v1`). Ollama API was responding with a plaintext HTTP body of `404 Not Found` but I was unablwe to see this in the error message without debugging the ollama go client here:

https://github.com/ollama/ollama/blob/main/api/client.go#L166-L189

Ideally we are able to view both the API response and errorResponse (unmarshal error) to aid in quick debugging. I mocked up a rough diff illustrating what I am talking about:

https://github.com/ollama/ollama/compare/main...dcarrier:ollama:unmarshal-fix?expand=1#diff-aa9bfd1a638fbb706f8e8920297902937011160319d9679add5dca56e5ab8277

That code results in this error message:
```
404 Not Found: invalid character 'p' after top-level value
```

We can also manipulate Error() method of StatusError to clean up the formatting but I am hoping this is enough to get the idea across. Another option is to change the NoRoute handler to respond with a json payload with an Error field. However that feels like a riskier change than the aforementioned.

If this is acceptable I am happy to work on this and open a PR.

Thanks for considering!

### OS

macOS

### GPU

Apple

### CPU

Apple

### Ollama version

v0.3.6