sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: LSP client should be able to handle snippets that use $0 as a tabstop
Labels: lsp,snippet

### Problem

When LSP snippets are enabled, completion behaves in an annoying way where the snippet placeholder is not preselected.
Under the hood, this is what is being sent to the client: `textEditText = "print(${0:object})"`
![not_working](https://github.com/neovim/neovim/assets/15970653/8f1928ab-62a8-4458-881c-179414a9974b)



I've tried patching dart LSP server so that it sends `textEditText = "print(${1:object})"` instead. It works as expected:
![working](https://github.com/neovim/neovim/assets/15970653/02587f79-a6ad-477b-95e0-fa9bcbe2c271)


The first scenario works as expected in VSCode. I've checked what [LSP spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax) says about it but I'd say it's pretty vague.
> The number is the order in which tab stops will be visited, whereas $0 denotes the final cursor position.


I wanted to submit this patch to the Dart SDK however after consulting it with the Dart team they said if something is unclear in LSP spec then it's generally a good idea to treat VSCode as a reference implementation of LSP client.

tl;dr I feel like it's a missing edge case that's currently not being handled by Neovim LSP

### Steps to reproduce using "nvim -u minimal_init.lua"

I've added the following test locally (`test/functional/lua/snippet_spec.lua`):


### ❌ failing test (that should pass)
```lua
  it('expands snippet with placeholder that starts counting from 0', function()
    test_expand_success({ 'print(${0:object})' }, { 'print(object)' })
    feed('1<Esc>')
    eq({ 'print(1)' }, buf_lines(0))
  end)
```
```
RUN      T12 vim.snippet expands snippet with placeholder that starts counting from 0: 7.00 ms FAIL
test/functional/lua/snippet_spec.lua:130: Expected objects to be the same.
Passed in:
(table: 0x768a2e5ee440) {
 *[1] = 'print(1object)' }
Expected:
(table: 0x768a2e69ed98) {
 *[1] = 'print(1)' }
 ```

### ✅ passing test (that should keep passing)
```lua
  it('expands snippet with placeholder that starts counting from 0', function()
    test_expand_success({ 'print(${1:object})' }, { 'print(object)' })
    feed('1<Esc>')
    eq({ 'print(1)' }, buf_lines(0))
  end)
```

### Expected behavior

_No response_

### Neovim version (nvim -v)

NVIM v0.10.0

### Language server name/version

SDK 3.4.1 (I checked git blame in SDK and it's always been like that)

### Operating system/version

EndeavourOS 6.9.2-arch1-1

### Log file

_No response_
Repository: godot
Issue: Animation Player: Accessing single property prints warnings
Labels: bug,topic:animation

### Tested versions

v4.2.1.stable.official [b09f793f5]
(worked as expected in 4.1)

### System information

Godot v4.2.1.stable - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

### Issue description

In the Animation Player, when accessing a single property of a, say, vector 2 (for example if I want to animate only Y in position.y), every time a property is accessed a warning message gets printed out to the console:
"editor/animation_track_editor.cpp:4113 - Could not determine track hint for 'wallpaper:position:y' because its base property is null."

Once the project is launched, the Animation Player functions as expected and I was not able to see any issues.

### Steps to reproduce

Add a property like "position" to an Animation Player and change it to work only on, for example, y. Here is the video showing it in action:

https://archive.org/download/ShowFlowFleetingWorld/画面収録%202024-06-09%2014.02.42.mov

### Minimal reproduction project (MRP)

Any Animation Player will do.
Repository: go
Issue: crypto/tls: do not enforce legacy_record_version while reading TLS 1.3 records
Labels: NeedsInvestigation

### Go version

go version go1.21.6 linux/amd64

### Output of `go env` in your module/workspace:

```shell
[...]
```


### What did you do?

Called crypto/tls tls.Client() to connect to particular TLS server with TLS 1.3.

### What did you see happen?

Error: "tls: received record with version 301 when expecting version 303".

### What did you expect to see?

Successful connection, no error.

I believe this is a side effect of TLS version field enforcement while _reading_ TLS records. See these particular lines in conn.go:

https://github.com/golang/go/blob/c83b1a7013784098c2061ae7be832b2ab7241424/src/crypto/tls/conn.go#L655

and

https://github.com/golang/go/blob/c83b1a7013784098c2061ae7be832b2ab7241424/src/crypto/tls/conn.go#L661

Although legacy_record_version must indeed be set to 0x0303, - as by RFC 8446 Section 5.1, - "for all records generated by a TLS 1.3 implementation other than an initial ClientHello", the very same paragraph of RFC 8446 clearly requires to otherwise ignore the legacy_record_version value, as "[t]his field is deprecated". It seems that client reading TLS records for TLS 1.3 should tolerate "wrong value" discovered in record header, possibly by completely ignoring it. And this was the exact case before version enforcement, thus enabling successful TLS 1.3 connections to some "buggy" servers, which is no longer possible with newer crypto/tls. Please, consider reverting to former version-tolerant variant.
Repository: PowerToys
Issue: Exception on opening Powershell 7.4.2 with 
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

WinGet

### Running as admin

No

### Area(s) with issue?

Command not found

### Steps to reproduce

Just open Powershell with Command not found already set up.

### ✔️ Expected Behavior

Powershell to open without any error.

### ❌ Actual Behavior

You get an error that says this:
Unhandled exception. System.Management.Automation.CmdletInvocationException: An error occurred while connecting to the catalog.
 ---> Microsoft.WinGet.Client.Engine.Exceptions.CatalogConnectException: An error occurred while connecting to the catalog.
   at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.GetPackageCatalog(CompositeSearchBehavior behavior)
   at Microsoft.WinGet.Client.Engine.Commands.Common.FinderCommand.FindPackages(CompositeSearchBehavior behavior, UInt32 limit, PackageFieldMatchOption match)
   at Microsoft.WinGet.Client.Engine.Commands.Common.FinderExtendedCommand.FindPackages(CompositeSearchBehavior behavior, PackageFieldMatchOption match)
   at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.<>c__DisplayClass1_0.<Find>b__0()
   at Microsoft.WinGet.Client.Engine.Commands.Common.ManagementDeploymentCommand.Execute[TResult](Func`1 func)
   at Microsoft.WinGet.Client.Engine.Commands.FinderPackageCommand.Find(String psPackageFieldMatchOption)
   at Microsoft.WinGet.Client.Commands.FindPackageCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
   --- End of inner exception stack trace ---
   at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
   at Microsoft.WinGet.CommandNotFound.WinGetCommandNotFoundFeedbackPredictor.WarmUp()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Furthermore, the pwsh process aborts a while after this (typical behavior when there is an unhandled exception, I think) 

### Other Software

_No response_
Repository: godot
Issue: Loose edges in mesh can crash editor during import
Labels: bug,needs testing,topic:import,topic:3d

### Tested versions

versions tested: 4.2-stable to 4.3-beta1

Release build:
- affected: 4.2.0-stable - 4.2.2-stable, 4.3.dev1 - c5f73a1783fbf35e2601134678c52ec813837384

Debug build: all versions

### System information

Godot v4.2.beta (c5f73a178) - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (8 Threads)

### Issue description

When importing a mesh with loose edges and with the advanced option `generate/occluder` set to `Mesh + Occluder` the engine will crash during the import.

In debug build:

an assertion in `simplifier.cpp` fails and causes the crash:
```
Assertion failed: (index_count % 3 == 0), function meshopt_simplifyEdge, file simplifier.cpp, line 1475.
```

In release build:

- Before c5f73a1783fbf35e2601134678c52ec813837384 the engine would also crash.
- Since c5f73a1783fbf35e2601134678c52ec813837384 the engine no longer crashes in release builds.

### Steps to reproduce

1. add glb mesh file to project
2. enable `generate/occluder` in advanced import options
3. reimport mesh

### Minimal reproduction project (MRP)

[test_mesh.glb.zip](https://github.com/user-attachments/files/15752504/test_mesh.glb.zip)
Repository: PowerToys
Issue: "an error occured while previewing this file" msg 
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.0

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

![image](https://github.com/microsoft/PowerToys/assets/172139786/7143a43a-d29d-493b-8f1d-d7fb9976410e)

on pressing shortcut for windows peek: ctrl+space

### ✔️ Expected Behavior

preview 

### ❌ Actual Behavior

error msg in pop-up

### Other Software

_No response_
Repository: PowerToys
Issue: 快捷键无法打开powerToys run 或者需要很久之后才会被打开
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.81.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

PowerToys Run

### Steps to reproduce

开机后系统托盘展示有powertoys 也可以打开设置界面 但是无法通过快捷键唤醒 powerToys run，他需要在我开机很久之后才会突然被唤醒
[2024-06-09.txt](https://github.com/user-attachments/files/15752615/2024-06-09.txt)


### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: next.js
Issue: revalidatePath doesn't invalidate the edge cache of serverless functions with a dynamic path
Labels: bug

### Link to the code that reproduces this issue

https://github.com/thibautvdu/revalidate-path-issue

### To Reproduce

1. deploy the standard sample project to vercel
2. curl -I https://revalidate-path-issue.vercel.app/api/script/test output `x-vercel-cache: MISS`
3. curl -I https://revalidate-path-issue.vercel.app/api/script/test output `x-vercel-cache: HIT`
4. visit https://revalidate-path-issue.vercel.app/api/purge-script-cache/test
5. curl -I https://revalidate-path-issue.vercel.app/api/script/test output `x-vercel-cache: HIT`

### Current vs. Expected behavior

5. should output `x-vercel-cache: REVALIDATED`

According to the documentation, revalidatePath should purge Vercel's edge cache for my serverless function's answer cached with the header "Vercel-CDN-Cache-Control". It works with static api paths, but not when the route to my serverless function contains a dynamic segment.

- Works with the route /api/script ( and /api/purge-script-cache to purge )
- But does not with the route /api/script/[variable] (and /api/purge-script-cache/[variable] to purge)

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 21.7.1
  npm: 10.5.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

### Additional context

_No response_
Repository: terminal
Issue: Terminal becomes extremely laggy after printing large amount of CJK characters
Labels: Area-Rendering,Issue-Bug,Product-Terminal

### Windows Terminal version

1.20.11381.0

### Windows build number

10.0.19045.4412

### Other Software

_No response_

### Steps to reproduce

```python 
s = '打印一个非常长的中文句子，啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊'
for _ in range(100):
    print(s)
```

```js
var s = '打印一个非常长的中文句子，啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊'
for (var i = 0; i < 100; i++) {    console.log(s)    }
```

Run any of the above script (`python` or `node`) in a WT tab. 

### Expected Behavior

It prints all the lines very quickly and you can scroll the window with ease.

### Actual Behavior

It becomes very laggy (takes seconds to print the whole thing) and after printing, the whole window becomes very laggy, you can barely scroll back and forth.

-------------

So, this problem is tricky because I can't find a reliable way to reproduce it.
All I can confirm is that:

The issue only started to happen in recent months.

It usually starts to happen after I use my computer for extended time (I leave my computer on 24/7). And once it started to appear, it will affect all the Terminal windows, old or new. And it does not matter which type, can reproduce in CMD, PS, PS7 etc. 

Furthermore, once the bug appears, the only way I can fix it is by restarting my computer. 

It only happens when printing large amount CJK characters (Chinese, Japanese, etc.). Printing ASCII characters are fine.
Repository: godot
Issue: Removing .tscn from the file manager does not remove it from Scene
Labels: discussion,topic:editor

### Tested versions

Godot 4.3 beta1

### System information

Godot v4.3.beta1 - Windows 10.0.19045 - GLES3 (Compatibility) - Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)

### Issue description

When we delete a scene (.tscn) from the file manager, this scene is not deleted from other scenes, I checked this on an empty Node3D node, and this still happens.

This only happens if we do not save the scene to which we add a new one; if we first save this scene, and then add a node and delete it, this problem does not arise

https://github.com/godotengine/godot/assets/130399274/545454c2-f2b9-4068-9624-2e2683438645

When opening a scene that doesn't exist, the following errors appear:
![err](https://github.com/godotengine/godot/assets/130399274/5af86380-73dc-448c-8223-d5bf53aed381)




### Steps to reproduce

1. Add any scene(2) to another scene(1)
2. Don't save the scene(1)
3. Delete the scene(2) from the file manager, the scene(2) has not disappeared from the scene(1)

### Minimal reproduction project (MRP)

[testskinandbones.zip](https://github.com/user-attachments/files/15753088/testskinandbones.zip)
Repository: godot
Issue: `GodotConeTwistJoint3D`: `getSolveSwingLimit` seems to return wrong member variable
Labels: bug,topic:physics,topic:3d

### Tested versions

- Present in current `master` branch
- `3.x` branch seems also affected (https://github.com/godotengine/godot/blob/3.x/servers/physics/joints/cone_twist_joint_sw.h)

### System information

N/A

### Issue description

Comparing functions with identical/similar bodies, I noticed that methods `getSolveTwistLimit` and `getSolveSwingLimit` of class `GodotConeTwistJoint3D` both return member variable `m_solveTwistLimit`:
https://github.com/godotengine/godot/blob/5833f597865c773fae3ee09fc4e31d4a243f812d/servers/physics_3d/joints/godot_cone_twist_joint_3d.h#L126-L132

I am not familiar with this code, but both being simple getters I would assume that the latter should return member variable `m_solveSwingLimit` (and that both should be `const`?). If that's indeed the case I could whip up a pull request :-)

### Steps to reproduce

N/A

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: Animation Player: after clicking on the "Add track" button, the popup menu sometimes kind of acts as if I selected the first entry
Labels: bug,topic:editor,needs testing,topic:animation

### Tested versions

v4.2.1.stable.official [b09f793f5] and 4.2.2
Wasn't happening in 4.1

### System information

Godot v4.2.1.stable - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

### Issue description

When clicking on and releasing the left mouse button on Animation Player's "New Track" button, the menu list that appears after that gets activated immediately (as if I clicked on the first entry), this one:
![image](https://github.com/godotengine/godot/assets/106015575/3f05cdda-3a36-40a7-b4e2-4a3bbccc8758)
and the "Pick Node to Animate" window appears.

If I hold the mouse button after clicking on the "New Track" and release it only after selecting the entry from the list,, it works as expected.
If I make a very quick left mouse button click, it also works as expected.

Please note that this doesn't happen always, but once it gets triggered it's happening all the time. I don't know what triggers it. I guess switching application windows is connected to it, for example if I switch from Safari to Godot and the first thing I try to do is add a new track, it's 100 % reproducible, but sometimes it works perfectly fine.

The effect can be seen in this video at 01:12 - 01:14 (recorded to document an unrelated glitch), note how quickly the list disappeared and the "Pick a Node" appeared immediately afterwards, at that moment I pressed the LMB only once.
https://archive.org/download/ShowFlowFleetingWorld/画面収録%202024-06-09%2017.28.35.mov

### Steps to reproduce

Click on the Animation Player's "Add Track" button, but don't make it a super-fast click. The menu list window will flash on the screen for a second, close by itself and then the "Pick a Node to Animate" window will appear immediately afterwards.

### Minimal reproduction project (MRP)

Any Godot project I assume.
Repository: next.js
Issue: Webpack Loader set from Webpack Plugin with Next Compiler can't accept  value contains `!(exclamation mark)`
Labels: bug,SWC

### Link to the code that reproduces this issue

https://github.com/tkow/repro-nextjs-compiler-opt-bug

### To Reproduce

1. npm i in the repo
2. npm run dev and check compile error
3. change noop-plugins.js that remove `!` from testOptions string.
4. restart `npm run dev` and compile success

### Current vs. Expected behavior

Webpack plugin option can accept `! exclamaton mark` as string

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 18.20.2
  npm: 10.5.0
  Yarn: 3.6.3
  pnpm: 8.7.6
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

SWC

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

I try to fix [@stylex/nextjjs-plugin](https://github.com/facebook/stylex/issues/190) to make available with next compiler, and I notice that error occurs when [webpack plugin passed value contains `!` character to webpack-loader as options via NormalModule.getCompilationHooks](https://github.com/tkow/stylex-next-compiler-plugin/issues/1). `@stylex/nextjjs-plugin` pass css style object to loader and they can have `!` like `!important` syntax.
I'm not sure that it's matter of Next Compiler but, it doesn't  happen with custom babel configuration. So, I would like to ask it's for Next Compiler.
Repository: material-ui
Issue: [joy-ui] Cannot set `color` or `bgcolor` of `Box` when used in Next.js
Labels: on hold,package: joy-ui,nextjs

### Steps to reproduce

Link to live example: https://codesandbox.io/p/devbox/infallible-microservice-lkjwxw?file=%2Fsrc%2Fapp%2Fpage.tsx%3A9%2C26

Steps:
1. Set up a NextJS project with `create-next-app`
2. Add JoyUI, following this guide: https://mui.com/joy-ui/integrations/next-js-app-router/
3. Attempt to add a `Box` with the `color` or `bgcolor` set on the `sx` prop to a theme variable, such as `primary.main`. (Explicit colors like `#008141` work fine.)


### Current behavior

The box stays at the default colors

### Expected behavior

The box changes to the color set. In this case, the primary color.

### Context

I'm trying to make a colored box. Notably, if you inspect the box in devtools, it looks like `"primary.main"` is being passed through unmodified, as it shows up in the CSS properties, but is ignored as invalid. It looks like the normal theme transformation is being ignored somehow.

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: macOS 14.5
  Binaries:
    Node: 21.6.0 - ~/.nvm/versions/node/v21.6.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v21.6.0/bin/npm
    pnpm: 9.2.0 - ~/.nvm/versions/node/v21.6.0/bin/pnpm
  Browsers:
    Chrome: Not Found
    Edge: Not Found
    Safari: 17.5
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4 
    @emotion/styled: ^11.11.5 => 11.11.5 
    @mui/base:  5.0.0-beta.42 
    @mui/core-downloads-tracker:  6.0.0-dev.240424162023-9968b4889d 
    @mui/joy: ^5.0.0-beta.36 => 5.0.0-beta.36 
    @mui/private-theming:  6.0.0-dev.20240529-082515-213b5e33ab 
    @mui/styled-engine:  6.0.0-dev.20240529-082515-213b5e33ab 
    @mui/system:  6.0.0-dev.240424162023-9968b4889d 
    @mui/types:  7.2.14 
    @mui/utils:  6.0.0-dev.20240529-082515-213b5e33ab 
    @types/react: 18.3.3 => 18.3.3 
    react: ^18 => 18.3.1 
    react-dom: ^18 => 18.3.1 
    typescript:  5.4.5 
```
Using Firefox v126.0
</details>


**Search keywords**: nextjs joyui palette color box
Repository: transformers
Issue: Support saving models trained with DeepSpeed in Trainer callbacks
Labels: trainer,Feature request,DeepSpeed

### Feature request

Trainer callbacks [pass a model](https://github.com/huggingface/transformers/blob/a7cab3c283312b8d4de5df3bbe719971e24f4281/src/transformers/trainer_callback.py#L418) to any registered callback, but this model cannot be saved if training with DeepSpeed Stage 3 (needs access to `Trainer.accelerator` and `Trainer.model_wrapped`)

### Motivation

I have a custom callback that logs a model to a tracking server at the end of training, but need access to `Trainer.accelerator` and `Trainer.model_wrapped` in my callback to prevent skipping saving sharded tensors. I believe this may lead to a bug in the official `wandb` callback which uses a ["fake trainer"](https://github.com/huggingface/transformers/blob/b6c9f47fd6f911450024c52e382e544e5d04387a/src/transformers/integrations/integration_utils.py#L850) (I don't use `wandb` so can't confirm, but see an error similar to one reported in another repo if I try the "fake trainer" approach in my custom callback e.g., https://github.com/OpenAccess-AI-Collective/axolotl/issues/1092)

### Your contribution

I can contribute this feature, but wanted to get guidance on the design. Roughly

* `trainer_callback.CallbackHandler` receives an additional arg, `accelerator`, which will be passed `Trainer.accelerator` on instantiation
* `trainer_callback.CallbackHandler` has an attribute `model_wrapped` which gets updated with `Trainer.model_wrapped` by `Trainer`
* `trainer_callback.CallbackHandler.call_event` will pass along `self.accelerator` and `self.model_wrapped` when calling  callbacks

This allows my callback to do something like `state_dict = accelerator.get_state_dict(model_wrapped)` and pass that along to `model.save_pretrained` as to not skip saving sharded tensors

If there is a better design or if this is better classified as a bug, please let me know