-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Update cargo #74923
Update cargo #74923
Conversation
Updates src/tools/cargo. cc @ehuss |
(rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors p=1 rollup=never Don't rollup, this includes several major changes. Requesting review from @Mark-Simulacrum because this updates a dependency used by almost everything. I've run some tests, and I haven't run into any issues. Unfortunately I don't remember why the update to termcolor was being delayed. I thought there were still some issues on Windows, but I did a few tests on Windows 8 and the colors looked OK. |
Hm, so there is this: #63725 (comment) Do you happen to have Windows 7 or 8 handy to try and see if those issues have since been solved? |
Yes, I already tested on Windows 8, and the colors look OK to me. kennytm/fwdansi#1 got fixed (that's why it is updated here). My concern was kennytm/fwdansi#2, but I don't remember exactly why I filed that. I think Cargo (and rustc, etc.) uses simple enough colors that it isn't an issue. |
And once this lands on nightly, I'll do some more testing, and if everything looks good, I will close rust-lang/cargo#8089 and #55769. |
Okay. That's good enough for me -- I suspect getting this landed and rolled out to the community at large is the best way to determine if this breaks anyone's workflow anyway :) @bors r+ |
📌 Commit 89d7906 has been approved by |
⌛ Testing commit 89d7906 with merge 7986bf52e4c8ab2b61eb1931dbdf322b27f19b18... |
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions, checks-azure |
This was a performance regression, likely due to rust-lang/cargo#8560. Looking at the results, it seems the two crates affected, cargo and script-servo, had a roughly 0.5s and 0.8s bump in macro expansion. This is presumably an expected (if somewhat unfortunate) consequence of the above PR -- it was all but guaranteed to be a regression on perf.rust-lang.org, as we only benchmark "final binary/library" compilation rather than the whole build. rust-lang/cargo#8560 can only help full, post-cargo clean, builds. |
cc @alexcrichton ↑ Yea, it is difficult to get the defaults to accommodate all use cases. I would expect the negative effects to mostly happen for someone doing development with optimizations enabled. I'm curious how common that is. I suspect it is rare, but I've had a project where it was unusable without optimizations, so maybe not so rare. FWIW, I did some benchmarking on a variety of real-world projects and a variety of parallel jobs, and the change was faster in every case for a from-scratch If you want to restore the old behavior, you can set the env var CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=3 (assuming the project doesn't override the default opt-level). |
I don't think I've ever had a Rust project that was more than a week long and didn't always need release mode, but I agree that it probably varies quite a bit. I think that this is probably still the right call, though. One thing we could try is splitting the build dependencies of proc macros and build scripts apart - the latter matter much less, and always run once. But proc macros used for in-workspace crates are essentially guaranteed to be run hundreds of times, so optimizing them to shave of a few milliseconds can be helpful. I think from scratch builds will indeed always be faster for this, but we also don't have a great handle on whether that matters today (i.e., if you're on CI you probably only care about them, but locally you usually care about tiny incremental rebuilds). |
14 commits in aa6872140ab0fa10f641ab0b981d5330d419e927..974eb438da8ced6e3becda2bbf63d9b643eacdeb
2020-07-23 13:46:27 +0000 to 2020-07-29 16:15:05 +0000
[profile.release]
(Fix O0 build scripts by default without[profile.release]
cargo#8560)cargo --list
(Display builtin aliases withcargo --list
cargo#8542)+
for crates.io feature requirements in the Cargo Book section on features (Include+
for crates.io feature requirements in the Cargo Book section on features cargo#8547)