[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251201170130.10922-1-mhi@mailbox.org>
Date: Mon, 1 Dec 2025 18:01:30 +0100
From: Maurice Hieronymus <mhi@...lbox.org>
To: ojeda@...nel.org,
alex.gaynor@...il.com,
boqun.feng@...il.com,
gary@...yguo.net,
bjorn3_gh@...tonmail.com,
benno.lossin@...ton.me,
a.hindborg@...nel.org,
aliceryhl@...gle.com,
tmgross@...ch.edu,
rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Maurice Hieronymus <mhi@...lbox.org>
Subject: [PATCH v3] scripts: generate_rust_analyzer: Add message to sysroot assertion
The assertion that checks whether sysroot lies within sysroot_src
currently fails without explaining why. Add an error message that
prints both paths to make diagnosing toolchain issues easier.
Signed-off-by: Maurice Hieronymus <mhi@...lbox.org>
---
scripts/generate_rust_analyzer.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 147d0cc94068..446d405ef68a 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -213,8 +213,13 @@ 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
+ assert args.sysroot in args.sysroot_src.parents, \
+ f"""
+ It seems like your sysroot and sysroot_src do not belong to the same toolchain.
+ The sysroot folder must be inside sysroot_src.
+ sysroot={args.sysroot}
+ sysroot_src={args.sysroot_src}
+ """
rust_project = {
"crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition),
base-commit: 54e3eae855629702c566bd2e130d9f40e7f35bde
--
2.50.1
Powered by blists - more mailing lists