-
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 more reads of environment variables go through the Config
#11754
Conversation
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
Thanks! I think I would feel more comfortable leaving |
b36f12a
to
b2947a2
Compare
For sure, sounds good! Just pushed a new version without the changes to |
b2947a2
to
5035cb2
Compare
Thanks! @bors r+ |
☀️ Test successful - checks-actions |
15 commits in 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6..9d5b32f503fc099c4064298465add14d4bce11e6 2023-02-17 19:45:09 +0000 to 2023-02-22 23:04:16 +0000 - refactor(job_queue): docs and move types around (rust-lang/cargo#11758) - Scrub more of the test environment (rust-lang/cargo#11757) - Make more reads of environment variables go through the `Config` (rust-lang/cargo#11754) - Revert "Update curl-sys to use libcurl 7.88.1" (rust-lang/cargo#11755) - use consistent case (rust-lang/cargo#11748) - Switch some tests from `build` to `check` (rust-lang/cargo#11725) - Fix typo in sparse-registry warning message (rust-lang/cargo#11753) - reuse url encoding from `url` crate, don't use separate `percent-encoding` (rust-lang/cargo#11750) - Read environment variables through `Config` instead of `std::env::var(_os)` (rust-lang/cargo#11727) - Update curl-sys to use libcurl 7.88.1 (rust-lang/cargo#11749) - mdman: update pretty_assertions to reduce deps (rust-lang/cargo#11747) - Cleanup tests (rust-lang/cargo#11745) - Enhance help texts of position args (rust-lang/cargo#11740) - Fix typo (rust-lang/cargo#11741) - Update comment about cargo-ok (rust-lang/cargo#11724)
Update cargo 15 commits in 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6..9d5b32f503fc099c4064298465add14d4bce11e6 2023-02-17 19:45:09 +0000 to 2023-02-22 23:04:16 +0000 - refactor(job_queue): docs and move types around (rust-lang/cargo#11758) - Scrub more of the test environment (rust-lang/cargo#11757) - Make more reads of environment variables go through the `Config` (rust-lang/cargo#11754) - Revert "Update curl-sys to use libcurl 7.88.1" (rust-lang/cargo#11755) - use consistent case (rust-lang/cargo#11748) - Switch some tests from `build` to `check` (rust-lang/cargo#11725) - Fix typo in sparse-registry warning message (rust-lang/cargo#11753) - reuse url encoding from `url` crate, don't use separate `percent-encoding` (rust-lang/cargo#11750) - Read environment variables through `Config` instead of `std::env::var(_os)` (rust-lang/cargo#11727) - Update curl-sys to use libcurl 7.88.1 (rust-lang/cargo#11749) - mdman: update pretty_assertions to reduce deps (rust-lang/cargo#11747) - Cleanup tests (rust-lang/cargo#11745) - Enhance help texts of position args (rust-lang/cargo#11740) - Fix typo (rust-lang/cargo#11741) - Update comment about cargo-ok (rust-lang/cargo#11724)
As discussed in #11588, it's better to make reads of environment variables go through the
Config
instead of callingstd::env::var
orenv::var_os
everywhere.Most of the "easy" places to change this in
src/
were handled in #11727. This PR fixes a few remaining call sites that were missed in #11727, namely:LocalFingerprint::find_stale_item
util::profile::start
andProfiler
util::rustc::rustc_fingerprint
After doing this, there are a few remaining calls to
env::var
insrc/
but those probably require more discussion to fix.