-
Notifications
You must be signed in to change notification settings - Fork 386
Install binaries to the miri toolchain's sysroot #2806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot cargo install works with arbitrary directories like that 😄 that's even nicer than the bash I was expecting.
That is very strange. I can't reproduce the CI failure on my desktop, and I also can't reproduce it in a fresh
|
@saethlin is there a way to see what command it's trying to run that doesn't exist? I see |
Ah, nice idea. Is it even using the right binaries on CI still? |
Looks sensible to me (wearing my rustup hat). |
c677817
to
4ba4dfc
Compare
Yes that was the problem. CI caches the contents of I don't know what to do about this. Perhaps we remove that directory from the cache, land this PR, then add them back? Just to prove that this PR works and cache is the problem, I deleted the MacOS cache via GitHub and re-ran. |
What is this suppposed to test? Lines 61 to 66 in 0ba1f4a
The comment just says "confuse" and I'm not even sure what could be confusing about this- we set |
Yeah but them being set caused bugs in the past... see #2430. |
Is that still even useful? We did that to cache xargo, but we no longer use xargo. EDIT: Ah, it caches rustup-toolchain-install-master. |
I see the motivation to test |
Setting RUSTC_WRAPPER and RUSTC leads to very interesting cargo behavior (the value of the RUSTC env var is passed to the RUSTC_WRAPPER as its first argument). So having RUSTC set is quite important, since Miri made some wrong assumptions here for years (namely that the first argument to RUSTC_WRAPPER is always So if setting RUSTC now causes CI failure, that's not a good sign. What happens when you bring back those env vars? |
If I bring back only RUSTC, we fail CI because we get a warning and thus unexpected stdout. If I bring back both RUSTC and MIRI, while fixing the path for MIRI to be the interpreter we are trying to run, everything passes. |
Nice, so looks like this approach works! I think this means that the documentation at the top of the file, and in the readme, should be updated? The part about the toolchain staying the same is no longer needed, the docs should say where the binaries go, and we can remove the docs about how to reset rustup after |
Thanks! This elegantly solves an ancient issue when working on Miri. :) |
Install binaries to the miri toolchain's sysroot The default install produces this behavior: ``` $ cargo +miri miri --version miri 0.1.0 (0ba1f4a 2023-03-05) $ cargo +nightly miri --version miri 0.1.0 (0ba1f4a 2023-03-05) ``` Which is not good. We've effectively erased the toolchain selection, and users may reasonably conclude that their rustup install is broken. After this change, we now get this: ``` $ cargo +miri miri --version miri 0.1.0 (0ba1f4a 2023-03-05) $ cargo +nightly miri --version miri 0.1.0 (f63ccaf 2023-03-06) ``` Thanks `@jyn514` who all but wrote this for me.
@bors r=RalfJung |
Install binaries to the miri toolchain's sysroot The default install produces this behavior: ``` $ cargo +miri miri --version miri 0.1.0 (0ba1f4a 2023-03-05) $ cargo +nightly miri --version miri 0.1.0 (0ba1f4a 2023-03-05) ``` Which is not good. We've effectively erased the toolchain selection, and users may reasonably conclude that their rustup install is broken. After this change, we now get this: ``` $ cargo +miri miri --version miri 0.1.0 (0ba1f4a 2023-03-05) $ cargo +nightly miri --version miri 0.1.0 (f63ccaf 2023-03-06) ``` Thanks `@jyn514` who all but wrote this for me.
💔 Test failed - checks-actions |
a1b42ec
to
2b6ddc7
Compare
Gah. I guess I was bamboozled by the CI cache after all because I never took your advice to add a step to delete the old binaries. I'll debug this tomorrow. |
c956c1c
to
2b6ddc7
Compare
Now your deletion code deletes the rustup-provided Or maybe the better idea is the |
When I've tried it, Debugging this is also so frustrating because I can't coax any of the failures out locally. Even |
Co-authored-by: Ralf Jung <post@ralfj.de>
15d67fa
to
8ad5024
Compare
Yep, changing the cache key seems to get CI working again. |
I specifically tested this before adding that to the readme... strange. Anyway we'll not have to rely on it for much longer. ;) |
@bors r+ |
☀️ Test successful - checks-actions |
The default install produces this behavior:
Which is not good. We've effectively erased the toolchain selection, and users may reasonably conclude that their rustup install is broken.
After this change, we now get this:
Thanks @jyn514 who all but wrote this for me.