Skip to content
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

build-std: Don't treat std like a "local" package. #8177

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Apr 28, 2020

This changes it so that build-std will not treat the std crates like a "local" package. This has the following changes:

  • std does not build with incremental. This generally shouldn't be needed, and incremental has various bugs with std crates.
  • Cargo's dep-info fingerprint tracking will not track the std crate sources, these are tracked via other means.
  • Cargo's .d dep-info file does not include std crate sources.
  • Lints are capped to "allow" for std crates, and warnings are not shown by default.

Closes rust-lang/wg-cargo-std-aware#44
Closes rust-lang/wg-cargo-std-aware#55

@rust-highfive
Copy link

r? @Eh2406

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 2020
@ehuss
Copy link
Contributor Author

ehuss commented Apr 28, 2020

I heavily considered the approach suggested in rust-lang/wg-cargo-std-aware#44 (comment) to add a field to Package, but that seemed to be potentially much more difficult to wire up. Packages tend to prefer to be immutable, and this would require teaching Workspace to know it is the std workspace. I'd like to avoid having is_std infect the entire codebase. The downside to not doing that is that the calls to get_profile() need to pass in an explicitly computed "is_local" value. Willing to reconsider, but I think it will end up being a little more complex.

Also, I'm totally up for using a different phrase than "local", open to suggestions!

@alexcrichton
Copy link
Member

@bors: r+

Nah this looks good to me. Thanks for this!

@bors
Copy link
Contributor

bors commented Apr 28, 2020

📌 Commit b6a4b07 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 28, 2020
@bors
Copy link
Contributor

bors commented Apr 28, 2020

⌛ Testing commit b6a4b07 with merge ceef92d...

@bors
Copy link
Contributor

bors commented Apr 28, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing ceef92d to master...

@bors bors merged commit ceef92d into rust-lang:master Apr 28, 2020
bors added a commit that referenced this pull request Jun 18, 2021
Fix dep-info files including non-local build script paths.

I derped in #8177 and accidentally used the wrong unit when iterating over the dependencies when writing the `.d` file.  The consequence here is that all the `rerun-if-changed` paths from a unit's dependencies are included in the `.d` file. This fixes it so that it does not include non-local dependencies.

Fixes #9445
@ehuss ehuss added this to the 1.45.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
5 participants