From: Gary Guo <gary@garyguo.net>
To: "Onur Özkan" <work@onurozkan.dev>
Cc: llvm@lists.linux.dev, ojeda@kernel.org, boqun.feng@gmail.com,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
dakr@kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove sysroot assertion in generate_rust_analyzer.py
Date: Mon, 5 Jan 2026 15:10:25 +0000 [thread overview]
Message-ID: <20260105151025.174d5902.gary@garyguo.net> (raw)
In-Reply-To: <20251224135343.32476-1-work@onurozkan.dev>
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),
next prev parent reply other threads:[~2026-01-05 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-24 13:53 Onur Özkan
2026-01-05 15:10 ` Gary Guo [this message]
2026-01-18 19:43 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260105151025.174d5902.gary@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®