sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: Crash when using old `TSNode` after reparse
Labels: bug-crash,treesitter

### Problem

It is possible to crash Neovim by using a `TSNode` (or a query cursor) of a tree that was edited afterwards.

Details: https://github.com/neovim/neovim/pull/31631#discussion_r1898103653
TL;DR: 
1. Subtrees in tree-sitter are reference counted, but nodes and query cursors (which reference the subtree) do not contribute to the reference count.
2. Parsing might free the old subtree.
3. Some operation on nodes reference the subtree, and when it was freed, Neovim crashes.

This issue was submitted to tree-sitter, but closed: https://github.com/tree-sitter/tree-sitter/issues/4044#event-15776372680

### Steps to reproduce

minimal.lua:
```lua
local line = 'vim.api.nvim_win_set_cursor(0, { 1, 0 });'
local lines = {}
for i = 1, 2000 do lines[i] = line end

local lines2 = { 'local _ = "' .. line }
for i = 2, 1999 do lines2[i] = line end
table.insert(lines2, line .. '"')

vim.api.nvim_buf_set_lines(0, 0, -1, true, lines)

vim.treesitter.start(0, 'lua')
local parser = vim.treesitter.get_parser(0)
parser:parse()

local trees = {}
for k, tree in pairs(parser:trees()) do
  trees[k] = tree:copy()
end

local nodes = {}
local function add_all(node)
  table.insert(nodes, node:child())
  for child in node:iter_children() do
    add_all(child)
  end
end
add_all(parser:parse(true)[1]:root())

vim.api.nvim_buf_set_lines(0, 0, -1, true, lines2)
parser:parse(true)
trees = nil
collectgarbage("collect")

vim.api.nvim_buf_set_lines(0, 0, -1, true, lines)
parser:parse()
collectgarbage("collect")

vim.keymap.set('n', 'a', function()
  for _, node in ipairs(nodes) do
    node:has_changes()
  end
  print('ended')
end)
```

```shell
nvim --clean -u minimal.lua
```

Pressing `a` will crash neovim

### Expected behavior

Neovim should not crash, or the docs should mention that it is possible to crash.

### Nvim version (nvim -v)

NVIM v0.11.0-dev-1422+g35247b00a4

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

N/A

### Operating system/version

Ubuntu 24.04

### Terminal name/version

XTerm(390)

### $TERM environment variable

xterm

### Installation

build from repo
Repository: angular
Issue: NgIf Else Block Breaks Hydration
Labels: area: core,state: needs more investigation,P3,core: hydration

### Which @angular/* package(s) are the source of the bug?

common

### Is this a regression?

No

### Description

The new built-in `@if` block seems to ignore the `@else` block during hydration, ensuring an consistent markup structure after the application becomes stable. However, the legacy NgIf is unaware of the hydration context and still render the else block, producing a markup structure that canno t be hydrated. See the reproduction repo for details.


### Please provide a link to a minimal reproduction of the bug

https://github.com/Char2sGu/issue-hydration-ngif

### Please provide the exception or error you saw

```true

```

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 19.0.6
Node: 22.3.0
Package Manager: npm 10.8.1
OS: linux x64

Angular: 19.0.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.6
@angular-devkit/build-angular   19.0.6
@angular-devkit/core            19.0.6
@angular-devkit/schematics      19.0.6
@angular/cli                    19.0.6
@angular/ssr                    19.0.6
@schematics/angular             19.0.6
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0
```

### Anything else?

This should probably be noted in the documentation section of structural directives: all structural directives should try to avoid manipulating the view container during hydration (before the application first becomes stable).
I initially encountered this issue when authoring a structural directive.
Repository: yt-dlp
Issue: [twitter] Intermittent "Failed to parse JSON" errors
Labels: cant-reproduce,site-bug

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

SA

### Provide a description that is worded well enough to be understood

I have updates yt-dlp to the last version
When i try to download a twitter video i found this error (it is the first time i encounter it)
What is the issue ?

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
ERROR: [twitter] 1873063443525501019: 1873063443525501019: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
```
Repository: svelte
Issue: Improve Spring data typing, or improving it so it doesn't bother about unsupported data types
Labels: types / typescript,transition/animation

### Describe the problem

Issue #14840 made me suggest the following typing for the `Spring` class:

```diff
+ type MotionPrimitive = number | Date;
+ interface MotionRecord {
+     [x: string]: MotionPrimitive | MotionRecord | (MotionPrimitive | MotionRecord)[];
+ };

- export class Spring<T> {
+ export class Spring<T extends MotionRecord['']> {
```

