-
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
Sync cargo-the-cli version with rustc. #10178
Conversation
This field is no longer being used, as pre-release versions have not been used in cargo for quite some time, and I don't anticipate them ever returning.
(rust-highfive has picked a reviewer for you, use r? to override) |
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.
Looks great!
Just wonder is there any documentation for env like CFG_RELEASE
? I can find them in rustc source code but not in docs 😞.
Those |
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 think this will make things less confusing for our users. So I'm giving it an approval.
I'm a little worried that this will make it harder to diagnose issues if somehow the rustc release process has a bug and includes the wrong version of cargo.
So I will leave it up to @alexcrichton
@bors: r+ Indeed looks good to me! |
📌 Commit a58725a has been approved by |
☀️ Test successful - checks-actions |
Update cargo 14 commits in 40dc281755137ee804bc9b3b08e782773b726e44..a359ce16073401f28b84840da85b268aa3d37c88 2021-12-06 21:54:44 +0000 to 2021-12-14 18:40:22 +0000 - Support `term.quiet` configuration (rust-lang/cargo#10152) - Display alias target on 'cargo help <alias>` (rust-lang/cargo#10193) - delete --host command and message (rust-lang/cargo#10145) - Improve I/O error message for fingerprint of build script (rust-lang/cargo#10191) - Explicitly mark aliases in `cargo list`. (rust-lang/cargo#10177) - Don't emit "executable" JSON field for non-executables. (rust-lang/cargo#10171) - Move scrape-examples docs to correct section. (rust-lang/cargo#10166) - Do not suggest source config if nothing to vendor (rust-lang/cargo#10161) - Bump versions of local deps. (rust-lang/cargo#10155) - Bump to 0.60.0, update changelog (rust-lang/cargo#10154) - Fix some profile documentation. (rust-lang/cargo#10153) - Document lib before bin. (rust-lang/cargo#10172) - Sync cargo-the-cli version with rustc. (rust-lang/cargo#10178) - Remove `-Z future-incompat-report` from message displayed to user (rust-lang/cargo#10185)
Use local git info for version. #10178 caused an unintended change where cargo is being built twice in rust-lang/rust's CI. It is being built once as a CLI, and a second time for RLS. The cause is the `CFG_COMMIT_HASH` environment variable changes between those two builds (it is set for the tool being built). The solution here is to grab the git information from cargo's own build script. This is guaranteed to always be in the `src/tools/cargo` directory for both tools. This should help save a minute or two in the dist builders.
People occasionally get confused when cargo's version does not match the version of rustc. This happens in a variety of scenarios:
This changes it so that cargo-the-cli will always report the same version as rustc (assuming they were built with rustbuild). The git information remains the same (reports cargo's last commit sha).
Closes #10122