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

Don't generate unnecessary rmeta files. #60190

Merged
merged 1 commit into from
Apr 24, 2019

Conversation

nnethercote
Copy link
Contributor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2019
@nnethercote nnethercote force-pushed the less-metadata-gen branch 2 times, most recently from 79c73b4 to 0e70582 Compare April 23, 2019 06:15
@nnethercote
Copy link
Contributor Author

nnethercote commented Apr 23, 2019

@alexcrichton: removing the first rmeta generation as you suggested worked fine. The second one (conditional on it not being a dylib) didn't work... maybe I got the condition wrong? Details are in the comment in the code.

@nnethercote
Copy link
Contributor Author

@alexcrichton New code is up!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 23, 2019

📌 Commit 8d4ecef7af84564eba78686a308ba0236031321f 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 23, 2019
@nnethercote
Copy link
Contributor Author

@bors r-

@alexcrichton: I realize now that this change should do more -- the creation of metadata_module can be skipped in a lot of cases. I will fix that.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 23, 2019
@nnethercote
Copy link
Contributor Author

I ended up only making a tiny change -- I moved the creation of metadata_module later, so it's only created after the early return.

I had thought a bigger change was possible, that I could do the same thing with metadata, but it turns out the first start_async_codegen call needs metadata.

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 24, 2019

📌 Commit 3fc0936 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 24, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 24, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 24, 2019
bors added a commit that referenced this pull request Apr 24, 2019
Rollup of 5 pull requests

Successful merges:

 - #56278 (Future-proof MIR for dedicated debuginfo.)
 - #59739 (Stabilize futures_api)
 - #59822 (Fix dark css rule)
 - #60186 (Temporarily accept [i|u][32|size] suffixes on a tuple index and warn)
 - #60190 (Don't generate unnecessary rmeta files.)

Failed merges:

r? @ghost
@bors bors merged commit 3fc0936 into rust-lang:master Apr 24, 2019
@nnethercote nnethercote deleted the less-metadata-gen branch April 24, 2019 06:45
@oli-obk
Copy link
Contributor

oli-obk commented May 17, 2019

This PR broke clippy's test suite. We are using compiletest and are some of our ui tests use serde. Since this PR we're getting

error: extern location for serde does not exist: target/debug/deps/libserde-61a62cbc4921f441.rmeta

I'm assuming this is a compiletest bug or misconfiguration on our side. Any tips? Do we even need that file (like is it just wrongly generating the need for it)? Or do we need to pass a flag so it is generated again?

@ehuss
Copy link
Contributor

ehuss commented May 19, 2019

@oli-obk Can you check if rust-lang/rust-clippy#4115 fixes your issue?

bors added a commit to rust-lang/rust-clippy that referenced this pull request May 19, 2019
Fix compile-test from forcing a rebuild.

If the `compile-test` test was run, then running a cargo build command immediately after caused everything to be rebuilt. This is because the `compile-test` test was deleting all `.rmeta` files in the target directory. Cargo recently switched to always generating `.rmeta` files (rust-lang/cargo#6883), and when the files are deleted, it thinks it needs to be rebuilt.

I am not very familiar with compiletest or clippy, so please take a close look and test this out (with the most recent nightly). In particular, make sure it doesn't revert the fixes from #3380 (it seems to work for me). Also @oli-obk mentioned something related in rust-lang/rust#60190 (comment), and I want to make sure that is addressed as well.

Fixes #4114
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
Development

Successfully merging this pull request may close these issues.

6 participants