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

cargo clean -p only cleans the build for a version with zero arguments #3530

Closed
nikomatsakis opened this issue Jan 11, 2017 · 3 comments · Fixed by #8210
Closed

cargo clean -p only cleans the build for a version with zero arguments #3530

nikomatsakis opened this issue Jan 11, 2017 · 3 comments · Fixed by #8210
Labels

Comments

@nikomatsakis
Copy link
Contributor

Given a clean checkout of foo:

cargo clean -p foo
cargo rustc -p foo -- -Zverbose

cargo clean -p foo
cargo rustc -p foo -- -Zverbose

Only the first cargo rustc will actually build. But if you change the argument to -Z verbose the second time, it will build (but only once). My hypothesis (which @alexcrichton confirmed) is that each generates a distinct fingerprint, and cargo clean -p foo is looking for a version with no arguments.

I would expect it rather to clean all builds related to foo with any arguments.

@ghost
Copy link

ghost commented Feb 20, 2018

Hitting this when compiling for a different target:

$ cargo run -v --target i686-unknown-linux-gnu
$ cargo clean -vv -p usize
(nothing is cleaned)
$ cargo run -v --target i686-unknown-linux-gnu
...
Fresh usize v0.1.0 (file:///home/xftroxgpx/build/2nonpkgs/rust.stuff/rustlearnage/usize)
...
$ cargo clean -vv -p usize --target i686-unknown-linux-gnu
    Removing /home/xftroxgpx/build/2nonpkgs/rust.stuff/rustlearnage/target/i686-unknown-linux-gnu/debug/usize
    Removing /home/xftroxgpx/build/2nonpkgs/rust.stuff/rustlearnage/target/i686-unknown-linux-gnu/debug/.fingerprint/usize-d5bf39b5c2514907
    Removing /home/xftroxgpx/build/2nonpkgs/rust.stuff/rustlearnage/target/i686-unknown-linux-gnu/debug/deps/usize-d5bf39b5c2514907

Used #5059 to show Removed filespaths.

OP clearly explains the issue, thanks!

@stale
Copy link

stale bot commented Sep 16, 2018

As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it.

I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect?

The team would be especially grateful if such a comment included details such as:

  • Is this still relevant?
  • If so, what is blocking it?
  • Is it known what could be done to help move this forward?

Thank you for contributing!

If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable!

@stale stale bot added the stale label Sep 16, 2018
@dwijnand
Copy link
Member

Under-compiling is dangerous. Let's try and fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants