sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: react
Issue: Bug: useSyncExternalStore does not schedule update after mutation
Labels: Type: Bug

Here is a Replay recording with comments:
https://app.replay.io/recording/318114a4-3102-4732-ad1b-cb63b9c0ac22

I think the comments I've added show the following scenario:
1. A React component (`Subscriber`) uses `useSyncExternalStore` to read from a mutable store.
2. The Activity subtree containing `Subscriber` is hidden, and React unsubscribes from the store.
3. An update is scheduled to show the hidden subtree again and the `Subscriber` component re-renders (with memoized state).
4. A parent component mutates the store in a layout effect. (The `Subscriber` component is not yet listening and so it does not re-render to reflect the updated store value.)
6. React re-subscribes the `Subscriber` component (`useSyncExternalStore`) but it has already missed the mutation **and React does not check for a changed snapshot value**.

We originally observed this behavior in Replay itself but I was able to reduce it to the following simplified case:
https://codesandbox.io/s/inspiring-bird-m4wv5l

I've added comments to the Replay, including ones that bracket the problematic `commitRoot`. Here's a short Loom as well talking through the bug:
https://www.loom.com/share/2584cad5b4c44e6bba396ff8cf79db1d

I _think_ an application could work around this issue in a couple of ways:
* Only mutate stores in passive effects. (This may cause visible layout shift though so it seems bad.)
* Mutable store users should avoid memoized `getSnapshot` and `subscribe` functions. (This would schedule some unnecessary effects work which is probably nice to avoid but maybe acceptable.)
* **Store subscribe methods should always invoke the `callback` React passes.** (This would cause a lot of unnecessary `Object.is` comparisons but that's probably an acceptable cost.)

I think the third option above seems best, but needing to do that feels like a foot gun for the API. Thoughts?

cc @acdlite, @sebmarkbage in case you find this interesting.
Repository: PowerToys
Issue: Source code preview causes very slow TXT file preview in Explorer
Labels: Issue-Bug,Product-File Explorer,Needs-Triage

### Microsoft PowerToys version

0.75.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

File Explorer: Preview Pane

### Steps to reproduce

Enable **File Explorer add-ons**
Enable **Source code files** preview
Enable **Preview pane** in Explorer
Browse a folder and select a **TXT** file

Instead of the usual instantaneous preview, there is a green "Loading" progress bar for a second or two and then the file is previewed. This occurs even if it's only a 1 character test file. It's orders of magnitude slower than the default preview. It may be less noticeable on high-end rigs, but is painful on a basic laptop, like mine.

**Theory**: The delay is happening because the source code previewer is checking the file contents to determine what syntax colorizer to use.

**Suggestion**: Do not handle TXT files. Let Explorer's default previewer handle them. If a file has a TXT extension, it's perfectly OK to display it as plain uncolored text, regardless of content.

**Alternative solution**: Replace the preview code with faster code. There really should be no delay. For example, I use [Notepad2](https://github.com/zufuliu/notepad2), which syntax highlights all source code, and it's instantaneous on my laptop.

### ✔️ Expected Behavior

Instant preview of text files.

### ❌ Actual Behavior

Slow preview of text files.

### Other Software

_No response_
Repository: vscode
Issue: Git - Expose git branch description on VS code UI
Labels: help wanted,feature-request,git

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Git 1.7.9 supports descriptions on branches. It's really extremely helpful for large projects and actually amazing it was not part of the original release of git. However it's a big hassle in VS code to have to open terminal and type `git branch --edit-description` to view or edit the branch description. 

Can we simply add an input text box somewhere which exposes this field? it would also be ideal to expose it on the branch select popup which appears when you click the active branch in the bottom left of VS code.
Repository: go
Issue: cmd/go: "go work use" doesn't clearly indicate when download fails
Labels: NeedsInvestigation,GoCommand,BadErrorMessage

### What version of Go are you using (`go version`)?

1.20.3

### Does this issue reproduce with the latest release?

Can't tell yet

### What operating system and processor architecture are you using (`go env`)?

darwin/arm64

### What did you do?

I hit an error because `go.mod` had been updated to require v1.20.4, but `go.work` hadn't:

```
go: module . listed in go.work file requires go >= 1.21.4, but go.work lists go 1.21.3; to update it:
	go work use
```

So I tried that:

```
> go work use
go: go.mod requires go >= 1.21.4; switching to go1.21.4
go: downloading go1.21.4 (darwin/arm64)
go: download go1.21.4: golang.org/toolchain@v0.0.1-go1.21.4.darwin-arm64: verifying module: checksum database disabled by GOSUMDB=off
```

My first issue is that I understood "go.work lists go 1.21.3; to update it: go work use" to mean that `go work use` would update `go.work`, and I'd then switch Go versions in the usual way (for me, using rtx). I didn't think "update it" meant "download and use go 1.21.4". So that message could use clarification.

My second issue is that Go _seemed_ to have downloaded a different version of Go and presumably stored it somewhere. I didn't want an extra copy of Go 1.21.4 hanging around, so I set about trying to find it. After wasting quite a lot of time on that, I ran across this text in https://go.dev/doc/toolchain:

> Instead, toolchain downloads fail for lack of verification if GOSUMDB=off.

So I think the second message, from `go work use`, could also use clarification. Specifically, if the download fails, it should clearly state that the download failed, rather than merely saying that the checksum database is disabled (which I know) and leaving the reader to work out what might have happened.

It'd also be good if Go checked to see if `go work use` was going to work (i.e. if GOSUMDB was enabled) before suggesting that the user run it.

(I also think it would be a good idea to have a better way to disable this auto-download-and-run functionality than having to turn off `GOSUMDB`. I don't want to keep an old version of Go around and have it download multiple newer versions as necessary. Rather, I want to continue to use a tool like rtx to manage my default Go install, so that when I run `go` to build a project I get the current version by default, even if that project doesn't require it.)
Repository: godot
Issue: Shader error "bind: Condition "!version" is true."
Labels: needs testing,topic:shaders

### Godot version

v3.6.beta3.official [21ab700f2]

### System information

w10 64

### Issue description

This is an error that remains after a long time, I thought it was reported but I can't find the thread using the search engine.

![Captura5](https://github.com/godotengine/godot/assets/19652075/5142ee21-15be-4793-9825-41f62d14953c)


Shader code:
```
shader_type canvas_item;
render_mode unshaded;

uniform vec4 flash_color : hint_color = vec4( 1.0 );
uniform float flash_modifier : hint_range( 0.0, 1.0 ) = 0.0;

uniform vec4 line_color : hint_color = vec4(1.0);
uniform float line_thickness : hint_range(0.0, 1.0) = 0.0;
//const float line_thickness = 1.0;

void fragment() {
	
	if( line_thickness > 0.0 ) {
		vec2 size = TEXTURE_PIXEL_SIZE * line_thickness;
	
		float outline = texture(TEXTURE, UV + vec2(-size.x, 0)).a;
		outline += texture(TEXTURE, UV + vec2(0, size.y)).a;
		
		outline += texture(TEXTURE, UV + vec2(size.x, 0)).a;
		
		outline += texture(TEXTURE, UV + vec2(0, -size.y)).a;
		
		outline += texture(TEXTURE, UV + vec2(-size.x, size.y)).a;
		
		outline += texture(TEXTURE, UV + vec2(-size.x, size.y * 0.5)).a;
		
		outline += texture(TEXTURE, UV + vec2(size.x, size.y)).a;
		outline += texture(TEXTURE, UV + vec2(size.x, size.y * 0.5)).a;
		
		outline += texture(TEXTURE, UV + vec2(-size.x, -size.y)).a;
		outline += texture(TEXTURE, UV + vec2(-size.x, -size.y * 0.5)).a;
		
		outline += texture(TEXTURE, UV + vec2(size.x, -size.y)).a;
		outline += texture(TEXTURE, UV + vec2(size.x, -size.y * 0.5)).a;
		
		outline = min(outline, 1.0);
		
		vec4 color = texture(TEXTURE, UV);
		COLOR = mix(color, line_color, outline - color.a);
		
	} else if( flash_modifier > 0.0 ) {
		vec4 color = texture( TEXTURE, UV );
		color.rgb = mix( color.rgb, flash_color.rgb, flash_modifier );
		COLOR = color;
		
	} else {
		COLOR = texture(TEXTURE, UV);
	}
}
```

### Steps to reproduce

...

### Minimal reproduction project

...
Repository: rust
Issue: rustdoc-json: Dangling ID when `pub use`ing item from `#[doc(hidden)]` module
Labels: T-rustdoc,A-rustdoc-json

With the following code:
```rust
#[doc(hidden)]
pub mod __secrets {
    pub struct Foo;
}

pub use __secrets::Foo;
```
It has a dangling ID:
```
---- [rustdoc-json] tests/rustdoc-json/reexport/pub_use_from_doc_hidden_mod.rs stdout ----

error: jsondoclint failed!
status: exit status: 1
command: "/home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/stage0-tools-bin/jsondoclint" "/home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/test/rustdoc-json/reexport/pub_use_from_doc_hidden_mod/pub_use_from_doc_hidden_mod.json"
stdout: none
--- stderr -------------------------------
0:4:1750 not in index or paths, but referred to at '$.index["0:6-0:4:1750"].inner.import.id'
Error: Errors validating json /home/gh-aDotInTheVoid/rust2/build/aarch64-unknown-linux-gnu/test/rustdoc-json/reexport/pub_use_from_doc_hidden_mod/pub_use_from_doc_hidden_mod.json
------------------------------------------
```

As it has the following json (redacted)

```json
  "index": {
    "0:0:1751": {
      "inner": {"module": {"is_crate": true, "is_stripped": false, "items": ["0:6-0:4:1750"]}},
      "name": "pub_use_from_doc_hidden_mod"
    },
    "0:6-0:4:1750": {
      "inner": {"import": {"glob": false, "id": "0:4:1750", "name": "Foo", "source": "__secrets::Foo"}},
      "name": null
    },
```

In HTML, `Foo` is inlined to the crate root.

Version: 28acba3c61246ba5974df332a064ab0c19b1cff8
Repository: flutter
Issue: Add an event to support post-submit actions when all post-submit tests finish
Labels: c: new feature,team-infra,P2,triaged-infra

It is not uncommon that we need to do post-submit actions when all tests finish. For example:
1) Packages repo needs to [waits for all post-submit tests to pass](https://github.com/flutter/plugins/blob/main/.github/workflows/release.yml#L37-L47) before publishing @stuartmorgan 
2) Engine repo needs to roll latest version to framework when all post-submit tests pass (WIP) @XilaiZhang 

We need to have a generic way to flag when all post-submit tests pass. Eg. this event can then be consumed from GitHub actions to act accordingly.

/cc @godofredoc
Repository: flutter
Issue: Separate raster time metric into different metrics for workload and backpressure
Labels: P2,team-engine,triaged-engine

Depending on the GPU workload and presentation latency, the engine may block for some period time during a raster workload. Today this is included in the raster thread time, which may be misleading as the thread itself is more or less sleeping and not able to do any work.

As such, its not useful to look at the raster thread workload - only the GPU/presentation workload to determine if it can be reduced.

We should adjust the devtools and frametimings API to split these numbers out.
Repository: godot
Issue: Base type in custom theme items can be set to any nonsensical value, but not left empty
Labels: bug,topic:editor

### Godot version

v4.2.beta4.official [93cdacbb0]

### System information

Any platform

### Issue description

See the discussion at #84259.

As of Godot 4.2, a custom theme item is required to have a base type defined. However, this base type can be any bogus name, as long as the field isn't left empty things will work.

The solution would either be to revert behaviour back to how it was in 4.1 (which I personally prefer), or to require users to fill in an existing class name that's valid for the items that the override should be applied to. In other words, if I make a custom container that inherits from `Container`, the _only_ thing it is allowed to override in the theme is `Container`. This would require a major UX rework, because custom theme items are not directly linked to classes in the project.

Reverting this back to 4.1 has my preference because there is clearly no actual need for this field being filled out, other than having other tabs automatically filled with items that can be overridden (so it's editor UX, not engine functionality, why this requirement was added). If I have a custom item that has nothing to override I see no reason why I would still need to override anything.

### Steps to reproduce

N/A

### Minimal reproduction project

Not needed, but the project in #84259 is a good fit if you do want to check it out in the editor.
Repository: flutter
Issue: add autofocus parameter to SearchAnchor
Labels: c: new feature,framework,f: material design,c: proposal,P2,team-design,triaged-design

### Use case

If I pop from SearchAnchor.bar view - my device immediately trying to focus search field again. 
SearchAnchor always try to focus in `initState`

### Proposal

You could add autofocus parameter to SearchAnchor which will disable 
`_focusNode.requestFocus();` in `initState` if false
Repository: godot
Issue: `Orphan Resource Explorer` doesn't correctly track orphans, making it difficult to use.
Labels: bug,topic:editor

### Godot version

4.2.beta5

### System information

Godot v4.2.beta5 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.3598) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

### Issue description

The "Orphan Resource Explorer" doesn't track resource usage correctly. For example, it doesn't identify that my animations are in use by an `AnimationPlayer`, and so if I remove these, the game will break.

<img width="786" alt="image" src="https://github.com/godotengine/godot/assets/742517/4745557e-dbaa-43bc-8557-47d429d6a7c5">

It also doesn't correctly track that Base class scripts are in use by derived classes, or that image resources are in use by Sprite animations.

I'm sure there are others as well, but these are the ones I noticed.

### Steps to reproduce

1. Open a random project and go to "Project > Tools > Orphan Resource Explorer".
2. Look for `*.res`, `*.gd` or `*.svg|png` files.

Results:
- Any scripts that are referenced by other scripts will be marked as unused.
- Animations *.res files will be marked as unused.
- Images will be marked as unused.

Expectation:
- Any resource that is required for the game to run should be marked as "Owned"

### Minimal reproduction project

N/A
Repository: go
Issue: proposal: cmd/go: error out of `go mod download` if the go.mod file is inconsistent
Labels: Proposal,GoCommand

In Go 1.11, most `go` subcommands updated the `go.mod` file implicitly whenever it was found to be inconsistent. Starting in Go 1.16, we changed the default to `-mod=readonly`, which caused commands other than the `go mod` subcommands to instead error out if changes are needed to the `go.mod` or `go.sum` file.

However, `go mod` subcommands continued to update `go.mod` files until #45551 (in Go 1.18), and `go mod download` is still the command that we use to add checksums to the `go.sum` file, especially as a workaround for issues like #56222.

#45551 suggested that:
> * `go mod download` always loads the build list and reports an error if `go.mod` needs to be updated instead of updating it automatically.
> * `go mod download` only adds a hash to `go.sum` if the corresponding module is explicitly named on the command line (not simply matched by `all` or a wildcard or implied by a lack of arguments) without an explicit version or at the version in the build list.

Unfortunately, that part of the issue was not implemented, and I don't recall why. (Perhaps @jayconrod or @matloob remembers? I wonder if it was blocked on a decision on #44435.)

Given #44435, I propose that we make a similar change as to what was suggested in #45551, but perhaps a little simpler:
- `go mod download` should report an error if it needs to load the `go.mod` file and finds that it needs to be updated.
- `go mod download` without arguments should report an error of the `go.sum` file omits any checksum needed to compute the module graph or needed for one of the modules to be downloaded (from the set of modules defined in #44435).
- `go mod download` with explicit arguments should save checksums for each module that matches an argument that does not have an explicit version suffix.
Repository: pytorch
Issue: NCCL p2p ops hung after communicator aborts
Labels: oncall: distributed,module: c10d

I noticed there is a case when using p2p ops when 1 rank aborts their communicators, the other ranks which are sending messages to that rank will hang.

Example script (requires >= 3 GPUs):
`NCCL_DEBUG=WARN TORCH_SHOW_CPP_STACKTRACES=1 TORCH_CPP_LOG_LEVEL=INFO torchrun --nnodes=1 --nproc-per-node=3 p2p_hang.py`

```python
# NCCL_DEBUG=WARN TORCH_SHOW_CPP_STACKTRACES=1 TORCH_CPP_LOG_LEVEL=INFO torchrun --nnodes=1 --nproc-per-node=3 p2p_hang.py
import torch
import torch.distributed as dist
import os
from datetime import timedelta

rank = int(os.environ["LOCAL_RANK"])
world_size = int(os.environ["WORLD_SIZE"])
dist.init_process_group("nccl", rank=rank, world_size=world_size, timeout=timedelta(seconds=10))

t = torch.zeros((5)).to(rank)
if rank == 0:
    t = torch.ones_like(t)
    w1 = dist.isend(t, 1)
    w2 = dist.irecv(t, 1)
elif rank == 1:
    w1 = dist.irecv(t, 0)
    w2 = dist.isend(t, 2)
elif rank == 2:
    w1 = dist.irecv(t, 1)
    w2 = dist.isend(t, 1)
```

Here we will see the logs as rank 1 finishes its operations and exits.

```
[rank1]:[I ProcessGroupNCCL.cpp:1204] [Rank 1] Destroyed 1communicators on CUDA device 1:2
[rank1]:[I ProcessGroupNCCL.cpp:1204] [Rank 1] Destroyed 1communicators on CUDA device 0:1
```

Still, rank 2 is attempting to send to rank 1, and rank 0 is attempting to recv from rank 1. Both of these are hung and the NCCL Watchdog does not kick in.

I have yet to debug where in `ProcessGroupNCCL` it is getting hung at.

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @kwen2501 @awgu @penguinwu @fegin
Repository: rust
Issue: Similarly named macros aren't suggested for incorrect macro names in anyhow
Labels: A-diagnostics,A-macros,T-compiler

### Code

```Rust
use anyhow;

fn main() {
    // should be format_err!()
    anyhow::format_error!("foo");
}
```


### Current output

```Shell
error[E0433]: failed to resolve: could not find `format_error` in `anyhow`
 --> src/main.rs:5:13
  |
5 |     anyhow::format_error!("foo");
  |             ^^^^^^^^^^^^ could not find `format_error` in `anyhow`
```


### Desired output

```Shell
error[E0433]: failed to resolve: could not find `format_error` in `anyhow`
 --> src/main.rs:5:13
  |
5 |     anyhow::format_error!("foo");
  |             ^^^^^^^^^^^^ help: a macro with a similar name exists: `format_err`
```


### Rationale and extra context

This works for `ppanic!()`, so maybe the threshold similarity threshold isn't being met in the anyhow case?

### Other cases

_No response_

### Anything else?

_No response_
Repository: pytorch
Issue: Provide a way to AOT torch.compile and serialize a model
Labels: oncall: distributed,feature,triaged,oncall: pt2,module: dynamo,module: startup-tracing-compile

### 🚀 The feature, motivation and pitch

For large scale training jobs, it is very common to run the same model architecture multiple times across several jobs. For models which can be trained using just DataParallel training, there is a large amount time spent just compiling the model before actual training begins.

For N gpus where N is large, this is quite wasteful and expensive since all the GPUs are doing exactly the same work and compiling the exact same model on exactly same input shapes/types.

Note that despite using `TORCHINDUCTOR_CACHE_DIR` and `TRITON_CACHE_DIR` and pre-populating both caches from previous jobs, the compile times can still be > 30 mins.

There are only a handful of input shapes/types that we need to recompile for and these are known ahead of time. As a result, ideally it would be great to `torch.compile` AOT with a single GPU, serialize that model and load it for training on a large number of GPUS without having to incur any compile overhead during training.

### Alternatives

_No response_

### Additional context

_No response_

cc @mrshenli @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @ezyang @msaroufim @bdhirsh @anijain2305 @zou3519 @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng @kiukchung @lucasllc @d4l3k
Repository: neovim
Issue: Ctrl+PgUp/PgDown don't work in rxvt-unicode
Labels: bug,status:blocked-external,environment,tui

### Problem

Neovim doesn't seem to support some special key combinations in rxvt-unicode which supports neither modifyOtherKeys nor CSI u, but it does specify those key codes in [extended terminfo capabilities like `kPRV5`/`kNXT5`](https://github.com/kovidgoyal/kitty/issues/1220) ([another relevant link](https://github.com/exg/rxvt-unicode/commit/29cbf27a9dbf9d3da1ce5dfa1db619892c03c2a8)). This is likely due to libtermkey itself not having that support, unfortunately.

### Steps to reproduce

Preparation:
```console
# fresh X server with no resources (default urxvt config)
Xephyr -parent $WINDOWID :1

# fresh Fedora with no config
docker pull fedora:40@sha256:2d988c7cded7a8e3c0540763550a49db53c674d5974a52a96a509c867ae3bd5e
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:1 -h "$HOSTNAME" -v "$HOME"/.Xauthority:/root/.Xauthority fedora:40

# install packages including /usr/share/doc
dnf install -y --setopt='tsflags=' rxvt-unicode neovim tmux xterm

# use rxvt-unicode upstream's terminfo as the ncurses-shipped one doesn't specify caps for special keys
# Debian ships this in their ncurses-base package, Fedora needs extra tic invocation
tic -x /usr/share/doc/rxvt-unicode/etc/rxvt-unicode.terminfo

nvim --clean
```

now press i, C-V, C-PageUp, C-V, C-PageDown

### Expected behavior

`<C-PageUp><C-PageDown>` should be inserted, but nothing happens.

If nvim is run inside of tmux inside of rxvt-unicode, that's exactly what happens, because tmux understands `kPRV5`/`kNXT5` (see e.g. https://github.com/kovidgoyal/kitty/issues/1220) terminfo caps but talks modifyOtherKeys/CSI-u (dunno which) with nvim. In xterm it works as well, presumably via modifyOtherKeys.

### Neovim version (nvim -v)

0.9.4

### Vim (not Nvim) behaves the same?

Yes, but in vim it's trivial to `exe "set <F13>=\<Esc>[5^"` and then use that in keybindings.

### Operating system/version

Linux

### Terminal name/version

rxvt-unicode 9.31

### $TERM environment variable

rxvt-unicode-256color

### Installation

Fedora rawhide as of 2023-11-08 — presumably close to F39 but nvim is two patch-versions behind there