-
Notifications
You must be signed in to change notification settings - Fork 356
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
Don't print unnecessary sysroot messages #3599
Conversation
56e8ade
to
616f485
Compare
cargo-miri/src/setup.rs
Outdated
} | ||
write!(msg, "...").unwrap(); | ||
if only_setup { | ||
let mut msg = String::new(); |
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.
This is only needed inside the closure, it seems? Does it have to be computed outside?
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.
Constructing the message inside just requires giving the hook a lifetime that's not 'static
inside `rustc-build-sysroot.
5191888
to
d574828
Compare
Ah, fmt. |
I published a new rustc-build-sysroot, can you update the PR? |
d574828
to
a18a0f8
Compare
LGTM, thanks! |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Currently, when running
cargo miri setup
, we always print that a sysroot is being prepared, even if we just bail out of building after checking the hash. So that message is wrong; we didn't actually prepare a sysroot.We also always print the preparing message for
cargo miri run
, even if no sysroot is prepared.With this PR,
cargo miri run
prints no sysroot messages when an existing one is reused, and when a redundantcargo miri setup
is requested, we print: