sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Edge runtime is sensitive to order of "exports" in dependency, will only use edge-light if it's defined before browser
Labels: bug,Module Resolution

### Link to the code that reproduces this issue

https://github.com/mcintyre94/edge-light-test

### To Reproduce

1. Start the application in dev mode (`npm run dev`)
2. Call the API route: `curl http://localhost:3000/api`
3. Notice in the logs: `hello from browser.mjs`
4. Change package.json from `"@callumtest/edge-light-test-package": "0.0.1",` to `"@callumtest/edge-light-test-package": "0.0.2",`
5. Install updated dependency (`npm install`)
6.  Start the application in dev mode (`npm run dev`)
7. Call the API route: `curl http://localhost:3000/api`
8.  Notice in the logs: `hello from edge.mjs`

### Current vs. Expected behavior

The only difference between these two versions is the order of `exports` in package.json. You can see this on npmjs: https://www.npmjs.com/package/@callumtest/edge-light-test-package?activeTab=versions

0.0.1 has browser first:
```json
  "exports": {
    "types": "./dist/index.d.ts",
    "browser": {
      "import": "./dist/index.browser.mjs"
    },
    "edge-light": {
      "import": "./dist/index.edge.mjs"
    }
  },
```

0.0.2 has edge-light first:
```json
  "exports": {
    "types": "./dist/index.d.ts",
    "edge-light": {
      "import": "./dist/index.edge.mjs"
    },
    "browser": {
      "import": "./dist/index.browser.mjs"
    }
  },
```

It feels unintuitive to me that the order of exports affects Next's behaviour here. I think if `edge-light` is included then it should be used, even if `browser` is also included and comes first. I don't think there's any case where a package maintainer would include `edge-light` but prefer `browser` to be used instead. 

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6031
  Available memory (MB): 65536
  Available CPU cores: 16
Binaries:
  Node: 20.15.0
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 9.2.0
Relevant Packages:
  next: 15.0.0-canary.125 // Latest available version is detected (15.0.0-canary.125).
  eslint-config-next: N/A
  react: 19.0.0-rc-1eaccd82-20240816
  react-dom: 19.0.0-rc-1eaccd82-20240816
  typescript: 5.5.4
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Developer Experience, Module Resolution

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

_No response_
Repository: PowerToys
Issue: PowerLauncher.exe causes other running MSI installers to fail to set up the shortcut
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.80 or 0.83

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

This is a race bug, so there are machines that do not experience it and those that are highly repeatable. In our case we saw it on many Windows 10 Home machines and on Windows 11 sandbox, more often during upgrade, rarely during clean install, and using msi installer rather than an exe bundle.
To reproduce PowerToys.PowerLauncher.exe bug we need msi installer that installs an application that shows "toast notifications". Such app needs a shortcut with two extra attributes:
```
 <Shortcut ... >
   <ShortcutProperty Key="System.AppUserModel.ID" Value="..."/>
   <ShortcutProperty Key="{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 26" Value="..."/>
 </Shortcut>
```
There are many such apps out there, and I guess many of them experience the issue and have trouble pinpointing the root cause, e.g.: https://github.com/microsoft/WSL/issues/11276

Steps:
- You'll need Windows 11 sandbox
- prepare an msi installer that install a shortcut with toast notification attributes. I prepared such:  https://github.com/avjts/powerlauncher-bug, clone it and build. It contains a Readme. Most likely you'll need a couple of such installers with increasing version numbers, as it is more likely to reproduce the bug during updgrade.
- confirm PowerToys.PowerLauncher.exe is running
- start MyEmptyApp-3.6.285.msi, then MyEmptyApp-3.6.295.msi, and so on, until you see a message box with "Warning 1946 ..."

In the procmon log (screenshot below), you can see PowerLauncher.exe opens MyApp.lnk in share-read mode. Then during PowerLauncher is reading .lnk contents (50ms) two other processes try to access .lnk. Microsoft Defender queries the file and msiexec tries to set attributes in exclusive mode, and they are denied.

