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

compiletest test causes everything to rebuild #4114

Closed
ehuss opened this issue May 19, 2019 · 0 comments · Fixed by #4115
Closed

compiletest test causes everything to rebuild #4114

ehuss opened this issue May 19, 2019 · 0 comments · Fixed by #4115

Comments

@ehuss
Copy link
Contributor

ehuss commented May 19, 2019

If you run cargo test --test compile-test and then run it again, everything gets rebuilt (this requires the most recent nightly).

This is because of this line:

cfg.clean_rmeta();

This deletes all .rmeta files. With the recent changes to cargo for pipelining, cargo always generates rmeta files and expects them to not to be deleted.

bors added a commit that referenced this issue 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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant