sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tauri
Issue: [bug] Calling get_focused_window after checking is_maximized for undecorated window cause the app to freeze
Labels: type: bug,platform: macOS,status: needs triage

### Describe the bug

I noticed that if I call `get_focused_window` after checking if the main window is maximized using (`is_maximized`) causes the app to freeze.

I'm not sure what exactly is happening, but for some reason it is only reproducible if the window decorations value is false.

The issue does not appear in the following cases:
- If I make decorations true.
- If I remove `window.is_maximized()`
- If I remove`app.get_focused_window()`
- If I add delay before I call `app.get_focused_window()`

### Reproduction

Check this repo for a reproducible example: [test_get_focused_window](https://github.com/diana96alazzam/test_get_focused_window) 

### Expected behavior

Should return window or None

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 21.6.1
    - pnpm: 9.5.0
    - yarn: 1.22.21
    - npm: 10.8.1

[-] Packages
    - tauri [RUST]: 1.7.1
    - tauri-build [RUST]: 1.5.3
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - tauri-cli [RUST]: 2.0.0-beta.17
    - @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: tauri
Issue: [bug] when multiple monitors have `different scaling` settings, the window cannot switch correctly between monitors
Labels: type: bug,platform: Windows,status: needs triage

### Describe the bug


![image](https://github.com/user-attachments/assets/d606e0ed-d75e-4007-92e7-f1053554a717)
+ monitor 1
![image](https://github.com/user-attachments/assets/b85469a6-d327-4548-86de-a1e9d5fa4c99)
+ monitor 2
![image](https://github.com/user-attachments/assets/03472d5c-561e-4911-9dbb-5e7ea1364d7e)

when multiple monitors have `different scaling` settings, the window cannot switch correctly between monitors

### Reproduction

 when multiple monitors have `different scaling` settings, using <kbd>windows</kbd> + <kbd>shift</kbd> + <kbd>Arrow</kbd> to move a window to another screen, the window does not move correctly to the second screen.

https://github.com/user-attachments/assets/895877fb-ce2e-4517-8407-23ebb8d00dd1

### Expected behavior

The window should move correctly to another screen.

### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 126.0.2592.87
    ✔ MSVC: Visual Studio ���ɹ��� 2022
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.11.0
    - pnpm: 8.6.3
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.7.1
    - tauri-build [RUST]: 1.5.3
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - tauri-cli [RUST]: 1.6.0
    - @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: neovim
Issue: File doesn't preserve creation time (Birth) on save when `writebackup` is on
Labels: bug-vim,io,filesystem

### Problem

When you save a file while `writebackup` is on, it will not preserve the creation time (Birth).

You can confirm this via `stat /path/to/file`

### Steps to reproduce

Ensure `writebackup` is on, then:

`stat /path/to/file`
`nvim /path/to/file`
`:write`
`stat /path/to/file`

### Expected behavior

It should preserve the file creation time regardless of whether `writebackup` is on or off.

### Neovim version (nvim -v)

v0.11.0-dev-398+g45b7a2c50

### Vim (not Nvim) behaves the same?

yes, vim 9.1.0532-1

### Operating system/version

6.9.7-arch1-1

### Terminal name/version

kitty 0.35.2

### $TERM environment variable

xterm-kitty

### Installation

Arch User Repository (AUR)
Repository: pytorch
Issue: Setting `shape` and `dtype` without `dtype=` to `view()` works against error message but an `int` tensor is returned instead of a `float` tensor
Labels: module: error checking,triaged,actionable,module: python frontend

### 🐛 Describe the bug

Setting `shape` and `dtype` with `dtype=` to [view()](https://pytorch.org/docs/stable/generated/torch.Tensor.view.html) gets the error as shown below:

```python
import torch

my_tensor = torch.tensor([[0, 1, 2], [3, 4, 5]])

my_tensor.view((3, 2), dtype=torch.float32) # Error
```

```lang-none
TypeError: view() received an invalid combination of arguments - got (tuple, dtype=torch.dtype), but expected one of:
 * (torch.dtype dtype)
 * (tuple of ints size)
```

But, setting `shape` and `dtype` without `dtype=` to `view()` works against the error message above but an `int` tensor is returned instead of a `float` tensor as shown below:

```python
import torch

my_tensor = torch.tensor([[0, 1, 2], [3, 4, 5]])

my_tensor.view((3, 2), torch.float32)
# tensor([[0, 1],
#         [2, 3],
#         [4, 5]])
```

### Versions

```python
import torch

torch.__version__ # 2.3.0+cu121
```

cc @malfet @albanD
Repository: pytorch
Issue: Setting `dtype` without `dtype=` to `reshape()` using a tensor works even though the doc doesn't explain it and an `int` tensor is returned instead of a `float` tensor
Labels: triaged,actionable,module: python frontend

### 🐛 Describe the bug

Setting `dtype` without `dtype=` to `reshape()` using a tensor works even though [the doc](https://pytorch.org/docs/stable/generated/torch.reshape.html) doesn't explain it and an `int` tensor is returned instead of a `float` tensor as shown below:

```python
import torch

my_tensor = torch.tensor([[0, 1, 2], [3, 4, 5]])

my_tensor.reshape((3, 2), torch.float32)
# tensor([[0, 1],
#         [2, 3],
#         [4, 5]])
```

In addition, setting `dtype` with `dtype=` to `reshape()` using a tensor gets the error as shown below:

```python
import torch

my_tensor.reshape((3, 2), dtype=torch.float32) # Error
```

> TypeError: reshape() got an unexpected keyword argument 'dtype'

And, setting `dtype` without `dtype=` to `reshape()` using [torch](https://pytorch.org/docs/stable/torch.html) gets the error as shown below:

```python
import torch

my_tensor = torch.tensor([[0, 1, 2], [3, 4, 5]])

torch.reshape(my_tensor, (3, 2), torch.float32)
```

> TypeError: reshape() takes 2 positional arguments but 3 were given

### Versions

```python
import torch

torch.__version__ # 2.3.0+cu121
```

cc @albanD
Repository: rust
Issue: Generated assembly contains a jump to the next instruction
Labels: A-LLVM,C-bug,I-heavy

I tried this code in Godbolt:

```rust
#[inline(never)]
pub fn next_back_1(len: &mut u8, bits: &mut u16) -> Option<u8> {
    if *len == 0 {
        None
    } else {
        *len -= 1;
        let result = *bits as u8 & 1;
        *bits >>= 1;
        Some(result)
    }
}
```

I expected to see this happen: *Generated assembly doesn't include jumps to the next instruction.*

Instead, this happened: *Generated assembly does include a jump to the next instruction.*

On `x86_64-unknown-linux-gnu` (with command line flag `-O`), notice that the `jmp .LBB0_3` line is just above the `.LBB0_3` label, and so that instruction can be removed, reducing code size:
```asm
example::next_back_1::h48bde1edbc0e4b8a:
        movzx   eax, byte ptr [rdi]
        test    al, al
        je      .LBB0_1
        lea     ecx, [rax - 1]
        mov     byte ptr [rdi], cl
        movzx   ecx, word ptr [rsi]
        mov     edx, ecx
        and     dl, 1
        shr     ecx
        mov     word ptr [rsi], cx
        jmp     .LBB0_3
.LBB0_1:
.LBB0_3:
        test    al, al
        setne   al
        ret
```

On `aarch64-apple-darwin` (with command line flags `-O --target=aarch64-apple-darwin`), the same thing occurs with the `b LBB0_3` instruction:

```asm
__ZN7example11next_back_117ha5e5b29a87ac44fdE:
        ldrb    w8, [x0]
        cbz     w8, LBB0_2
        sub     w9, w8, #1
        strb    w9, [x0]
        ldrh    w9, [x1]
        mov     x10, x1
        and     w1, w9, #0x1
        lsr     w9, w9, #1
        strh    w9, [x10]
        b       LBB0_3
LBB0_2:
LBB0_3:
        cmp     w8, #0
        cset    w0, ne
        ret
```

### Meta

<details><summary><code>rustc --version --verbose</code></summary>

```
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-unknown-linux-gnu
release: 1.79.0
LLVM version: 18.1.7
```
```
rustc 1.80.0-beta.4 (64a1fe671 2024-06-21)
binary: rustc
commit-hash: 64a1fe67112931359c7c9a222f08fd206255c2b5
commit-date: 2024-06-21
host: x86_64-unknown-linux-gnu
release: 1.80.0-beta.4
LLVM version: 18.1.7
```
```
rustc 1.81.0-nightly (0c81f94b9 2024-07-10)
binary: rustc
commit-hash: 0c81f94b9a6207fb1fc080caa83584dea2d71fc6
commit-date: 2024-07-10
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7
```

</details>
Note that I can't reproduce this on my own machine, but I get another bug there (#127641).
Repository: flutter
Issue: [iOS][Add2App] Gestures conflict between SwiftUI List and Flutter ListView
Labels: platform-ios,framework,f: scrolling,a: existing-apps,has reproducible steps,P2,workaround available,team-ios,triaged-ios,found in release: 3.22,found in release: 3.24

### Steps to reproduce

1. Create a horizontal list using SwiftUI.
2. Create a vertical ListView using Flutter.
3. Add the Flutter ListView as an item in the SwiftUI list.
4. Drag the Flutter ListView (in a cross direction), but the SwiftUI list will scroll too.

Example: https://github.com/huylg/embeded_scrollview

### Expected results

Only the Flutter ListView should scroll, not the SwiftUI list.

### Actual results

Drag the Flutter ListView (in a cross direction), but the SwiftUI list will scroll too.



### Code sample

<details open><summary>Code sample</summary>

```dart
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Scaffold(
          body: ListView(
            scrollDirection: Axis.horizontal,
            children: Colors.primaries
                .map((e) => Container(
                      color: e,
                      width: 100,
                      height: 100,
                    ))
                .toList(),
          ),
        ),
      );
}
```

```swift
import SwiftUI

struct ContentView: View {
    var body: some View {
        List {
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            Text("Hehe 1")
            FlutterView().frame(height: 200)
        }
    }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/huylg/embeded_scrollview/raw/main/screen_recording.mov


https://github.com/user-attachments/assets/7acc06df-184e-4cb9-84e5-897f5722817f


</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.22.1, on macOS 15.0 24A5279h darwin-arm64, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.91.0)
[✓] Connected device (4 available)
```

</details>
Repository: go
Issue: proposal: x/image/font: add sTypoAscent and sTypoDescent
Labels: Proposal

### Proposal Details

Now we will parse the ascender and descender in the hhea table of the font file, but this is not enough. According to the protocol description, the ascender and descender in the hhea table are applied to the apple platform, while the applications developed based on the windows platform require the ascender and descender to parse the sTypoAscender and sTypoDescender in the os2 table. （https://learn.microsoft.com/en-us/typography/opentype/spec/hhea）
![image](https://github.com/user-attachments/assets/2c0f23f9-c0a8-4b6c-ae51-4e6ecb13b39c)
However, our library does not provide such support. Can the sTypoAscender and sTypoDescender in the os2 table be added to the parse in the sfnt/sfnt.go file of [golang.org/x/image/font/sfnt/](http://golang.org/x/image/font/sfnt/)? 
The structure of the os2 table is described in this document, which contains the required sTypoAscender and sTypoDescender.（https://learn.microsoft.com/da-dk/typography/opentype/spec/os2）
Repository: vscode
Issue: Sorting in settings editor seems random
Labels: bug,settings-editor

* open settings UI
* search for `sticky scroll`
* :bug: note how settings for notebook, tree, editor, and terminal scroll are all interleaving and not sorted by "scope"

I expect all editor sticky scroll settings in one bucket, than all tree one, etc pp




![Image](https://github.com/user-attachments/assets/139f1777-4086-4530-8419-57c87111024f)
Repository: storybook
Issue: [Bug]: `storybook init` fails in turbo + sveltekit + pnpm monorepo
Labels: bug,help wanted,svelte,monorepos,pnpm,sveltekit,turborepo

### Describe the bug

In trying to solve Storybook support for Svelte 4 and Storybook 8, I've run across some issues.

When attempting a new turbo + sveltekit + pnpm monorepo, `storybook init` fails.

Please see the linked repository for more details.

### Reproduction link

https://github.com/cge-taal/test-sveltekit-storybook

### Reproduction steps

_No response_

### System

```bash
Storybook Environment Info:

  System:
    OS: macOS 13.5.1
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.4.0 - /opt/homebrew/bin/pnpm <----- active
  Browsers:
    Safari: 16.6
```


### Additional context

_No response_
Repository: godot
Issue: Controller connecting after game starts fails to navigate UI focus
Labels: bug,topic:input

### Tested versions

- Reproducible in: 4.3.beta3 ; 4.2.1.stable

### System information

Windows 10

### Issue description

If a controller connects after the game starts, the d-pad navigation buttons fail to change the ui item focus for that controller.

It seems that ui_accept works as the button clicks register, but D-pad is dysfunctional for navigation. I tested on both the XBox One controller and PS5 controller with and without Steam open. Both of the controllers exhibit the same behavior.

In case of two controllers, it will affect the one that connects during the run whilst the other will keep on working.

### Steps to reproduce

Add two Button controls, make one of them call grab_focus() at the start. 
1. Make sure thet the controller is disconnected, run project, connect the controller.
2. Observe that navigation using the D-üad will fail to move the focus to the other button. (You can still hit A to make the button click (if you configure it as ui_accept manually)).


### Minimal reproduction project (MRP)

[focustest.zip](https://github.com/user-attachments/files/16190580/focustest.zip)
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add Ascend NPU npu_fusion_attention to accelerate training
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 ?

- a simple description of npu_fusion_attention operator
- add Ascend NPU npu_fusion_attention to accelerate training

### Proposed workflow

1. Go to add description of npu_fusion_attention operator
2.  add Ascend NPU npu_fusion_attention to accelerate training



### Additional information

_No response_
Repository: PowerToys
Issue: Batch text encoding conversion
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

In the coding work, in most cases the file encoding is inconsistent, such as the file encoding required by the compiler is UTF8, but the actual file encoding is ANSI encoding, such as GBK encoding, when the number of files is particularly large, I hope to have a batch transcoding tool, similar to batch file renaming

### Scenario when this would be used?

Coding work

### Supporting information

_No response_
Repository: three.js
Issue:  Consider providing an interface with a custom calculated mouse relative information in the transformControls
Labels: Addons

### Description

When I am cropping the render viewport, the transformController cannot correctly raycast .
The fact is that the method of raycaster detection does not take this situation into account

### Solution

In my code I did the following to fit to the cut of the view，but in transformControls ，will consider providing a suitable interface 
 to resolve this ？
```Raycaster
    /**
     * @param {THREE.Vector4} scissor 
     */
    setScissor(scissor) {
        this.scissor = scissor
    }
```
```
        const { left, top, width, height } = this.element.getBoundingClientRect()

        const scissor = this.scissor

        if (scissor) {
            mouse.x = ((event.clientX - left - scissor.x) / (width - scissor.x)) * 2 - 1
            mouse.y = -((event.clientY - top - (height - scissor.height - scissor.y)) / (scissor.height)) * 2 + 1
        } else {
            mouse.x = ((event.clientX - left) / width) * 2 - 1
            mouse.y = -((event.clientY - top) / height) * 2 + 1
        }

```



### Alternatives


I think should provide a custom method of calculating the mouse relative information that replaces the default method `getPointer` when it is set up
```
// mouse / touch event handlers

function getPointer( event ) {

	if ( this.domElement.ownerDocument.pointerLockElement ) {

		return {
			x: 0,
			y: 0,
			button: event.button
		};

	} else {

		const rect = this.domElement.getBoundingClientRect();

		return {
			x: ( event.clientX - rect.left ) / rect.width * 2 - 1,
			y: - ( event.clientY - rect.top ) / rect.height * 2 + 1,
			button: event.button
		};

	}

}
```

### Additional context

_No response_
Repository: flutter
Issue: Source maps in `flutter run -d chrome --release`  doesn't work for path dependencies (and maybe other situations)
Labels: tool,a: debugging,platform-web,a: release,has reproducible steps,P2,team-web,triaged-web,found in release: 3.22,found in release: 3.24

If we take the flutter counter app (created via `flutter create app`) and modify it slightly via
```diff
dependencies:
+  helper:
+    path: ../helper
```
and
```diff
+ import 'package:helper/helper.dart';
...
+ int i = 0;
class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;   
                                                                                                                                        
  void _incrementCounter() {                                                                                                            
+    if (++i % 5 == 0) helper(() => throw 'baz');                                                                                                      
    setState(() {
```
and have the `helper` method in `package:helper` call some things which eventually call the given closure to it
```dart
// package:helper/helper.dart (aka ../helper/lib/helper.dart)
helper(void Function() fun) {
  print('helper');
  helper1(fun);
}

helper1(void Function() fun) {
  print('helper2');
  helper2(fun);
}

helper2(void Function() fun) {
  print('helper2');
  fun();
}
```
, then we can break on the exception in chrome.

What we'll observe is that
* The core library methods have no source maps (e.g. `js_helper.dart:throwExpression`)
* The `lib/main.dart` has valid source maps
* The `package:helper/helper.dart` has **invalid** source maps (for me it shows a html file in chrome)
* The `package:flutter/*` code has valid source maps

So either
* we have to instruct dart2js to emit different source maps for packages (e.g. `package:helper` in this case) or
* we have to make the `flutter run` tool's http server serve the files for the filepaths currently emitted by dart2js

(On dart2wasm this issue doesn't exist because we currently bake in absolute file url which work very well on developer machines, see https://github.com/dart-lang/sdk/issues/56232 for follow up tasks)

/cc @yjbanov @sigmundch @a-siva  for finding someone to own this