sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tauri
Issue: [feat] Easier updates for system tray menu
Labels: type: feature request

### Describe the problem

I've gotten updates to work with the following approach, but they feel a bit inefficient

```rust
let tray = app.tray_by_id("main-tray").unwrap();

// Re-adding updated items to a new menu
let menu = MenuBuilder::new(app)
        .items(... )
        .build()
        .unwrap();

// Replace the menu
tray.set_menu(Some(menu)).unwrap();
```

### Describe the solution you'd like

It would probably be better to include the current menu as part of the tray so object so it can be modified.

```rust
let tray = app.tray_by_id("main-tray").unwrap();

let menu = tray.menu();

// We can then modify the menu
... menu.insert();
... menu.remove();
```

### Alternatives considered

_No response_

### Additional context

_No response_
Repository: next.js
Issue: Missing prefetch headers in Middleware
Labels: bug,Runtime,linear: next

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/nextjs-missing-prefetch-header-5ll75f?file=%2Fapp%2Flayout.tsx%3A38%2C17

### To Reproduce

1. Build the application for production
   <img width="322" alt="CleanShot 2024-03-26 at 13 08 19@2x" src="https://github.com/vercel/next.js/assets/76673/b64330db-2134-4f9c-8b23-5c3f131e347d">
2. Run production server
   <img width="267" alt="CleanShot 2024-03-26 at 13 08 54@2x" src="https://github.com/vercel/next.js/assets/76673/4fdf9792-df16-4ec2-a524-60e21b75c608">
3. Inspect the terminal logs when the server starts
   <img width="630" alt="image" src="https://github.com/vercel/next.js/assets/76673/1a13e81b-3251-4d6b-9f48-c3229c7bb74c">

You will notice that as soon as you load the `/` page, the middleware logs the pages the current page and also the pages being prefetched, and that later should not happen.

### Current vs. Expected behavior

The [current documentation](https://nextjs.org/docs/pages/building-your-application/configuring/content-security-policy) suggests that if you don't want the middleware to run for pages that are being prefetched, you can target the `next-router-prefetch` and `purpose` headers:

```
export const config = {
  matcher: [
    {
      source: '/((?!api|_next/static|_next/image|favicon.ico).*)',
      missing: [
        { type: 'header', key: 'next-router-prefetch' },
        { type: 'header', key: 'purpose', value: 'prefetch' },
      ],
    },
  ],
};
```

Unfortunately that does not seem to work in the latest version of Next.js - those headers are never present, therefore "missing" - so the middleware is running for pages that are being prefetched, which causes issues if you are handling redirects/rewrites, etc...

In my example app, I've a couple `Link` components in the root layout with a `prefetch` prop. Those links are being prefetched, but they are also running in the middleware (see the logs) and no prefetch headers are added to those prefetched pages.

I would expect those headers to be available in the middleware for pages that are being prefetched or at least another way for the middleware to know when a page is being prefetched or not.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.4
Relevant Packages:
  next: 14.1.4
  eslint-config-next: 14.1.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router, Middleware / Edge (API routes, runtime)

### Which stage(s) are affected? (Select all that apply)

next build (local), next start (local), Vercel (Deployed)

### Additional context

I also tested with version `13.5.6` and the issue remains.

I also remove the `missing` property and added logs to those headers, but they always return as `null` no matter what.
Repository: pytorch
Issue: unresovled symbol when compiling a torch c++ app that using libtorch
Labels: needs reproduction,module: cpp,triaged

### 🐛 Describe the bug

I'm compiling a c++ app against libtorch (downloaded from https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-2.2.1%2Bcpu.zip), got the following error:
```
error LNK2019: unresolved external symbol "private: static struct c10::UndefinedTensorImpl c10::UndefinedTensorImpl::_singleton" (?_singleton@UndefinedTensorImpl@c10@@0U12@A) referenced in function "public: static struct c10::TensorImpl * __cdecl c10::UndefinedTensorImpl::singleton(void)" (?singleton@UndefinedTensorImpl@c10@@SAPEAUTensorImpl@2@XZ)
```
It seems that c10::UndefinedTensorImpl::_singleton is declared, but not defined. Adding following line in my cpp file will work
```c++
c10::UndefinedTensorImpl c10::UndefinedTensorImpl::_singleton;
```
This is just a dirty fix. So what's the correct way? 

### Versions

2.2.1

cc @jbschlosser
Repository: godot
Issue: @export_flags integer size concerns
Labels: discussion,topic:editor

### Tested versions

- Reproducible in 4.2.1


### System information

Godot v4.2.1.stable - macOS 14.3.1 - Vulkan (Forward+) - integrated Apple M2 Max - Apple M2 Max (12 Threads)

### Issue description

I have a question about the `@export_flags` bit fields (which are under the hood integers), and not sure if it is a bug or not. The documentation of `@export_flags` states that:

> Note: A flag value must be at least 1 and at most 2 ** 32 - 1.

And also if you try in the engine to give more than 32 arguments to `@export_flags` it will raise the parse error below:

```
Parse Error: Invalid argument 33 of annotation "@export_flags": Starting from argument 33, the flag value must be specified explicitly.
```

So both the documentation and the error message sound like the bit fields can only hold 32 bits of information. However, I also read that in documentation it also says the `int` type has a size of 64 bits or 8B. I also performed some tests on a `int` variable that has `@export_flags` annotation, it shows that an `@export_flags` field can indeed store 64 bits information. 

I am not sure what makes `@export_flags` 32 bits. Is it a bug, a legacy issue, or an intended behavior (for example some compatibility strategy in regard to 32-bit architectures/OS)?

Thank you for your clarification!

### Steps to reproduce

N/A

### Minimal reproduction project (MRP)

N/A
Repository: pytorch
Issue: `torch.sparse.sum` does not support boolean and int when summing over dense dimensions
Labels: module: sparse,triaged

### 🐛 Describe the bug

#### Actual behavior

pytorch raises an error when summing a boolean or int sparse tensor. I am using this function to mimic the `any` function that is not available with the sparse backend.

```
Traceback (most recent call last):
  File "<...>/site-packages/torch/sparse/__init__.py", line 212, in sum
    return torch._sparse_sum(input, dim)
RuntimeError: dtype of values (Long) must match dtype of sparse tensor (Bool)
```

#### Step to reproduce:

```python
import torch
t = torch.zeros(5, 5, dtype=torch.bool)
t = t.to_sparse(1)
torch.sparse.sum(t, dim=-1)
```
or
```python
import torch
t = torch.zeros(5, 5, 5, dtype=torch.bool)
t = t.to_sparse(1)
torch.sparse.sum(t, dim=-1)
```

> This happens wether we sum over all dense dimensions or a portion of it.

### Versions

```shell
$ python -m torch.utils.collect_env
Collecting environment information...
PyTorch version: 1.13.1
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.27

Python version: 3.8.18 (default, Sep 11 2023, 13:40:15)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.15.0-192-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090

Nvidia driver version: 470.141.03
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.21.6
[pip3] torch==1.13.1
[pip3] torchaudio==0.13.1
[pip3] torchvision==0.14.1
[conda] blas                      1.0                         mkl  
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] mkl                       2023.1.0         h213fc3f_46344  
[conda] mkl-service               2.4.0            py38h5eee18b_1  
[conda] mkl_fft                   1.3.8            py38h5eee18b_0  
[conda] mkl_random                1.2.4            py38hdb19cb5_0  
[conda] numpy                     1.21.6           py38h5f9d8c6_0  
[conda] numpy-base                1.21.6           py38hb5e798b_0  
[conda] pytorch                   1.13.1          py3.8_cuda11.7_cudnn8.5.0_0    pytorch
[conda] pytorch-cuda              11.7                 h778d358_5    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.13.1               py38_cu117    pytorch
[conda] torchvision               0.14.1               py38_cu117    pytorch
```

cc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer @jcaip
Repository: material-ui
Issue: [Autocomplete] Allow the user to remove the textarea warning
Labels: package: material-ui,component: autocomplete,ready to take,dx

### Summary

I want to be able to remove this warning:
```
A textarea element was provided to Autocomplete where input was expected.
This is not a supported scenario but it may work under certain conditions.
A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).
Make sure to test keyboard navigation and add custom event handlers if necessary.
```

In React, when you add the `contentEditable`, you get a warning in the console that warns you about the problems you might encounter using that prop. To remove that warning you have to add another prop: `suppressContentEditableWarning`.

I want something similar to remove the textarea warning. Ideally, the warning message itself should also tell you about this new prop to remove it.

### Examples

```jsx
<Autocomplete
  options={yourOptions}
  renderInput={(params) => <TextField {...params} multiline />}
  suppressTextareaWarning
/>
```

### Motivation

https://github.com/mui/material-ui/issues/29961

**Search keywords**: remove textarea warning autocomplete
Repository: PowerToys
Issue: Unable to switch to a different virtual desktop when always on top is enabled
Labels: Issue-Bug,Product-Always On Top,Needs-Repro,Needs-Triage

### Microsoft PowerToys version

0.79.0

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Always on Top

### Steps to reproduce

1. Create at least 2 virtual desktops using the taskbar symbol
2. Open an application or terminal window and set it to be Always on Top in virtual desktop 1. 
3. Press the taskbar symbol and try to switch to desktop 2 using mouse pointer not keyboard shortcuts

### ✔️ Expected Behavior

It is expected to switch to alternate virtual desktop and stay on the alternate desktop until the user initiates another change. 

### ❌ Actual Behavior

It will open the alternate desktop for a moment and then immediately switch back to the first desktop that has the window with Always on Top. If keyboard shortcuts are used to switch then it will maintain the change. Occasionally a blue outline of where the window that was placed on top in desktop 1 will still be displayed on the alternate desktop when using the keyboard switch method.

### Other Software

_No response_
Repository: flutter
Issue: Integration tests fail with `TypeErrorImpl was thrown during a scheduler callback`.
Labels: tool,framework,a: accessibility,platform-web,d: devtools,f: integration_test,has reproducible steps,P2,team-web,triaged-web,found in release: 3.19,found in release: 3.21

Steps to repro:

1. Get [DevTools](https://github.com/flutter/devtools) at f4b1e3017a123861bb83ffdfa9c90119dd413621
2. cd packages/devtools_app
3. Run dart run integration_test/run_tests.dart --target=integration_test/test/live_connection/export_snapshot_test.dart
Repository: flutter
Issue: Mark SaveLayer bounds computed by the layer tree as "trusted"
Labels: engine,P2,team-engine,triaged-engine

As of https://github.com/flutter/engine/pull/50935 the DisplayList code will distrust any bounds that were specified in a `SaveLayer` call. While this does eliminate any value of the bounds in that call being a hint, it was important to be able to more frequently take advantage of peephole optimizations which require us to know if the bounds supplied will clip the content.

While it makes sense (though it is unfortunate) to ignore the bounds that came from a developer who might not have done the math right, there are internal calls to `DisplayListBuilder::SaveLayer` where the engine did do the math already and so we can trust the results. For example, `SaveLayer` calls coming from a layer in the `LayerTree` where the bounds were computed during `Preroll` can be trusted (double check, but they all come from trustable sources). But when they are handed off to the builder, it immediately treats them as suspect and re-does the math anyway.

The internal version of `DisplayListBuilder::saveLayer` has the required "trust hint" argument as it is implementing the internal `DlOpReceiver` interface, but the public version of `DisplayListBuilder::SaveLayer` implementing the public `DlCanvas::SaveLayer` method and used throughout the engine needs a good way to inform the builder that the bounds were computed accurately.

We can either add such a hint to it, or we can just drop all of the bounds we get via the `ui.Canvas` API when it translates the Dart call into a call on the `DisplayListBuilder` at the native level, combined with making sure that all internal calls within the engine are accurate and trustable, and then the `DisplayListBuilder::DlCanvas::SaveLayer` public method can just trust any non-null bounds it receives.

It's unclear if there is any value in propagating this new state of affairs up through the `ui.Canvas` API even though computing those bounds might be extra work for app developers. If we commit to the new save layer bounds implementation we might eventually want to mention that the bounds will be "vetted" and so only really matter if they want to clip out part of the content. In other words, providing the bounds doesn't save time and will only have an impact if you want to clip.
Repository: go
Issue: x/crypto/ssh: TestPacketCiphers failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/crypto/ssh" && test == "TestPacketCiphers"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/414d1c68aaa847b0d38b5f39157da44c0da77d89)):

    --- FAIL: TestPacketCiphers (0.00s)
        --- FAIL: TestPacketCiphers/cipher=aes128-cbc (0.00s)
            cipher_test.go:70: readCipherPacket("aes128-cbc", "hmac-sha2-256"): ssh: packet too large


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: x/crypto/ssh: TestParseEncryptedPrivateKeysWithPassphrase failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/crypto/ssh" && test == "TestParseEncryptedPrivateKeysWithPassphrase"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/55bb84f37ce6042fb6e99aa03bdaefc34231cb3a)):

    --- FAIL: TestParseEncryptedPrivateKeysWithPassphrase (0.57s)
        --- FAIL: TestParseEncryptedPrivateKeysWithPassphrase/rsa-encrypted (0.00s)
            keys_test.go:194: ParsePrivateKeyWithPassphrase returned error: x509: decryption password incorrect
        --- FAIL: TestParseEncryptedPrivateKeysWithPassphrase/dsa-encrypted (0.00s)
            keys_test.go:194: ParsePrivateKeyWithPassphrase returned error: x509: decryption password incorrect


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: x/crypto/ssh: TestParseEncryptedPrivateKeysWithIncorrectPassphrase failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/crypto/ssh" && test == "TestParseEncryptedPrivateKeysWithIncorrectPassphrase"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/2733761f0eeb9d08e162e26b9e6e45178f043f37)):

    --- FAIL: TestParseEncryptedPrivateKeysWithIncorrectPassphrase (0.03s)
        keys_test.go:230: expected error: x509: decryption password incorrect, got: asn1: syntax error: indefinite length found (not DER)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: stable-diffusion-webui
Issue: [Bug]: connection timed out after laucnhing after a long time
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet

### What happened?

[Bug]: connection timed out after laucnhing after a long time

### Steps to reproduce the problem

web ui file and open it the it times out

### What should have happened?

it should work

### What browsers do you use to access the UI ?

_No response_

### Sysinfo

idk what this is

### Console logs

```Shell
isk what this is
```


### Additional information

_No response_
Repository: flutter
Issue: Consider removing `debugEmulateFlutterTesterEnvironment` flag
Labels: engine,platform-web,P2,team-web,triaged-web

We have a number of backdoor flags in the web engine that the framework uses to set up its test environment. Out of all of them, I dislike `debugEmulateFlutterTesterEnvironment` the most.
* This flag does too many completely orthogonal things.
* Many of the things it does could be achieved through normal publicly visible APIs.
* Using special modes that don't actually apply to users' apps lowers the fidelity of our tests.
* The flag is not well documented in how it changes the engine's behavior.
* The flag creates leaky abstractions between the engine and the framework. If the APIs we expose through normal channels are not sufficient for the framework's unit tests, we should consider augmenting those APIs so that any consumer of the engine could set up their own test environment without the use of a special handshake flag like this.

From what I can tell, this flag does a couple different things:
* Changes the size of the implicit view. This could be done in the framework's test harness.
* Sets a special mode that uses only some specific test fonts, instead of what the user passes in. I think it would be better if the test harness in the framework explicitly loads the test fonts and explicitly uses them in each of the tests.
* Suppresses platform messages in the `PlatformDispatcher`. I'm not entirely sure why this is necessary, but I have to imagine it can be possible to suppress these at the framework level. If not, and we truly need a flag for suppressing these, I would rather have an explicit flag as part of the `ui_web` API or something similar, rather than it just being a undocumented side effect of this flag.
* Turns semantics off. I'm pretty sure this can be also be done with our normal APIs.
* Sets a special test `UrlStrategy`. This could also be done from the framework side with normal APIs.

I think we should consider removing this flag and being more explicit about how we set up any given test.
Repository: godot
Issue: PhysicsDirectBodyState2D: Reported values of `get_contact_impulse` not as expected
Labels: bug,confirmed,topic:physics,topic:2d

### Tested versions

Tested in:
- v4.2.1.stable.official [b09f793f5]
- v4.0.4.stable.official [fc0b241c9]

### System information

Godot v4.2.1.stable - macOS 14.1.2 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)

### Issue description

#### Context:
I try to make breakable objects and wanted to use [get_contact_impulse](https://docs.godotengine.org/en/stable/classes/class_physicsdirectbodystate2d.html#class-physicsdirectbodystate2d-method-get-contact-impulse) for this case do detect "hits".

#### Problem:
How strong the impulses are seem almost random ... but is hard to test in a reproducible way

#### My physics lab setup 😂:
- All boxes are the same (mass, gravity scale, etc.)
- The top text shows the highest recorded accumulated impulse (sum of all impulses in one `_integrate_forces`-cycle)
- The lower text shows the highest recorded speed (length of linear-velocity)
- Distances setup:
    - The first box has no distance to the ground
    - The second has 1px distance
    - The next three are arbitrary
    - The last two have the same distance to the ground

<img width="551" alt="Screenshot 2024-03-26 at 20 37 37" src="https://github.com/godotengine/godot/assets/7897006/5cd9a0dd-436e-415e-afc6-7e7ed861b71e">

#### Outcome:
- Velocity does not linearly correlate to impulse (but it should ... I think?):
    - Box 1 has no speed but an impulse
    - Box 2 has a impulse/speed ratio of 1.55
    - Box 3 has a impulse/speed ratio of 1.19
    - Box 6 and 7 don't have the same impulse but I guess they should as they have the same fall height and weight (since I sum impulses)
<img width="612" alt="Screenshot 2024-03-26 at 20 38 15" src="https://github.com/godotengine/godot/assets/7897006/813549dc-5c4c-4ad7-b3f6-8dfe77373e17">

#### Note
I am not 100% sure if these are bugs or I am misunderstanding the concept of what `get_contact_impulse` is reporting.

### Steps to reproduce

I recommend making a similar physics setup and playing around. Make sure you turn on `contact_monitoring` and set a value for `max_contacts_reported`.

I used the following code to track values:
```
extends RigidBody2D

var highest_speed := 0.0
var highest_impulse := 0.0

func _physics_process(delta):
	var speed = linear_velocity.length()
	if speed > highest_speed:
		highest_speed = speed
		$Velocity.text = str(snapped(highest_speed, 0.1))

func _integrate_forces(state):
	var total_impulse := 0.0
	for i in range(state.get_contact_count()):
		var collided_obj = state.get_contact_collider_object(i)
		var impulse = state.get_contact_impulse(i).length()
		total_impulse += impulse
	
	if total_impulse > highest_impulse:
		highest_impulse = total_impulse
		$Impulse.text = str(snapped(highest_impulse, 0.1))
```

### Minimal reproduction project (MRP)

[bug-contact-impulse.zip](https://github.com/godotengine/godot/files/14763971/bug-contact-impulse.zip)