This is because the current Spring logic throws if say, a value of type `string` is found in its recursive logic.  But what if the throwing doesn't happen?

### Describe the proposed solution

Two possible options:

1. We improve the typing around the `Spring` class as proposed here.
2. We remove the throwing part and instead the value is simply ignored ([this ELSE statement](https://github.com/sveltejs/svelte/blob/7f8acb8a3705e1c9612f0d56e3a94596f0db1ef3/packages/svelte/src/motion/spring.js#L52)).

If the second option, then type parameter `T` doesn't require constraining and people can pass anything as value to the spring object, but then documentation must be updated to make devs aware that only numbers or dates can be sprung.

### Importance

nice to have
Repository: ui
Issue: [bug]: Next 15 docs incorrectly state that CMDK works with react 19
Labels: bug

### Describe the bug

The [docs state](https://ui.shadcn.com/docs/react-19#upgrade-status) that cmdk works with react 19, [but it does not](https://github.com/pacocoursey/cmdk/issues/266)?

### Affected component/components

Command

### How to reproduce

1. Create a Next project
2. Install shadcn command component
3. Create a build


```bash
npx create-next-app@latest cmdk-react-19 --yes
cd cmdk-react-19
npx shadcn@latest add command
npm run build
```


### Codesandbox/StackBlitz link

https://stackblitz.com/edit/stackblitz-starters-v3swgmy5

### Logs

```bash
> cmdk-react-19@0.1.0 build
> next build

   ▲ Next.js 15.1.3

   Creating an optimized production build ...
(node:43401) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:43403) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ✓ Compiled successfully
   Linting and checking validity of types  ...Failed to compile.

./components/ui/command.tsx:12:20
Type error: Type 'ForwardRefExoticComponent<Children & Pick<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, "key" | ... 1 more ... | keyof HTMLAttributes<...>> & { ...; } & RefAttributes<...>> & { ...; }' does not satisfy the constraint 'keyof IntrinsicElements | ForwardRefExoticComponent<any> | (new (props: any) => Component<any, {}, any>) | ((props: any) => ReactNode)'.
  Type 'ForwardRefExoticComponent<Children & Pick<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, "key" | ... 1 more ... | keyof HTMLAttributes<...>> & { ...; } & RefAttributes<...>> & { ...; }' is not assignable to type 'ForwardRefExoticComponent<any>'.
    Type 'import("/Users/mathii/projects/cmdk-react-19/node_modules/cmdk/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
      Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
        Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

  10 |
  11 | const Command = React.forwardRef<
> 12 |   React.ElementRef<typeof CommandPrimitive>,
     |                    ^
  13 |   React.ComponentPropsWithoutRef<typeof CommandPrimitive>
  14 | >(({ className, ...props }, ref) => (
  15 |   <CommandPrimitive
```


### System Info

```bash
MacOS
Node v22.12.0
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: rust
Issue: Tracking issue for release notes of #133870: Stabilize `asm_goto` feature gate
Labels: A-inline-assembly,T-lang,relnotes,F-asm,needs-triage,relnotes-tracking-issue


This issue tracks the release notes text for #133870.

### Steps

- [ ] Proposed text is drafted by PR author (or team) making the noteworthy change.
- [ ] Issue is nominated for release team review of clarity for wider audience.
- [ ] Release team includes text in release notes/blog posts.

### Release notes text

The responsible team for the underlying change should edit this section to replace the automatically generated link with a succinct description of what changed, drawing upon text proposed by the author (either in discussion or through direct editing).

````markdown
# Category (e.g. Language, Compiler, Libraries, Compatibility notes, ...)
- [Stabilize `asm_goto` feature gate](https://github.com/rust-lang/rust/pull/133870)
````

> [!TIP]
> Use the [previous releases](https://doc.rust-lang.org/nightly/releases.html) categories to help choose which one(s) to use.
> The category will be de-duplicated with all the other ones by the release team.
>
> *More than one section can be included if needed.*

### Release blog section

If the change is notable enough for inclusion in the blog post, the responsible team should add content to this section.
*Otherwise leave it empty.*

````markdown
````

cc @nbdd0121, @tmandry -- origin issue/PR authors and assignees for starting to draft text
Repository: pytorch
Issue: Add differentiable flag to SGD
Labels: module: optimizer,triaged

### 🚀 The feature, motivation and pitch

When using SGD on cuda, it defaults to the foreach implementation. Because SGD is so simple, this often doesn't call any non differentiable operations, but when using weight_decay, it calls _foreach_add which is nondifferentiable. 

Currently, to make cuda SGD w/ weight_decay differentiable, you need to pass in foreach=False which feels unintuitive, so adding a differentiable flag would be more clear.

### Alternatives

_No response_

### Additional context

I can probably do this one!

cc @vincentqb @jbschlosser @albanD @janeyx99 @crcrpar
Repository: godot
Issue: Godot4.4dev7: Using `@warning_ignore` annotation at function signature level is broken
Labels: discussion,topic:gdscript

### Tested versions

- Reproducible in v4.4.dev7.mono.official [46c8f8c5c]
- Works on v4.4.dev6.mono.official [1f47e4c4e]

### System information

Windows 11

### Issue description

I updated my CI-PR workflow to Godot4.4dev7 and it fails now
It reports now the warning and is ignoring the `@warning_ignore("unsafe_method_access")`
`[Ignore]Line 13 (UNSAFE_METHOD_ACCESS):The method "line_number()" is not present on the inferred type "Node" (but may be present on a subtype).
`
The annotation was working before on function signature level but is now ignored, this is a regression


### Steps to reproduce

```
extends Node


@warning_ignore("unsafe_method_access")
func check(test_case :Node) -> void:
	#@warning_ignore("unsafe_method_access")
	test_case.line_number()
```

### Minimal reproduction project (MRP)

n/a
Repository: PowerToys
Issue: Let users change the New+ keyboard shortcut to open Templates in a new window
Labels: Needs-Triage

### Description of the new feature / enhancement

If a user presses CTRL+SHIFT+N to try creating a new folder in File Explorer, the Templates folder will open in a new window. It'd be great to change the New+ keyboard shortcut that opens the Templates folder in a new window, so that CTRL+SHIFT+N can always create a new folder.

### Scenario when this would be used?

Add a **Keyboard Shortcut** option.
The default keyboard shortcut for opening the Templates folder in a new window is CTRL+SHIFT+N.
Let a user edit the keyboard shortcut for opening the Templates folder in a new window.

### Supporting information

Changing a keyboard shortcut for opening the Templates folder in a new window can have less conflicts with pressing CTRL+SHIFT+N in File Explorer to create a new folder.
Repository: ui
Issue: [bug]: `add --path` is broken 
Labels: bug

### Describe the bug

I haven't found any combination of arguments to get a custom path out of the add function

https://github.com/shadcn-ui/ui/blob/1081536246b44b6664f4c99bc3f1b3614e632841/packages/cli/src/commands/add.ts#L127

I noticed in the code that it resolves CWD, but passing that as an option as well doesn't work
https://github.com/shadcn-ui/ui/blob/1081536246b44b6664f4c99bc3f1b3614e632841/packages/cli/src/commands/add.ts#L54

### Affected component/components

CLI

### How to reproduce

`npx shadcn@latest add -c . --path src button`

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Node 22, NPM 10.9.0
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: next.js
Issue: Nextra and MDX generation doesn't work with Turbopack
Labels: Turbopack,Pages Router,Markdown (MDX)

### Link to the code that reproduces this issue

https://github.com/frogermcs/next-issue-reproduce

### To Reproduce

In the App Router config, I want to add Nextra, which lands in /pages directory. 
Renderring the page without turbopack works as expected, while using turbopack results with error, as described below.

Steps to reproduce:
- npm run dev with `--turbopack` results with the issue
- Running the same without `--turbopack` results with page rendered as expected.

To reproduce, visit: http://localhost:3001/docs

Console output:
```
---------------------------
content is not available as task execution failed

Caused by:
- content is not available as task execution failed
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of *Project::client_changed failed
- Execution of *PageEndpointOutput::client_assets failed
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of create_page_loader_entry_module failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed
```

### Current vs. Expected behavior

When visiting page while turbopack is enabled, I get server error (console log pasted above)

Server Error

Error: An unexpected Turbopack error occurred. Please see the output of `next dev` for more details.

This error happened while generating the page. Any console logs will be displayed in the terminal window.
getServerError
node_modules/next/src/client/components/react-dev-overlay/internal/helpers/node-stack-frames.ts (31:36)
getServerError
node_modules/next/src/client/index.tsx (940:17)

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.1.3 // Latest available version is detected (15.1.3).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


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

Markdown (MDX), Pages Router, Turbopack

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

next dev (local)

### Additional context

I tried it on:
- nextjs 5.0.2 and 5.1.3
- node 19 and 22
Repository: godot
Issue: RigidBody2D freezes when accessing GlobalRotation or GlobalPosition inside _physics_process while the camera is moving and the RigidBody is the child of a Parallax2D node.
Labels: bug,topic:physics,topic:2d

### Tested versions

4.4.dev 7 - mono

### System information

Windows 11

### Issue description

When using a Parallax2D in combination with a RigidBody2D node, the RigidBody2D will freeze while the camera is moving and the RigidBody2D GlobalPosition or GlobalRotation is accessed (e.g. print).

### Steps to reproduce

Create a 2D scene, add a Parallax2D node, to this node add a Rigidbody2D (add something to visualize it, like a Sprite2D).
Add a script to the Rigidbody2D that accesses its GlobalPosition. For simplicity, print its GlobalPosition during _physics_process.
Add a Camera2D to the scene. Add a script that moves the camera each frame.

Running the project, the Rigidbody2Ds motion will be broken.
Deactivate either the camera-script or the RigidBody2Ds script, motion will work again.

I've attached a mrp to produce the effect (it uses c#, so please use the mono-version).

### Minimal reproduction project (MRP)

[mrp-gp.zip](https://github.com/user-attachments/files/18267703/mrp-gp.zip)
Repository: rust
Issue: Dependency of rustc_fluent_macros getting compiled with -Ztls-model=initial-exec
Labels: T-compiler,T-bootstrap,A-thread-locals,C-bug

Proc macros must not be compiled with `-Ztls-model=initial-exec` as `-Ztls-model=initial-exec` is incompatible with dlopen. Glibc is somewhat lenient with dlopening dylibs compiled with `-Ztls-model=initial-exec` for as long as there is room, but other libc implementations may not provide enough room or provide room at all. For example on FreeBSD trying to use rustc_driver results in the following error:

https://cirrus-ci.com/task/4557776715776000

```
error: /.rustup/toolchains/nightly-2024-12-28-x86_64-unknown-freebsd/lib/rustlib/x86_64-unknown-freebsd/lib/librustc_fluent_macro-60e8ff74c2f2aaa5.so: No space available for static Thread Local Storage
  --> src/lib.rs:16:1
   |
16 | extern crate rustc_middle;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
```

To fix this issue, the set of exclusions at https://github.com/rust-lang/rust/blob/ceb0441e82259c6fca91aa5aea391e9d0f3ec272/src/bootstrap/src/bin/rustc.rs#L166-L173 needs to be updated to include all direct and indirect dependencies of the rustc_fluent_macros crate.
Repository: ui
Issue: [bug]: shadcn website light/dark toggle broken
Labels: bug

### Describe the bug

I had the docs open then started using the theme toggle on the website to see what certain blocks/components would look like in dark mode. After that I set it back to light mode and stepped away. Then this video happened, please be warned it flashes **very** fast, so I am wrapping the link that way there is no chance it will auto-play when viewing this issue.

`https://github.com/user-attachments/assets/757feda6-8c21-44f6-9f6b-854ec58a698a`

Not sure if this is an issue with the site or something weird with next-themes but I figured I would make a bug report here to let you know regardless.

### Affected component/components

None, this is the shadcn site

### How to reproduce

Go to components page.
Toggle themes ~10 times
Leave on light mode
???
(this was all I did)

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Windows 10, Msft Edge
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: neovim
Issue: `vim.lsp.enable()`: do not launch LSP server if root dir not found (like `single_file_support=false` from nvim-lspconfig)
Labels: enhancement,has:workaround,lsp

### Problem

Many LSPs can initialize without a root dir, but their usefulness may be heavily limited. For instance, without a compile_commands.json, clangd is quite helpless. In such a case it may be preferred to not have the language server active at all, as their presence is more distracting than helpful.

### Expected behavior

`vim.lsp.enable()` could be made to respect a new flag in `vim.lsp.Config` that works similarly to `single_file_support` from `nvim-lspconfig`. This flag would tell `vim.lsp.enable()` to only launch the language server when one of the `root_markers` specified in `vim.lsp.Config` is found.
Repository: rust
Issue: `Methods from Deref<Target=[T]>` doesnt appear for type aliases
Labels: T-rustdoc,C-bug,A-rustdoc-js,T-rustdoc-frontend

I have a type alias for a type that implements `Deref<Target=[T]`, but Rustdoc doesnt generate the corresponding section in the sidebar like it does for the concrete type I'm aliasing

```rust
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct Col<T: Copy, const N: usize> {
    data: [T; N],
}

pub type Mat<T, const H: usize, const W: usize> = Col<Col<T, W>, H>;

// snip

impl<T: Copy, const N: usize> Deref for Col<T, N> {
    type Target = [T];

    fn deref(&self) -> &Self::Target {
        &self.data
    }
}

```

rustdoc 1.82.0 (f6e511eec 2024-10-15) on macOS 15.2