sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Tracking Issue for `OnceCell/Lock::get_mut_or_init`
Labels: T-libs-api,C-tracking-issue

Feature gate: `#![feature(once_cell_get_mut)]`

This is a tracking issue for

* `OnceCell::get_mut_or_init()`
* `OnceCell::get_mut_or_try_init()`
* `OnceLock::get_mut_or_init()`
* `OnceLock::get_mut_or_try_init()`
 
### Public API

```rust
    pub fn get_mut_or_try_init<F, E>(&mut self, f: F) -> Result<&mut T, E>
    where
        F: FnOnce() -> Result<T, E> { ... }

    pub fn get_mut_or_init<F>(&mut self, f: F) -> &mut T
    where
        F: FnOnce() -> T { ... }
```

### Steps / History

* [x]  ACP: https://github.com/rust-lang/libs-team/issues/294
* [x]  Implementation: https://github.com/rust-lang/rust/pull/114788
* [ ]  Final comment period (FCP)
* [ ]  Stabilization PR

 
### Unresolved Questions

None yet.

## Footnotes

1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html [↩](#user-content-fnref-1-39877e12402a53c830c980b62b917a0e)
Repository: node
Issue: `"packageManager"` field doesn’t support npm
Labels: npm

### Version

21.6.2

### Platform

Linux a3bc0d85e2cf 6.6.12-linuxkit #1 SMP Thu Feb  8 06:36:34 UTC 2024 aarch64 GNU/Linux

### Subsystem

Corepack

### What steps will reproduce the bug?

```shell
docker pull node:latest
docker run -it --entrypoint bash node
mkdir app && cd app
npm init -y
node --eval 'const fs = require("fs"); const pjson = JSON.parse(fs.readFileSync("./package.json", "utf8")); pjson.packageManager = "npm@9"; fs.writeFileSync("./package.json", JSON.stringify(pjson, null, 2));'
npm install
```

### How often does it reproduce? Is there a required condition?

Always.

### What is the expected behavior? Why is that the expected behavior?

I should get an error that my current version of npm (10.2.4) doesn’t match the version defined in the `packageManager` field (9).

### What do you see instead?

npm 10 runs without complaint.

### Additional information

I understand that npm isn’t a “supported package manager” per https://nodejs.org/api/corepack.html#supported-package-managers, which is linked from https://nodejs.org/api/packages.html#packagemanager; but npm is distributed with Node, so it _should_ be a supported package manager. It is a bad user experience to ship two tools (npm and Corepack) that don’t work together.

Furthermore, I don’t want my version of `npm` to need to be pinned; I want to be able to specify a _minimum,_ like “npm 10+” but not a maximum; or to be able to say `npm@*` to enforce that this project requires npm but no particular version. I don’t want the `packageManager` field to cause me to use a version of npm that may have security vulnerabilities that have been patched in a newer version of npm. [The maintainers of npm recommend always using the latest npm version](https://github.com/nodejs/node/issues/50963#issuecomment-1862957925), and it feels wrong (and a poor security practice) for the `packageManager` field to contradict this.

@nodejs/corepack @nodejs/loaders @nodejs/npm @nodejs/package-maintenance
Repository: pytorch
Issue: _native_batch_norm_legit doesn't bump version counter of buffers
Labels: high priority,module: autograd,triaged,module: codegen,module: correctness (silent),module: norms and normalization

The op's schema looks like the following:
<img width="730" alt="image" src="https://github.com/pytorch/pytorch/assets/5652049/9e4d3c8b-869e-445b-98c4-360ec63a7b0e">
repro:
```
x = torch.randn(2, 3, 4, 4)
w = torch.randn(3)
running_mean = torch.zeros(3)
running_var = torch.zeros(3)
print(running_mean._version)
torch.ops.aten._native_batch_norm_legit(x, w, None, running_mean, running_var, True, 0.1, 0.001)
print(running_mean._version)  # 0
```

cc @ezyang @gchanan @kadeng @albanD @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @bhosmer @bdhirsh
Repository: flutter
Issue: Scenario app incorrectly uses `ChannelBuffers`, causing log spam
Labels: engine,P2,team-engine,triaged-engine,e: scenario-app

... and potentially could be connected to race issues, either way I'd like to fix it:

```txt
02-26 09:49:57.060 [I] TestRunner: started: testPlatformView(dev.flutter.scenariosui.PlatformViewWithSurfaceViewUiTest)
02-26 09:49:57.261 [I] flutter: Loading scenario platform_view
02-26 09:49:59.527 [I] flutter: A message on the flutter/lifecycle channel was discarded before it could be handled.
02-26 09:49:59.527 [I] flutter: This happens when a plugin sends messages to the framework side before the framework has had an opportunity to register a listener. See the ChannelBuffers API documentation for details on how to configure the channel to expect more messages, or to expect messages to get discarded:
02-26 09:49:59.527 [I] flutter: https://api.flutter.dev/flutter/dart-ui/ChannelBuffers-class.html
02-26 09:49:59.527 [I] flutter: The capacity of the flutter/lifecycle channel is 1 message.
```

https://api.flutter.dev/flutter/dart-ui/ChannelBuffers-class.html reads:

> Messages for a channel are stored until a listener is provided for that channel, using [setListener](https://api.flutter.dev/flutter/dart-ui/ChannelBuffers/setListener.html). Only one listener may be configured per channel.
>
> Typically these buffers are drained once a callback is set up on the [BinaryMessenger](https://api.flutter.dev/flutter/services/BinaryMessenger-class.html) in the Flutter framework. (See [setListener](https://api.flutter.dev/flutter/dart-ui/ChannelBuffers/setListener.html).)

Looking at the code, I see the following:

```dart
class MultiPlatformViewBackgroundForegroundScenario extends Scenario
    with _BasePlatformViewScenarioMixin {
  /// Creates the PlatformView scenario.
  MultiPlatformViewBackgroundForegroundScenario(
    super.view, {
    required this.firstId,
    required this.secondId,
  }) {
    _nextFrame = _firstFrame;
    channelBuffers.setListener('flutter/lifecycle', _onPlatformMessage);
  }
}
```

Potentially related:

- https://github.com/flutter/engine/pull/48096
- https://github.com/flutter/engine/pull/48456
Repository: godot
Issue: A Grouped AnimationNodeStateMachine throws warnings and errors but seems to work fine otherwise
Labels: topic:editor,documentation,topic:animation

### Tested versions

Reproducible in: v4.2.1.stable.arch_linux, v4.3.dev3.official [36e943b6b]

### System information

Godot v4.3.dev3 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sat Feb 10 09:40:02 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU () - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)

### Issue description

When traveling into a node in an `AnimationNodeStateMachine` which type is `Grouped` using the root state machine's `AnimationNodeStateMachinePlayback` a couple of warnings and errors will appear in the `Debugger` tab.

Root state machine:

![image](https://github.com/godotengine/godot/assets/483531/f2e18e74-e31d-498b-a4fd-ca6f187a33fa)

Inner state machine `attack` (set as `Grouped`):

![image](https://github.com/godotengine/godot/assets/483531/5c5708e9-af51-46bc-9bc7-455f7b219ef1)



### Steps to reproduce

- Create an `AnimationTree`
- Add an `AnimationNodeStateMachine` as `root`
- Add an `AnimationNodeStateMachine` as a node to the other state machine and set its type to `Grouped`
- In the inner state machine, create a couple `Animation` nodes and connect the `Start` node to each one. Connect each `Animation` node to the `End` node.

In a script, using the `AnimationNodeStateMachinePlayback` of the root state machine, try traveling to a node in the inner state machine. In the `Debugger` the following warnings and errors will appear:

```
W 0:00:02:0772   _set_current: There are two or more transitions from the Start of Grouped AnimationNodeStateMachine in AnimationNodeStateMachine: parameters/attack, which may result in unintended transitions.
  <C++ Source>   scene/animation/animation_node_state_machine.cpp:226 @ _set_current()
W 0:00:02:0772   _set_current: There are two or more transitions to the End of Grouped AnimationNodeStateMachine in AnimationNodeStateMachine: parameters/attack, which may result in unintended transitions.
  <C++ Source>   scene/animation/animation_node_state_machine.cpp:229 @ _set_current()
E 0:00:02:0772   _set_current: There is a mismatch in the number of start transitions in and out of the Grouped AnimationNodeStateMachine on AnimationNodeStateMachine: parameters/attack.
  <C++ Source>   scene/animation/animation_node_state_machine.cpp:232 @ _set_current()
E 0:00:02:0772   _set_current: There is a mismatch in the number of end transitions in and out of the Grouped AnimationNodeStateMachine on AnimationNodeStateMachine: parameters/attack.
  <C++ Source>   scene/animation/animation_node_state_machine.cpp:235 @ _set_current()
```

But it seems to work fine otherwise.

### Minimal reproduction project (MRP)

[test_grouped_state_machine.zip](https://github.com/godotengine/godot/files/14408854/test_grouped_state_machine.zip)

It's just a `tscn` file. Press `ui_accept` to toggle from `idle` to `attack/cut` or `attack/slash` and back.
Repository: deno
Issue: Ability to supress JSR publish warnings
Labels: suggestion,publish,jsr

It would be nice to be able to supress publish warnings like:

```
warning[unanalyzable-dynamic-import]: unable to analyze dynamic import
```
Repository: pytorch
Issue: [export] `nn.GRU` fails to `torch.export` due to unimplemented operator
Labels: oncall: export

### 🐛 Describe the bug

The following model, containing a single `nn.GRU` layer cannot be exported:
 
**Model:**
```python
import torch
from torch.export import export

class Sample(torch.nn.Module):
   def __init__(self, size, h_dim, **kwargs):
       super(Sample, self).__init__(**kwargs)
       self.rnn = torch.nn.GRU(size, h_dim, batch_first=True)
 
   def forward(self, x):
       _, states = self.rnn(x)
       return states

mod = Sample(size=19, h_dim=40)
mod.eval()
mod.cuda()
exported = export(mod, (torch.rand((1, 40, 19)).cuda(),))
```

**Error Log:**
```bash
  File "/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1713, in run_fallback_kernel
    return pytree.tree_map(map_out, r)
  File "/python3.10/site-packages/torch/utils/_pytree.py", line 898, in tree_map
    return treespec.unflatten(map(func, *flat_args))
  File "/python3.10/site-packages/torch/utils/_pytree.py", line 734, in unflatten
    leaves = list(leaves)
  File "/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1703, in map_out
    raise orig_not_implemented_exception
  File "/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1436, in _dispatch_impl
    r = func(*args, **kwargs)
  File "/python3.10/site-packages/torch/_ops.py", line 571, in __call__
    return self_._op(*args, **kwargs)
NotImplementedError: aten::_cudnn_rnn_flatten_weight: attempted to run this operator with Meta tensors, but there was no abstract impl or Meta kernel registered. You may have run into this message while using an operator with PT2 compilation APIs (torch.compile/torch.export); in order to use this operator with those APIs you'll need to add an abstract impl.Please see the following doc for next steps: https://docs.google.com/document/d/1_W62p8WJOQQUzPsJYa7s701JXt0qf2OfLub2sbkHOaU/edit
```

### Versions

```
torch == 2.3.0.dev20240222+cu121
```

cc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519
Repository: vscode
Issue: `explorer.upload` fails when a file is selected
Labels: file-explorer,under-discussion

Our tracking issue: https://github.com/microsoft/vscode-edu-extension/issues/1664#issuecomment-1962165842. Demo gif here: https://github.com/microsoft/vscode-edu-extension/issues/1664#issuecomment-1962159858

When executing `explorer.upload` _while a file is selected_, vscode fails with the following message:

When a **file** is selected
_uploading foo.txt and foo.txt is selected_
```
Unable to write file 'vscode-edu-user:/VSCode Edu Project/foo.txt/foo.txt' (Error: Unable to create folder 'vscode-edu-user:/VSCode Edu Project/foo.txt' that already exists but is not a directory)
```

To work around this, I've considered detecting if a file is selected and showing a warning message to the user, but [we can't get the currently selected file in the explorer today](https://github.com/microsoft/vscode/issues/3553).

Version: 1.87.0-insider
Commit: e73419bef379f7956f024557cbf40bd3755a0645
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
Embedder: vscode.dev

<!-- generated by web issue reporter -->
Repository: godot
Issue: Vulkan/X11: rendering device `Unable to acquire framebuffer` after Linux virtual console switch
Labels: discussion,platform:linuxbsd,topic:rendering

### Tested versions

- Reproducible in master [bb6b06c81343073f10cbbd2af515cf0dac1e6549]
- Reproducible in 4.3dev3

### System information

Godot v4.3.dev (67d08f8f1) - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3080 Ti (nvidia) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)

### Issue description

When I am using the Godot editor and switch virtual consoles (i.e., to the text console, not anything in X11), the Vulkan rendering driver falls over immediately (I tested by piping output to a text file). The editor does not recover when I switch back to X11. 

* The errors reported arising from this look different before and after https://github.com/godotengine/godot/pull/84976, so I assume it's the same bug in a different form.

* Not sure if this belongs in https://github.com/godotengine/godot/issues/71929 because it's not random -- happens 100% for me.

Currently, I get:
```
ERROR: Condition "err != VK_SUCCESS" is true. Returning: FAILED
   at: command_queue_execute_and_present (drivers/vulkan/rendering_device_driver_vulkan.cpp:2214)
... repeats N times ...
ERROR: Unable to acquire framebuffer.
   at: screen_prepare_for_drawing (servers/rendering/rendering_device.cpp:3199)
```
(repeats)

In 4.3dev3, I got:
```
ERROR: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
   at: swap_buffers (drivers/vulkan/vulkan_context.cpp:2571)
ERROR: Vulkan: Did not create swapchain successfully. Error code: VK_NOT_READY
   at: prepare_buffers (drivers/vulkan/vulkan_context.cpp:2491)
```
(repeats)




### Steps to reproduce

For context, I run into this in "real life" while using the editor and running a project containing an infinite loop -- due to using MOUSE_MODE_CONFINED, I can't use the mouse or keyboard to stop or kill the processes. Using virtual console lets me kill the project binary. Unfortunately, with this bug, I also have to kill the editor too.

But these steps can reproduce the issue much more simply:

* Occurs in Forward+ or Mobile modes, but not Compatibility (obviously)
* Run Godot editor. (Need to open some project; the project manager itself will not exhibit the bug. It seems that empty 3D view on startup is enough.)
* Switch to a virtual terminal (i.e. Ctrl-Alt-F1)
* Switch back to X11 (Ctrl-Alt-F7 usually, or a larger Fkey if some setups)
* Godot UI hangs and console is repeating the kinds of errors reported here.


### Minimal reproduction project (MRP)

Does not depend on project other than its Rendering mode, so this is VERY minimal :)

[Empty3D.zip](https://github.com/godotengine/godot/files/14409248/Empty3D.zip)
Repository: godot
Issue: Alpha channel of application/boot_splash/bg_color not honored
Labels: bug,topic:rendering,confirmed

### Tested versions

Reproducible in v4.2.1.stable.mono.official [b09f793f5]

### System information

Godot v4.2.1.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.4617) - AMD Ryzen 7 3800XT 8-Core Processor (16 Threads)

### Issue description

The alpha channel of project setting `application/boot_splash/bg_color` is not honored. In the clip I've set it to (0,0,0,0) and it shows black instead of transparent. Once the first scene is loaded, the window is transparent as otherwise set in the project settings.

Somewhat related to https://github.com/godotengine/godot/issues/71350

### Steps to reproduce

* Configure the project to use transparent backgrounds
* Set `application/boot_splash/bg_color` to (0,0,0,0)
* Start app, see black screen instead of transparent. See attached clip for example.

### Minimal reproduction project (MRP)

[example.zip](https://github.com/godotengine/godot/files/14409491/example.zip)

https://github.com/godotengine/godot/assets/2729388/98846b98-1fe0-443c-8230-a19b6913f75d
Repository: go
Issue: x/tools/gopls: extract variable returns an extra lhs expression and no template edit support is available
Labels: gopls,Tools,Refactoring

go version go1.20.1 darwin/arm64
golang.org/x/tools/gopls v0.14.2
    golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/mod@v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
    golang.org/x/sync@v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
    golang.org/x/sys@v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
    golang.org/x/telemetry@v0.0.0-20231114163143-69313e640400 h1:brbkEFfGwNGAEkykUOcryE/JiHUMMJouzE0fWWmz/QU=
    golang.org/x/text@v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
    golang.org/x/tools@v0.14.1-0.20231114185516-c9d3e7de13fd h1:Oku7E+OCrXHyst1dG1z10etCTxewCHXNFLRlyMPbh3w=
    golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
    honnef.co/go/tools@v0.4.5 h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: go1.20.1
vscode 1.86.2


### Describe the bug
Given the following code

```
func hello() (string, int) {
	return "", 1
}

func call() {
	hello()
}
```

if try to extract variable for function `hello`, I will get the following with no proper template edits so I can rename both variable tuples

<img width="374" alt="image" src="https://github.com/golang/vscode-go/assets/7471994/e2ab9f16-2386-4d92-8ea9-af069cdb881f">
Repository: flutter
Issue: Spellcheck code uses context across an asynchronous gap
Labels: framework,a: error message,has reproducible steps,P2,found in release: 3.19,team-text-input,triaged-text-input,found in release: 3.21

### Steps to reproduce

I enabled spellcheck for `TextFormField`:
```
final spellCheck = kIsWeb
        ? null
        : SpellCheckConfiguration(
            spellCheckService: DefaultSpellCheckService(),
          );
```
and published to GooglePlay to get a pre-launch report

### Expected results

No exceptions are thrown

### Actual results

Crashlytics recorded "crashes" with the following stacktrace:
```
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown .
       at State.context(framework.dart:958)
       at EditableTextState.buildTextSpan(editable_text.dart:5071)
       at EditableTextState._performSpellCheck(editable_text.dart:3843)
```
Quick review of the code lead me to the
```
final List<SuggestionSpan>? suggestions = await
        _spellCheckConfiguration
          .spellCheckService!
            .fetchSpellCheckSuggestions(localeForSpellChecking!, text);

      if (suggestions == null) {
        // The request to fetch spell check suggestions was canceled due to ongoing request.
        return;
      }

      spellCheckResults = SpellCheckResults(text, suggestions);
      renderEditable.text = buildTextSpan();
```

### Code sample

-

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.1, on Manjaro Linux 6.7.4-2-MANJARO, locale en_US.UTF-8)
    • Flutter version 3.19.1 on channel stable at /home/dvoloshyn/Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision abb292a07e (6 days ago), 2024-02-20 14:35:05 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/dvoloshyn/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.2+13)
    • All Android licenses accepted.
```

</details>
Repository: vscode
Issue: Quick search: flicker when typing
Labels: bug,search

It seems to me that when I type, all results go away and are replaced with the find result, resulting in flicker:

![Recording 2024-02-26 at 20 51 07](https://github.com/microsoft/vscode/assets/900690/e0aee1f1-42dc-4a48-958a-8083f7fb58e4)
Repository: godot
Issue: Parameter emitted with a signal references member variable instead of passed Variant
Labels: bug,topic:gdscript

### Tested versions

- Reproducible in v4.3.dev.gh.bb6b06c81, v4.2.1 (stable)

### System information

Godot v4.3.dev (bb6b06c81) - Windows 10.0.22631 - Vulkan (Forward+)

### Issue description

setting:
- a member variable of a node holds a reference-type Variant (Array, Dictionary, Resource, ... )
- emit() that member variable with a Signal
- multiple functions are connected to the signal and print the argument passed to them

expected result:
- every connected function prints the Variant that was passed to the emit() function
- emit uses the reference to the Variant

observed result:
- every connected function prints the current content of the member variable
- emit uses the reference to the member variable (does not seem to be how Godot usually does those things)

(it does not matter if the emitted Variant's ref count reaches zero or not after changing the member variable according to my tests)

### Steps to reproduce

1. create Node with the following script attached
```swift
extends Node

var arr: Array
signal hey(Array)

func _ready() -> void:
	arr = [0]
	hey.connect(_first)
	hey.connect(_second)
	hey.emit(arr)


func _first(passed: Array) -> void:
	print("first ", passed)
	arr = [1]


func _second(passed: Array) -> void:
	# expecting it to receive the same array as _first
	print("second: ", passed)
```
2. run it, _second does not print the array that was emitted but the array that's contained in the member variable arr, prints:

> first [0]
second [1]

### Minimal reproduction project (MRP)

[EmitReference.zip](https://github.com/godotengine/godot/files/14409797/EmitReference.zip)