-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make sure to also wrap the initial -vV
invocation
#13659
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
DO NOT MERGE: update cargo for experiment This incorporates rust-lang/cargo#13659 so that we can test it.
All right now in rust-lang/rust#123124 we have a toolchain with this cargo. CI also still works (including Miri). So now that's ready for experimentation with sccache. Does someone happen to have a setup ready for this? :D |
tests/testsuite/cargo_env_config.rs
Outdated
let status = std::process::Command::new(&args.next().unwrap()) | ||
let mut cmd = std::env::args().skip(1).collect::<Vec<_>>(); | ||
if cmd.get(1).map(|s| &**s) == Some("-vV") { | ||
// This is the version query, not the target info query, so skip this. |
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.
I guess this raises the question, should the env stuff also be set for the -vV
query?
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.
Sorry, did you mean to add an environment variable similar to RUSTC_VERSION? Is there any benefit to this?
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 about env vars configured with [env]
in config.toml
. Should they be set here?
We have a test that they are set for the --print ...
invocation. Should they be set for the -vV
invocation as well?
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.
Yea, it probably makes sense to also set the env vars. Can you add that? It looks like apply_env_config
might need to be pub(crate)
or something to make that work.
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.
Sure, done.
I have installed sccache (
That seems to work fine. I can see via
I have also confirmed that Miri still works, and that setting RUSTC to a non-existent path but using a suitable RUSTC_WRAPPER now makes the test-cargo-miri call succeed (after removing autocfg). So cargo itself seems to be clean then in terms of always applying the wrapper, at least for the code paths needed by that crate. So... I think we're all good? @ehuss anything else you think should be checked? (We also still need a decision about applying the |
r? @ehuss since you seems to involve in the discussion already. |
Thanks! There looks like there might be a few more things to get this ready to merge:
|
6535b01
to
c692d8b
Compare
All right, should be all done. |
Based on an earlier draft by oli-obk
Thanks! @bors r+ |
☀️ Test successful - checks-actions |
Update cargo 11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d 2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000 - fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747) - feat(update): Include a Locking message (rust-lang/cargo#13759) - chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760) - test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761) - feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754) - Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659) - docs: update `checkout` GitHub action version (rust-lang/cargo#13757) - Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756) - Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753) - docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751) - refactor(config): Consistently use kebab-case (rust-lang/cargo#13748) r? ghost
Update cargo 11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d 2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000 - fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747) - feat(update): Include a Locking message (rust-lang/cargo#13759) - chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760) - test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761) - feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754) - Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659) - docs: update `checkout` GitHub action version (rust-lang/cargo#13757) - Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756) - Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753) - docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751) - refactor(config): Consistently use kebab-case (rust-lang/cargo#13748) r? ghost
Fixes #10885 and therefore helps unblock rust-lang/miri#3422.
This ensures that the version info actually matches the compiler that will later be doing the builds.