* [PATCH] remove sysroot assertion in generate_rust_analyzer.py
@ 2025-12-24 13:53 Onur Özkan
2026-01-05 15:10 ` Gary Guo
2026-01-18 19:43 ` Miguel Ojeda
0 siblings, 2 replies; 3+ messages in thread
From: Onur Özkan @ 2025-12-24 13:53 UTC (permalink / raw)
To: llvm
Cc: ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
aliceryhl, tmgross, dakr, rust-for-linux, linux-kernel,
Onur Özkan
With nixpkgs's rustc, rust-src component is not bundled
with the compiler by default and is instead provided from
a separate store path, so this assumption does not hold.
The assertion assumes these paths are in the same location
which causes `make LLVM=1 rust-analyzer` to fail on NixOS.
Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
Signed-off-by: Onur Özkan <work@onurozkan.dev>
---
scripts/generate_rust_analyzer.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 147d0cc94068..e69fa5e0a9b9 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -213,9 +213,6 @@ def main():
level=logging.INFO if args.verbose else logging.WARNING
)
- # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain.
- assert args.sysroot in args.sysroot_src.parents
-
rust_project = {
"crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition),
"sysroot": str(args.sysroot),
--
2.51.2
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] remove sysroot assertion in generate_rust_analyzer.py
2025-12-24 13:53 [PATCH] remove sysroot assertion in generate_rust_analyzer.py Onur Özkan
@ 2026-01-05 15:10 ` Gary Guo
2026-01-18 19:43 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Gary Guo @ 2026-01-05 15:10 UTC (permalink / raw)
To: Onur Özkan
Cc: llvm, ojeda, boqun.feng, bjorn3_gh, lossin, a.hindborg,
aliceryhl, tmgross, dakr, rust-for-linux, linux-kernel
On Wed, 24 Dec 2025 16:53:43 +0300
Onur Özkan <work@onurozkan.dev> wrote:
> With nixpkgs's rustc, rust-src component is not bundled
> with the compiler by default and is instead provided from
> a separate store path, so this assumption does not hold.
>
> The assertion assumes these paths are in the same location
> which causes `make LLVM=1 rust-analyzer` to fail on NixOS.
>
> Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
> Signed-off-by: Onur Özkan <work@onurozkan.dev>
I can confirm that the assertion will indeed fail when using nixpkgs's
provided rust-src (although rust-overlay is fine).
Reviewed-by: Gary Guo <gary@garyguo.net>
> ---
> scripts/generate_rust_analyzer.py | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index 147d0cc94068..e69fa5e0a9b9 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -213,9 +213,6 @@ def main():
> level=logging.INFO if args.verbose else logging.WARNING
> )
>
> - # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain.
> - assert args.sysroot in args.sysroot_src.parents
> -
> rust_project = {
> "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition),
> "sysroot": str(args.sysroot),
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] remove sysroot assertion in generate_rust_analyzer.py
2025-12-24 13:53 [PATCH] remove sysroot assertion in generate_rust_analyzer.py Onur Özkan
2026-01-05 15:10 ` Gary Guo
@ 2026-01-18 19:43 ` Miguel Ojeda
1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2026-01-18 19:43 UTC (permalink / raw)
To: Onur Özkan
Cc: llvm, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
aliceryhl, tmgross, dakr, rust-for-linux, linux-kernel
On Wed, Dec 24, 2025 at 2:54 PM Onur Özkan <work@onurozkan.dev> wrote:
>
> With nixpkgs's rustc, rust-src component is not bundled
> with the compiler by default and is instead provided from
> a separate store path, so this assumption does not hold.
>
> The assertion assumes these paths are in the same location
> which causes `make LLVM=1 rust-analyzer` to fail on NixOS.
>
> Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
> Signed-off-by: Onur Özkan <work@onurozkan.dev>
Applied to `rust-fixes` -- thanks everyone!
Fixes: fe992163575b ("rust: Support latest version of `rust-analyzer`")
Cc: stable@vger.kernel.org
[ Reworded title. - Miguel ]
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-18 19:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-24 13:53 [PATCH] remove sysroot assertion in generate_rust_analyzer.py Onur Özkan
2026-01-05 15:10 ` Gary Guo
2026-01-18 19:43 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®