scripts: generate_rust_analyzer: Add message to sysroot assertion
Subsystems (2)
PATCH v2 1/1 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.
---
Changes since v2:
- Rebase to current rust/for-next
- Send patch to all people received from scripts/get_maintainer.pl
scripts/generate_rust_analyzer.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
scripts/generate_rust_analyzer.py +7 -1
@@ -156,7 +156,13 @@ def main(): ) # 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),
base-commit: 8af7a50167833b6b22e30c008bbf95ab3ff1a5fb
Signature · 1 line
2.50.1
Quoted 2 lines · Maurice Hieronymus
- Send patch to all people received from
scripts/get_maintainer.pl
Thanks for that!
Quoted 1 line
# Making sure that the
sysrootandsysroot_srcbelong to the same toolchain.
I guess we could now remove the comment since it is a bit redundant, but it is fine either way.
Cheers,
Miguel
Quoted 6 lines · Miguel Ojeda
Quoted 1 line · Maurice Hieronymus
- Send patch to all people received from
scripts/get_maintainer.plThanks for that!
I’m still getting familiar with the mailing list workflow, so I have Ia question regarding this. You mentioned that keeping or removing the Icomment is fine. In cases like this, if I decide not to change the Ipatch, should I still send a reply, or would it be picked up as-is Ieventually? 'm just curious since I plan to contribute more in the near Ifuture.
Quoted 5 lines
Quoted 2 lines
# Making sure that the
sysrootandsysroot_srcbelong to the same toolchain.I guess we could now remove the comment since it is a bit redundant, but it is fine either way.
Sure, I will resend a v3 in a moment.
Quoted 1 line
Cheers, Miguel
Quoted 7 lines · Maurice Hieronymus
I’m still getting familiar with the mailing list workflow, so I have Ia question regarding this. You mentioned that keeping or removing the Icomment is fine. In cases like this, if I decide not to change the Ipatch, should I still send a reply, or would it be picked up as-is Ieventually? 'm just curious since I plan to contribute more in the near Ifuture.
Sometimes maintainers can fix things when they apply a patch, but in general it always helps to send a new version to reduce their workload and the risk of making a mistake last minute (and usually saying what they modified in a [ ...] comment etc.), so thanks for the v3 :)
(By the way, there is a "I" in each line after the first in your reply.)
Cheers,
Miguel