Skip to content

feat: Trigger flycheck if non-workspace files get modified#21483

Merged
Veykril merged 1 commit into
rust-lang:masterfrom
Veykril:push-vswqqvzqyvnv
Jan 18, 2026
Merged

feat: Trigger flycheck if non-workspace files get modified#21483
Veykril merged 1 commit into
rust-lang:masterfrom
Veykril:push-vswqqvzqyvnv

Conversation

@Veykril
Copy link
Copy Markdown
Member

@Veykril Veykril commented Jan 16, 2026

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 16, 2026
@Veykril Veykril enabled auto-merge January 16, 2026 12:42
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
@Veykril Veykril added this pull request to the merge queue Jan 18, 2026
Merged via the queue into rust-lang:master with commit 54dd939 Jan 18, 2026
15 checks passed
@Veykril Veykril deleted the push-vswqqvzqyvnv branch January 18, 2026 09:11
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2026
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Mar 31, 2026
Previously, Config::root_path() would always return the LSP rootUri of
the first workspace folder. This can cause issues when the user has
multiple workspaces open in their editor, especially if the first one
in the list isn't a Rust project.

This was noted as an issue in rust-lang#21483, and added
comments suggesting that we should deprecate root_path().

This change splits root_path() into a `workspace_root_for()` function
that handles the multiple workspace case correctly, and a
`default_root_path()` fallback.

This is particularly useful when the user has configured
project-relative paths to e.g. their discover command or rustfmt, but
it's the correct behaviour in general.

AI disclosure: First draft was written with Claude Opus.
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Mar 31, 2026
Previously, Config::root_path() would always return the LSP rootUri of
the first workspace folder. This can cause issues when the user has
multiple workspaces open in their editor, especially if the first one
in the list isn't a Rust project.

This was noted as an issue in rust-lang#21483, and added
comments suggesting that we should deprecate root_path().

This change splits root_path() into a `workspace_root_for()` function
that handles the multiple workspace case correctly, and a
`default_root_path()` fallback.

This is particularly useful when the user has configured
project-relative paths to e.g. their discover command or rustfmt, but
it's the correct behaviour in general.

AI disclosure: First draft was written with Claude Opus.
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Mar 31, 2026
Previously, Config::root_path() would always return the LSP rootUri of
the first workspace folder. This can cause issues when the user has
multiple workspaces open in their editor, especially if the first one
in the list isn't a Rust project.

This was noted as an issue in rust-lang#21483, and added
comments suggesting that we should deprecate root_path().

This change splits root_path() into a `workspace_root_for()` function
that handles the multiple workspace case correctly, and a
`default_root_path()` fallback.

This is particularly useful when the user has configured
project-relative paths to e.g. their discover command or rustfmt, but
it's the correct behaviour in general.

AI disclosure: First draft was written with Claude Opus.
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 6, 2026
Previously, Config::root_path() would always return the LSP rootUri of
the first workspace folder. This can cause issues when the user has
multiple workspaces open in their editor, especially if the first one
in the list isn't a Rust project.

This was noted as an issue in rust-lang/rust-analyzer#21483, and added
comments suggesting that we should deprecate root_path().

This change splits root_path() into a `workspace_root_for()` function
that handles the multiple workspace case correctly, and a
`default_root_path()` fallback.

This is particularly useful when the user has configured
project-relative paths to e.g. their discover command or rustfmt, but
it's the correct behaviour in general.

AI disclosure: First draft was written with Claude Opus.
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 9, 2026
Previously, Config::root_path() would always return the LSP rootUri of
the first workspace folder. This can cause issues when the user has
multiple workspaces open in their editor, especially if the first one
in the list isn't a Rust project.

This was noted as an issue in rust-lang/rust-analyzer#21483, and added
comments suggesting that we should deprecate root_path().

This change splits root_path() into a `workspace_root_for()` function
that handles the multiple workspace case correctly, and a
`default_root_path()` fallback.

This is particularly useful when the user has configured
project-relative paths to e.g. their discover command or rustfmt, but
it's the correct behaviour in general.

AI disclosure: First draft was written with Claude Opus.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants