sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: GODOT 4.0/4.1 Window.NOTIFICATION_WM_CLOSE_REQUEST not being sent consistently in editor
Labels: bug,topic:editor

### Godot version

4.0.stable

### System information

Windows 10, Compatibility, Godot v4.0.stable.official [92bee43ad] & v4.1.stable.official [970459615]

### Issue description

Window.Window.NOTIFICATION_WM_CLOSE_REQUEST (the 4.0 replacement for MainLoop.NOTIFICATION_WM_QUIT_REQUEST) does not always fire when closing a program from a window using the windows exit button. Sometimes it will fire, sometimes it will not, seemingly at random? I'm trying to find a way to catch the window closing to save but this doesn't seem reliable enough.
![2023-07-08 00-00-48](https://github.com/godotengine/godot/assets/134238975/aaa4c610-da5f-42da-8128-fa81b2520fdc)


### Steps to reproduce

Attach the below code to your root node's script, you will not see the second print statement execute on all window closures. Also when I updated to 4.1, it seems to either not trigger or trigger twice, but my testing wasn't as extensive as on 4.0. Not sure if the two issues are related either. The printout that indicates the notification triggered is '1006', as indicated here: https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-constant-notification-wm-close-request

```
func _notification(what):
	print(what)
	if what == Window.NOTIFICATION_WM_CLOSE_REQUEST:
		print("bye !")
```

### Minimal reproduction project

[Notification 1006 Failure Test.zip](https://github.com/godotengine/godot/files/11988204/Notification.1006.Failure.Test.zip)
Repository: godot
Issue: Detached script editor can become frozen with multiple, differing resolution monitors on Windows
Labels: bug,platform:windows,topic:editor,topic:porting

### Godot version

4.1.stable

### System information

Windows 11, geForce 3070 TI

### Issue description

I have 3 monitors:
1. Monitor1 - leftmost, windows primary monitor, no windows open on it, 2K resolution
2. Monitor2 - center, godot window, 4K resolution
3. Monitor3 - rightmost, detached script editor window, 4K resolution

After I press F1 key, then clicking on the script editor it can now no longer be used. Clicking on it doesn't do anything, can't access the File/Edit/Search etc menus. Pressing escape doesn't help. Pressing the cross at the top right doesn't do anything.

Only way to fix is to close and re-open Godot.

### Steps to reproduce

Have multiple monitors with differing resolutions. Make your lower resolution monitor your primary monitor then open Godot and detach the script editor. Leave them on your higher resolution monitor. Press F1 then click on the script editor. If the F1 menu didn't appear on your primary monitor, you are now out of luck.

### Minimal reproduction project

No project. I can confirm resolution is the problem with the F1 menu though, as if I DONT detach the script editor and press F1, I see this:
![image](https://github.com/godotengine/godot/assets/334808/bc35f3f3-d43a-47b0-8943-ad9f8806c4b2)

Clicking and drawwing the incorrectly sized F1 window at all resizes it to the correct resolution:
![image](https://github.com/godotengine/godot/assets/334808/1196f962-4316-490f-a011-97dd4d1c4d1e)

It really should open with the correct resolution and in the center of the same monitor as the script editor.
Repository: PowerToys
Issue: FancyZones: Editor Canvas Zone, shift to scale (resizing while keeping aspect ratio)
Labels: Idea-Enhancement,FancyZones-Editor,Product-FancyZones

### Description of the new feature / enhancement

When creating custom zones in the canvas, being able to hold shift and scale (resize while keeping your aspect ratio) with your mouse.

Using arrows seems like a workaround that is not efficient. 

### Scenario when this would be used?

Useful when trying to keep the aspect ratio of the zone you are creating.

### Supporting information

This is an expected behavior common in drawing tools and graphic design utilities.
Repository: terminal
Issue: Setting to choose codepage of  new terminal session for each profile. 
Labels: Issue-Feature,Product-Conpty,Area-Settings,Product-Terminal

# Description of the new feature/enhancement
Let user to set initial/startup codepage(CP) of new terminal session in each terminal profile setting. 
The  "Advanced" or "Appearance" setting of "Default" profile and each profile will have radio buttons or dropdown menu to choose one of: 
 * Do nothing (old behavior, user default CP unless registry setting is modified. )
 * UTF-8 (CP 65001)
 * Windows-1252 (CP 1252,  extended US-ASCII similar to ISO-8859-1(West European CP)
 * Force user default CP, regardless of CP related registry settings.
 * (Optional) Custom CP chosen by user. 

Currently, each terminal session starts with CP of user-default CP. If the CP doe not match what user want, user have to change manually CP with `chcp.com` command or automatically with adding `chcp.com`  to  `HKCU\SOFTWARE\Microsoft\Command Processor\"AutoRun"` registry or modify `HKCU\Console\"CodePage"` registry entry.  All these measures are cumbersome and inflexible. Hard to change setting. Other issue even proposed to set UTF-8 as default CP. 

# Proposed technical implementation details (optional)

Implement and execute function of `CHCP.com` command in the terminal session start up routine as chose in the profile setting.
Repository: rust
Issue: Detect when a lifetime in ADT definition is missing a leading '
Labels: A-diagnostics,T-compiler

### Code

```Rust
struct S<'a> {
    x: Option<&a ()>,
}
```


### Current output

```Shell
error[E0106]: missing lifetime specifier
 --> src/lib.rs:2:15
  |
2 |     x: Option<&a ()>,
  |               ^ expected named lifetime parameter
  |
help: consider using the `'a` lifetime
  |
2 |     x: Option<&'a a ()>,
  |                ++

error[E0412]: cannot find type `a` in this scope
 --> src/lib.rs:2:16
  |
2 |     x: Option<&a ()>,
  |                ^ not found in this scope
```


### Desired output

```Shell
error[E0106]: missing lifetime specifier
 --> src/lib.rs:2:15
  |
2 |     x: Option<&a ()>,
  |               ^ expected named lifetime parameter
  |
help: if you meant to use the `'a` lifetime, add a leading `'`
  |
2 |     x: Option<&'a ()>,
  |                +
```


### Rationale and extra context

_No response_

### Other cases

_No response_

### Anything else?

_No response_
Repository: deno
Issue: `deno compile` binaries should not include `@types/node` in the npm virtual filesystem
Labels: perf,feat,compile

Deno 1.34 added support for npm imports in `deno compile`d binaries by adding a virtual filesystem containing the contents of the `node_modules` folder that gets generated when walking through the modules at compile time. This `node_modules` folder should only include npm modules directly imported by Deno modules, as well as their recursive dependencies. However, this virtual filesystem also includes the `@types/node` package, even though the compiled binary does not transpile Typescript, let alone typecheck it.

This presumably happens because the virtual filesystem is built from the `node_modules` folder built when the module graph is walked through at compile time, which does do typechecking. However, including the `node_modules` folder directly into the vfs just results in unnecessary extra weight in the binary that could be saved with not too much trouble by pruning packages that aren't recursive dependencies of those imported by Deno code.
Repository: godot
Issue: PackedScene loading and instancing in separate threads respectively triggers thread guards
Labels: discussion,topic:core,documentation,needs testing

### Godot version

4.1

### System information

Windows 11 64 Bit

### Issue description

I have a 2D world streaming system with 2 background threads that queue the following kind of jobs:

- The first thread just loads `PackedScene`s.
- The second thread calls `instantiate()`, decomposes the scene into smaller pieces following specific rules and adds the pieces savely (`call_deferred`) to the main scene with some delay between them.

This system stopped working (error spam of this kind: `get_use_parent_material: This function in this node (TileMap) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.`) when migrating from 4.0 to 4.1 because of the new thread guards. It worked fine in 4.0 and also works fine in 4.1 with `set_thread_safety_checks_enabled(false)`.

Still, I was trying to make it work with active checks to be absolutely sure about thread safety. Doing that, I stumbled over this issue:

Apparently the thread guard errors I observe stem from the specific situation when **loading a scene in one thread and then instantiate it in another**. 

In principle (according to [Thread-safe APIs](https://docs.godotengine.org/en/stable/tutorials/performance/thread_safe_apis.html) and my own experience) instantiating a `PackedScene` in a thread other than the main thread is safe (can someone confirm this for 4.1 in all cases (rendering, collision ect) ?). **The thread guard errors disappear if I move the instancing to the loading thread.** Otherwise there are 2 kinds of settings:

1. Someone can confirm that the guards are correct: Scenes should be instantiated in the thread that loaded them. In this case, I would refactor my system and move the instancing to the loading thread and the issue is fixed.
2. The guards should not trigger. Instancing is meant to be safe no matter the thread. In this case, this is a bug report.

### Steps to reproduce

This script reproduces the error. In my case `complex.tscn` is a large 2D scene with particle systems, tilemaps, sprites, collision ect, which I can not provide. If required, I can try to put a test scene together that triggers the issue.

```
extends Node2D


var thread_load
var thread_instantiate

func _ready():
	thread_load = Thread.new()
	thread_instantiate = Thread.new()
	thread_load.start(_load.bind(self))

func _load(parent):
	var scene = load("res://complex.tscn")
	thread_instantiate.start(_instantiate_add.bind(scene, parent))

func _instantiate_add(scene, parent):
	var instance = scene.instantiate()
	parent.call_deferred("add_child", instance)
```

### Minimal reproduction project

-
Repository: next.js
Issue: `cookies().has` is not a function after calling `revalidatePath`
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.13.0
      npm: 8.13.2
      Yarn: 1.22.19
      pnpm: 8.6.6
    Relevant Packages:
      next: 13.4.10-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.4
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/tom-sherman/nextjs-revalidatepath-cookie-has-bug

### To Reproduce

1. Place a call to `cookies().has()` in your component
2. Call `revalidatePath` in a server action

### Describe the Bug

Receive a runtime error after the revalidation happens:

```
Error: (0 , next_headers__WEBPACK_IMPORTED_MODULE_3__.cookies)(...).has is not a function
```

### Expected Behavior

No error should occur

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: godot
Issue: Using ResourceSaver to save Resource with cross/circle reference crashed the game
Labels: bug,topic:core,topic:gdscript,crash

### Godot version

4.1

### System information

MacOS 11.7.4, v4.1.stable.official [970459615], Vulkan forward+

### Issue description

I have a Resource of type Deck. Every Deck has an array of cards of type Card, also a Resource. I can create new cards in the Deck Resource from an `add_card` function which creates a new Card and appends it to the array. I then save the Deck with ResourceSaver. This works as you'd expect. 

Now, I also want all cards to hold a reference to the Deck it's in, so in Card, I have a variable called `deck`, of type Deck, and in the `add_card` function I assign it with `self`, since it is in the Deck Resource. When I do this I can no longer save the deck resource with ResourceSaver, the game simply shuts down with a vague message about the Debugger not running anymore. I assume Resource cant handle this type of circle reference, so not sure if this is a bug or if this working as intended.

If this is how it is supposed to work, then I suggest expanding the error message and not simply crashing the app. 

### Steps to reproduce

Deck Resource
```
extends Resource
class_name Deck

@export var id : String
@export var cards : Array[Card]

func _init():
    id = str(Time.get_unix_time_from_system()).left(-6)

func add_card():
    var new_card : Card = Card.new()
    new_card.deck = self
    cards.append(new_card)
```

Card Resource
```
extends Resource
class_name Card

@export var deck : Deck
```

Main script
```
extends Control

const SAVE_PATH = "res://projects/"
var deck = Deck.new()

func _ready():
    for i in range(2, 6):
        deck.add_card()
    
    ResourceSaver.save(deck, SAVE_PATH + deck.id + ".tres")
```

### Minimal reproduction project

-
Repository: go
Issue: sync/atomic: add Uint64Pair
Labels: help wanted,Proposal,Proposal-Accepted,compiler/runtime

I suggest CAS2 is implemented in the atomic package similar to atomic.align64, operational for hardware that supports it.

possibly also:
- atomic OR
- LL/SC Load-link/store-conditional

—

- With the 2022 memory model, go1.19 atomics became useful after years of unproductive near-sighted discussions
- However, wait-free algorithms now use CAS2, ie. 128-bit atomic, which is supported on most cpus but not in Go
- implementing CAS spinners in lock-free applications produces long thread wait-times or 100% cpu, so wait-free is better: threads are neither suspended or spinning. We will have 100 cores and 100 GiB RAM from Apple soon enough
- what is desired is a performant wait-free queue and wait-free free-list stack
- fast-path of wCQ Nikolaev Ravindran 2022 and wfq Yang Mellor-Crummey 2016
- this would enable an initial thread-pool to have wait-free and allocation-free data sink

darwin-arm64 darwin-amd64 linux-amd64

I think also atomic generics could do with another polish
Like this AtomicMax that is more flexible in what underlying integer types and named types can be used: https://github.com/haraldrudell/parl/blob/main/atomic-max.go
- by inventing align64 only in atomic, 64-bit things must go in atomic
Repository: vscode
Issue: Git - "Add to .gitignore" feature shows up for `.gitignore` file in Source Control tab
Labels: bug,help wanted,git

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: **Yes**

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.80.0
- OS Version: Linux x64

Steps to Reproduce:

1. Open a project with a git repository.
2. Make a change to the `.gitignore` file.
3. Go to the `Source Control` tab (place to stage changes, commit, and push)
4. Right click on `.gitignore`.
5. Add to `.gitignore` is there. If clicked, then it will add `.gitignore` to the `.gitignore` file. This can be done an infinite amount of times.
Repository: neovim
Issue: LSP: undoing after vim.lsp.buf.format() changes cursor position
Labels: enhancement,complexity:low,lsp,marks

### Problem

I tried with null-ls, and lsp formatters, and the behavior is that whenever calling vim.lsp.buf.format(), the cursor remains in position, which is what I would expect.

However, when undoing the formatting changes, I would expect the same behavior, seeing the changes revert back on the exact same lines displayed in the window.
But instead, the cursor jumps to the top of the window, more specifically to the lowest line number where a change was undone.

This is annoying because it makes it difficult to undo/redo formatting a couple of times to view the changes happening in a specific area.

### Steps to reproduce

open a file for which you have a formatter installed
make sure the file is not formatted in multiple areas
call vim.lsp.buf.format()
undo

### Expected behavior

the cursor and window position remains the same

### Neovim version (nvim -v)

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3

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

n/a

### Operating system/version

Linux 6.4.1-artix1-1

### Terminal name/version

alacritty 0.12.2

### $TERM environment variable

alacritty

### Installation

artix repo
Repository: TypeScript
Issue: Module Resolution: imports with JSON assertion should not need flag when module is esnext
Labels: Suggestion,Needs Proposal

### Demo Repo

https://github.com/tminuscode/resolve-json-module

### Which of the following problems are you reporting?

The module specifier resolves at runtime, but not at build time

### Demonstrate the defect described above with a code sample.

import htmlTags from 'html-tags/html-tags.json' assert { type: 'json' }

const keys = Object.keys(htmlTags)


### Run `tsc --showConfig` and paste its output here

{
    "compilerOptions": {
        "target": "es2020",
        "module": "esnext",
        "moduleResolution": "node16"
    },
    "files": [
        "./index.ts"
    ]
}


### Run `tsc --traceResolution` and paste its output here

https://pastebin.com/GzfXrXi4

*Sorry, content too long*

### Paste the `package.json` of the *importing* module, if it exists

{
  "name": "resolve-json-module",
  "dependencies": {
    "html-tags": "^3.3.1",
    "typescript": "^5.1.6"
  }
}


### Paste the `package.json` of the *target* module, if it exists

{
	"name": "html-tags",
	"version": "3.3.1",
	"description": "List of standard HTML tags",
	"license": "MIT",
	"repository": "sindresorhus/html-tags",
	"funding": "https://github.com/sponsors/sindresorhus",
	"author": {
		"name": "Sindre Sorhus",
		"email": "sindresorhus@gmail.com",
		"url": "https://sindresorhus.com"
	},
	"engines": {
		"node": ">=8"
	},
	"scripts": {
		"test": "xo && ava && tsd"
	},
	"files": [
		"index.js",
		"index.d.ts",
		"void.js",
		"void.d.ts",
		"html-tags.json",
		"html-tags-void.json"
	],
	"keywords": [
		"html",
		"html5",
		"tags",
		"elements",
		"list",
		"whatwg",
		"w3c",
		"void",
		"self-closing"
	],
	"devDependencies": {
		"ava": "^1.4.1",
		"tsd": "^0.7.2",
		"xo": "^0.24.0"
	},
	"xo": {
		"rules": {
			"import/extensions": "off"
		}
	}
}


### Any other comments can go here

I wan to use the latest ES feature of asserted imports to directly load a JSON from the package `html-tags`. The feature requires targeting `esnext` and I expected it to be enough, given the no compilation actually happens - the syntax is exactly the same in TS and JS

However, to actually make `tsc` happy, it is necessary to add `--resolveJsonModule --allowSyntheticDefaultImports`. Without these two, I'm getting these errors

> error TS2732: Cannot find module 'html-tags/html-tags.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.

`resolveJsonModule` seems completely redundant because importing JSON is supported per `assert { type: 'json' }`

> error TS1259: Module '"/Volumes/Home/projects/temp/resolve-json-module/node_modules/html-tags/html-tags"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
> [...]
> This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

I'm not sure about this. Isn't default-import the only way to import a JSON file?
Repository: PowerToys
Issue: Cursor indication of the currently selected keyboard language
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

**The problem:** As current language keyboard layout, shown on the bottom corner of the screen, it's hard to keep track of the current language selection and it leads to typing in a wrong layout, then deleting and re-type. This is quite a common pain for people working with multiple languages.

**The solution:** Add visual indication of the currently selected keyboard layout to mouse and keyboard.


### Scenario when this would be used?

All text input for people working with multiple languages.

### Supporting information

_No response_
Repository: next.js
Issue: AppRouter Suspense not working in Safari on Mac or iOS
Labels: Upstream

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
macOS Ventura 13.4.1
Safari Version 16.5.1 (18615.2.9.11.7)
```

### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/quirky-danilo-nycr3t

### To Reproduce

Open the app in Chrome `https://nycr3t-3000.csb.app/`
Observe that the page is rendered quickly and "Loading car..." is displayed until the car has loaded

Open the app in Safari `https://nycr3t-3000.csb.app/`
Observe that the page does not render until the car has loaded and never displays the "Loading car..." message 

Open the app in mobile Safari on iOS
Observe the same behaviour as on Safari on Mac

This seems like the same behaviour as when you just the curl the URL - nothing is loaded until the final HTML

If you make it so that next runs the route dynamically (e.g. add a fetch with `{ cache: 'no-store' }`) and then build and run the app locally in production mode `npm run build && npm start` the same is observed, so it's not dev server specific

### Describe the Bug

Suspense/streaming does not work in Safari

### Expected Behaviour

Same behaviour is observed in Chrome as Safari

I'm not sure about to what to expect with curl, I guess the behaviour of not rendering the page until all data is loaded makes sense since curl would not support replace the fallback of course

### Which browser are you using? (if relevant)

Safari Version 16.5.1

### How are you deploying your application? (if relevant)

_No response_