![procmon-powerlauncher-bug](https://github.com/user-attachments/assets/34f81a71-2505-4355-9bb2-73c6490b33d8)

If you deactivate the "PowerToys Run," the problem will disappear.

Problably PowerLauncher.exe should postpone its actions a bit to allow msi installers to finish their job.

### ✔️ Expected Behavior

PowerLauncher.exe running in the background must not interfere msiexec installing shortcuts with shell attributes. 

### ❌ Actual Behavior

PowerLauncher.exe running in the background opens shortcut files created by msiexec and blocks subsequent operations performed by msiexec.

### Other Software

sample installer, that may help to reproduce the bug: https://github.com/avjts/powerlauncher-bug
Repository: godot
Issue: Subresources saving without NOTIFICATION_EDITOR_PRE_SAVE firing
Labels: discussion,topic:editor,topic:plugin,needs testing

### Tested versions

v4.3.stable.official [77dcf97d8] (also was occurring on 4.2 stable)

### System information

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated AMD Radeon RX 6600 (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

### Issue description

A node which modifies a sub-resource of a resource, for purposes of a tool script, fails to run `NOTIFICATION_PRE_SAVE` on the node before saving changes to the subresource, when saving a DIFFERENT scene in the editor.

Either the `NOTIFICATION_PRE_SAVE`/`NOTIFICATION_POST_SAVE` should fire for the node, or the changes to the subresource should not be saved (since no node using that resource or subresource is being saved?)

The actual issue here is that I have a shader which adjusts a texture size based on a tilemap; the size differs from scene to scene, but saving *any* of the scenes that uses this, appropriately resizes the texture to `1024x1024` in the `PRE_SAVE` notification - but when saving *literally any other scene*, I end up with some random other values in my git changes that I need to avoid accidentally committing. (The entire point of the PRE_SAVE here was to prevent any git changes to that...)

### Steps to reproduce

Have a tool script node that uses `NOTIFICATION_EDITOR_PRE_SAVE`, making a modification to a sub-resource of a resource of the node; and then modifies it again in `NOTIFICATION_EDITOR_POST_SAVE` or somewhere else (point being, the value while the editor is open, is different from the value on disk, as the value is always changed immediately before saving to disk).

With that scene open, save a *different* scene. `NOTIFICATION_EDITOR_PRE_SAVE` does not fire, but any changes to the sub-resource ARE saved, thus saving the value that is intended to never be saved.

### Minimal reproduction project (MRP)

[mrp_presave.zip](https://github.com/user-attachments/files/16708087/mrp_presave.zip)
With both `presave_example.tscn` and `random_other_scene.tscn` open in the editor, note the behavior when saving.
- With `presave_example.tscn` as the active scene, saving does as expected; the PRE_ and POST_ save events fire, and `dummy.tres` reads `width = 50` on the `NoiseTexture2D` as intended.
- With `random_other_scene.tscn` as the active scene, saving does NOT fire the PRE_ and POST_ save events for `presave_example.tscn`, but the changes to `dummy.tres` (which is only used by `presave_example.tscn`, and is *not at all* used by `random_other_scene.tscn`, ***are saved anyway***, thus saving `width = 200` to the `NoiseTexture2D` in `dummy.tres`.
- Additionally, note that if `presave_example.tscn` is *not open at all*, saving `random_other_scene.tscn` does NOT cause this behavior. It appears to me as though it is saving the resources used by all open scenes, instead of only the scene(s) being saved.
Repository: godot
Issue: Deadlock in `EditorNode::immediate_confirmation_dialog` when importing in headless mode with GDExtension
Labels: bug,confirmed,topic:gdextension,topic:import

### Tested versions

4.3

### System information

Windows 11, Ubuntu 24

### Issue description

As part of our CI/CD pipeline we run `./godot --editor --import --headless`. After the update to godot 4.3 we were experiencing deadlocks during this step. It seems the culprit is the confirmation dialog which is never accepted (since it is headless mode) causing this line here https://github.com/godotengine/godot/blob/568589c9d8c763bfb3a4348174d53b42d7c59f21/editor/editor_node.cpp#L5439 to never evaluate to true and the loop continuing on forever.

It seems the reason for the popup is that we are using the godot-jolt extension which requires an editor restart:

```
Some extensions need the editor to restart to take effect.
```

### Steps to reproduce

Add godot-jolt to your project
delete the .godot folder
run `./godot --editor --import --headless`

### Minimal reproduction project (MRP)

-
Repository: material-ui
Issue: MUI Context Menu should close on onPointerDown, not onClick
Labels: support: question,component: menu,enhancement

### Steps to reproduce

_No response_

### Current behavior

_No response_

### Expected behavior

_No response_

### Context

In this [example](https://mui.com/material-ui/react-menu/#context-menu) context menu should close on mouse key down (on backdrop, not item), not waiting for it's release - this is how all typical context menus (in Windows, Chrome) behave.
Are there any ways to achieve such behavior?

### Your environment

_No response_

**Search keywords**: Menu Context Menu
Repository: bitcoin
Issue: Split socket handling out of CConnman
Labels: Feature

### Please describe the feature you'd like to see added.

Split `CConnman` in two pieces:

* protocol agnostic low level socket and connection handler and
* bitcoin-p2p protocol specific handler.

This way the first part can be reused for Stratum V2 and for libevent-less RPC/HTTP server.

### Is your feature related to a problem, if so please describe it.

Doing Stratum V2 and removing libevent from RPC requires duplicating some of the code from `CConnman` - binding and listening and the send/recv io loop.

### Describe the solution you'd like

Split `CConnman` in such a way that the code can be reused.

### Describe any alternatives you've considered

Duplicate code.
Repository: react-native
Issue: When using TextInput with secureTextEntry={true} on iOS, pressing the back button erases the entire text instead of just the last character.
Labels: Platform: iOS,Resolution: PR Submitted,Component: TextInput,Component: Button,Type: Unsupported Version

### Description

When using TextInput with secureTextEntry={true} on iOS, pressing the back button erases the entire text instead of just the last character.

Expected Behavior:
The back button should erase only the last character of the input in the TextInput.

Current Behavior:
The entire text is erased when pressing the back button once.

### Steps to reproduce

1. Enter text in a TextInput with secureTextEntry={true}.
2. Focus out of the input (e.g., move to the next input field).
3. Refocus on the TextInput.
4. Press the back button to erase text.

### React Native Version

0.72.5

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M2
  Memory: 49.34 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.16.0
    path: ~/.nvm/versions/node/v20.16.0/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.1
    path: ~/.nvm/versions/node/v20.16.0/bin/npm
  Watchman:
    version: 2024.08.05.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.1.4
    path: /Users/testUser/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.5
    wanted: 0.72.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: false
```


### Stacktrace or Logs

```text
### Stacktrace or Logs


N/A
```


### Reproducer

https://github.com/S170209/TextInputIssueRepro.git

### Screenshots and Videos



https://github.com/user-attachments/assets/fcb30253-405d-48d2-9636-2c4b576e5b51
Repository: deno
Issue: Feat: add `--open` to `deno serve` to open server in browser
Labels: feat

Most dev servers allow you to pass `--open` to open the page automatically in the browser. It's a neat minor DX enhancement compared to having to click the link yourself.

When passing `deno serve --open` the browser should open the address where the server is running on. Vite goes a bit the extra mile to ensure that the same tab is re-used via some apple script vodoo https://github.com/vitejs/vite/blob/561b940f6f963fbb78058a6e23b4adad53a2edb9/packages/vite/src/node/server/openBrowser.ts#L71-L141
Repository: godot
Issue: InputEventScreenDrag and InputEventScreenTouch event.index are bug values on iOS/iPadOS web export
Labels: bug,platform:web,platform:macos,topic:porting,topic:input

### Tested versions

- Reproducible in 4.3.stable

### System information

Godot v4.3.stable - macOS 14.5.0 - GLES3 (Compatibility) - Apple M1 - Apple M1 (8 Threads)

### Issue description

On android and on my mac with mouse to touch emulation, event.index displays the expected value of 0 with the first finger, 1 with the second etc. on the web export:
<img width="273" alt="Screenshot 2024-08-22 at 11 10 21" src="https://github.com/user-attachments/assets/5cbf292a-48ac-468f-babc-942ed3188248">

On iOS/iPadOS, an overflow? value is displayed, and each subsequent touch event will increase the counter, regardless of which finger caused the event:
<img width="162" alt="Screenshot 2024-08-22 at 11 08 09" src="https://github.com/user-attachments/assets/6c3236ed-0985-40ad-9aee-ebd3ff7134ce">

I was unable to load the web export prior to 4.3.stable, due to the no threads update, so was unable to test previous versions.


### Steps to reproduce

Create a new project, paste the following code, export to web and test,

```gdscript
func _input(event: InputEvent) -> void:
	if event is InputEventScreenDrag or event is InputEventScreenTouch:
		print("_input: %s"%[event.index])
```

### Minimal reproduction project (MRP)

N/A
Repository: langchain
Issue: langchain dumps not always implemented - Improve langchain runnable serialization
Labels: Ɑ:  Runnables,Ɑ:  core

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```python
from langchain_openai import ChatOpenAI
from langchain_core.prompts import PromptTemplate
from langchain.agents import AgentExecutor, create_react_agent
from langchain.tools import BaseTool
from langchain_core.load import dumps

prompt = PromptTemplate.from_template("Answer the following questions as best you can. You have access to the following tools:\n\n{tools}\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: {input}\nThought:{agent_scratchpad}")

# Choose the LLM to use
llm = ChatOpenAI(model="gpt-3.5-turbo")

tools: list[BaseTool] = []

# Construct the ReAct agent
agent = create_react_agent(llm, tools, prompt)

# dumps to a file
with open('react-ai-agent.json', 'w') as f:
    f.write(dumps(agent))


```

### Error Message and Stack Trace (if applicable)

```python
RUNNABLE_FILE_PATH = "./react-ai-agent.json"
with open(RUNNABLE_FILE_PATH, 'r') as f:
  agent = loads(f.read(), secrets_from_env=True)
```

```
NotImplementedError: Trying to load an object that doesn't implement serialization: {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': "RunnableLambda(lambda x: format_log_to_str(x['intermediate_steps']))"}
```

### Description

Basically i just want to dumps a runnable and loads it, i want it to work for any langchain runnable

### System Info

generic langchain installation
Repository: neovim
Issue: :term duplicates lines on vsplit
Labels: bug,terminal

### Problem

Vertically-splitting a terminal results in duplicated lines in Neovim's terminal.

### Steps to reproduce

```
nvim --clean -c 'term bash' -c 'call feedkeys(repeat("a", &columns * 2)) | vsplit'
```

### Expected behavior

No duplicated lines. If you have a hard time noticing the duplicated lines, look for your bash's `$PS1` - you should see it twice in each window.

To confirm this is a bug, close one of the two windows (`<C-\><C-n>:close`) - you should then only see a single `$PS1` in your only window. `:vsplit` again, and the duplicated lines re-appear.

### Neovim version (nvim -v)

nightly/master (currently e48179f)

### Vim (not Nvim) behaves the same?

N/A

### Operating system/version

Linux

### Terminal name/version

foot version: 1.11.0 -pgo +ime -graphemes -assertions

### $TERM environment variable

xterm-256color

### Installation

Appimage/Built from source
Repository: transformers
Issue: Some casualLM models don't get position_ids in their forward pass. 
Labels: Good Second Issue,Feature request

### Feature request

There are some models such that their forward pass doesn't get position_ids. e.g. we can see that OPTModel doesn't get position_ids, while GPTJModel does get position_ids. most newer models do have position_ids.



### Motivation

There are two main reasons we would like for all LM models to get positions ids.
1. to have the API be consistent with all models.
2. position_ids are very important if you want to use flash-attention without padding, during training. if i want to be able to pack two or more sentences in the same sequence. I would like to know that the model handles the sentences accordingly and treats each sentence as it's own different sentence. flash-attention code uses position_ids to check if some sequences are packed and runs an appropriate function to make sure there is no cross example contamination. but without this the model can't use this feature. the code always checks if position_ids is not None:

https://github.com/huggingface/transformers/blob/v4.44.1/src/transformers/modeling_flash_attention_utils.py#L270

### Your contribution

I may be able to fix this and help with a PR. but would love a more experienced person to guide me.
Repository: PowerToys
Issue: Ability or option to force a shortlink remap for a "single" key (without the need to use a combination/compose key)
Labels: Needs-Triage

### Description of the new feature / enhancement

Reading the issue (https://github.com/microsoft/PowerToys/issues/7460) I have nearly the same need/problem : I would like to remap the Fn+F2 (= launch default mail application on my Logitech keyboard) to open a new compose mail window (with a shortcut like outlook.exe /c ipm.note) instead of opening the main Outlook window
But as the Fn + smthg is done through hardware and is supposed to be "translated" in the Operating System (in my case, the Fn+F2 key becomes the StartMail key), I suggest the ability to define a shortcut remap without a composition key, which is expected by KeyBoard Manager 

### Scenario when this would be used?

This is a workaround of the previously mentionned issue

### Supporting information

Nothing comes to my mind, but I would happy to provide/test if asked
Repository: TypeScript
Issue: Type is not referred correctly in the while loop
Labels: Bug,Help Wanted

### 🔎 Search Terms

incorrect type while loop

### 🕗 Version & Regression Information

Worked correctly in version 4.2.3.
It doesn't work since 4.3.5.


### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.5.4#code/MYGwhgzhAEDCAWBLEATaBTAHgF3QOxRgAkAVAWQBkBREdAW322gG8AoASAHN0mAHMAE6MAFAEoWHdsAD2eCE2bR+QvNhr1G0AL7QAvNGxIIAblaTEAM2jCAhMOWN1DVdERzsYPMHTSrABUFGUXE2djChbABXATxoPEiQEFMwrTNwnmjYh1UnRmTU1NZQSBgAlSYsXAJicmpaZwUObj5A1TEJMJl3FiVWtXrNHX1DRBM09ktrO2z+jRc3eU9vX2gAcQFPFDKgkMl2CMy4hKTJQvSomN7y3NV81kLiqDWNgm2XSvxCaFJKG8auHhXES7TqyeQ9GZ-bR6AxGUzmKy2ex9KELDxeHxWdboMDYdabN7YYIdc6HeKJZLsM77DKXSEDW4cApmR4wbG4-GvPoYHCfGq-Bn-ZpAtogmkXWLkk5U+4syLyaR0P4QAB0KHQFjc6GEACJgABaYBIVA6gA0cGNKFEpmA8uwiuVao1Wt1BpmZughOtRTtDsFqvVmrw2r1+s4LxQ+vd5s5Wz63ttCqV-qdQZDBvDOOwYYjUb6HvZeIjXvh2AAnrx0J6Uf6YYXY4ToAAfZ4E7ktwnwrrgo3IND6YMAdwtfbE8NoTFtAnKhIAXNXrrWW1KYb3UCqZvDB8aq8IpzP4x1u9JaCqQNJOHvogfytboAB6e-QCDwaQJNAAIyr9eL7dbXPKZsF0YNJ90YRt9DA1RCQ3PpTFSIA

### 💻 Code

```ts
class Child extends HTMLElement {
	get parent() {
		const { parentElement } = this;

		if (!(parentElement instanceof Parent)) {
			return null;
		}

		return parentElement;
	}
}

class Parent extends HTMLElement {
	get parent() {
		const { parentElement } = this;

		if (!(parentElement instanceof GrandParent)) {
			return null;
		}

		return parentElement;
	}
}

class GrandParent extends HTMLElement {
	get parent() {
		const { parentElement } = this;

		if (!(parentElement instanceof GreatGrandParent)) {
			return null;
		}

		return parentElement;
	}
}

class GreatGrandParent extends HTMLElement {
	get parent() {
		return null;
	}
}

// irrelevant code
customElements.define("c-child", Child);
customElements.define("c-parent", Parent);
customElements.define("c-grand-parent", GrandParent);
customElements.define("c-great-grand-parent", GreatGrandParent);

type ParentElements = GreatGrandParent | GrandParent | Parent;

const child = new Child();

let currentParent: ParentElements | null = child.parent;

while (currentParent) {
	console.log(currentParent); // should be GreatGrandParent | GrandParent | Parent

	currentParent = currentParent.parent;
}
```


### 🙁 Actual behavior

The `curerntParent`'s type is not referred correctly. It became `Parent | GrandParent`.

### 🙂 Expected behavior

The `currentParent`'s type should be `Parent | GrandParent | GreatGrandParent`.

### Additional information about the issue

_No response_