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

Something is causing Cargo to rebuild every time #3094

Closed
Mark-Simulacrum opened this issue Sep 15, 2016 · 6 comments
Closed

Something is causing Cargo to rebuild every time #3094

Mark-Simulacrum opened this issue Sep 15, 2016 · 6 comments

Comments

@Mark-Simulacrum
Copy link
Member

Refiling rust-lang/rust#36483 per @sfackler's comment.

Each cargo build causes a rebuild of the crate. The log suggests that at least part of the problem may be related to Macros 1.1; though the mtime None != ... problems are also of unknown cause.

I have not yet worked on a minimal test case, but can do so upon request, for now this should reproduce this behavior.

Full log when building RUST_LOG=cargo::ops::cargo_rustc::fingerprint=info cargo test:

INFO:cargo::ops::cargo_rustc::fingerprint: stale: /home/mark/Edit/rustc-perf/backend/rustc-macro source code -- missing
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend): mtime based components have changed: None != Some(FileTime { seconds: 1473893323, nanos: 644877469 }), paths are "/home/mark/Edit/rustc-perf/backend/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-test-lib-rustc-perf" and "/home/mark/Edit/rustc-perf/backend/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-test-lib-rustc-perf"
INFO:cargo::ops::cargo_rustc::fingerprint: stale: /home/mark/Edit/rustc-perf/backend/rustc-macro source code -- missing
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend): new (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend)) != old (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend))
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend): mtime based components have changed: None != Some(FileTime { seconds: 1473893323, nanos: 232877796 }), paths are "/home/mark/Edit/rustc-perf/backend/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-lib-rustc-perf" and "/home/mark/Edit/rustc-perf/backend/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-lib-rustc-perf"
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend): new (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend)) != old (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend))
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend): new (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend)) != old (rustc-perf v0.1.0 (file:///home/mark/Edit/rustc-perf/backend))

Condensed (path and leading part of each line stripped):

stale: /root/rustc-macro source code -- missing
fingerprint error for rustc-perf v0.1.0 (file:///root): mtime based components have changed: None != Some(FileTime { seconds: 1473893323, nanos: 644877469 }), paths are "/root/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-test-lib-rustc-perf" and "/root/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-test-lib-rustc-perf"
stale: /root/rustc-macro source code -- missing
fingerprint error for rustc-perf v0.1.0 (file:///root): new (rustc-perf v0.1.0 (file:///root)) != old (rustc-perf v0.1.0 (file:///root))
fingerprint error for rustc-perf v0.1.0 (file:///root): mtime based components have changed: None != Some(FileTime { seconds: 1473893323, nanos: 232877796 }), paths are "/root/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-lib-rustc-perf" and "/root/target/debug/.fingerprint/rustc-perf-8d2c967c83377789/dep-lib-rustc-perf"
fingerprint error for rustc-perf v0.1.0 (file:///root): new (rustc-perf v0.1.0 (file:///root)) != old (rustc-perf v0.1.0 (file:///root))
fingerprint error for rustc-perf v0.1.0 (file:///root): new (rustc-perf v0.1.0 (file:///root)) != old (rustc-perf v0.1.0 (file:///root))

cc @tikue since this is happening to you as well.

@tikue
Copy link

tikue commented Sep 15, 2016

In the crate affected by this, I'm using serde_derive as well as a plugin.

@arthurprs
Copy link

Sub, I'm getting hurt bigtime by this.

Mark-Simulacrum added a commit to Mark-Simulacrum/cargo-issues-3094 that referenced this issue Sep 15, 2016
@Mark-Simulacrum
Copy link
Member Author

Minimal reproduction here: https://github.com/Mark-Simulacrum/cargo-issues-3094

@arthurprs
Copy link

Maybe it's related to this #3095

@Thinkofname
Copy link

rustc seems to be putting rustc-macro\ source\ code into the dep-info it generates which is confusing cargo. Seems like a rustc bug

@alexcrichton
Copy link
Member

Thanks for the report @Mark-Simulacrum! Sorry for the runaround, but I believe @Thinkofname hit the nail on the head with rust-lang/rust#36625. Those file names shouldn't show up at all, and I believe it's a compiler bug that they are.

I'm going to close this in favor of rust-lang/rust#36625.

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

No branches or pull requests

5 participants