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 package never repackages #2799

Closed
jethrogb opened this issue Jun 21, 2016 · 2 comments
Closed

cargo package never repackages #2799

jethrogb opened this issue Jun 21, 2016 · 2 comments
Labels
E-easy Experience: Easy

Comments

@jethrogb
Copy link
Contributor

jethrogb commented Jun 21, 2016

If you run cargo package to completion, change something in your crate, and then run it again, a new package will not be generated. You can change anything, add/remove source files, modify the build script, change dependencies, include features, go on vacation for 2 weeks, and cargo package will still do nothing. The only thing that triggers a rebuild is manually deleting the appropriate .crate file in target/package or changing the crate version or name in Cargo.toml.

Since cargo publish just runs ops::package before uploading, it suffers from the same behaviour.

I think the same freshness check for cargo build should be used for cargo package.

@nagisa
Copy link
Member

nagisa commented Jul 1, 2016

{ removed, my bad, the message happens only if you have uncommited changes to CVS }

cc @alexcrichton seems like a serious issue to me

@alexcrichton
Copy link
Member

Yeah this was done initially with the intent of smoothing the cargo package followed by cargo publish process, but I agree that without proper dependency tracking it can have disastrous consequences. The fix should be basically to just remove this block in favor of just the open_rw call in the fall through case.

Gonna tag this E-easy as it should be a simple modification with an easy-enough test to add, and I'll try to get around to it if no one else does before the end of the next cycle.

@alexcrichton alexcrichton added the E-easy Experience: Easy label Jul 5, 2016
bors added a commit that referenced this issue Jul 6, 2016
cargo package: overwrite existing tarballs

Previously, cargo package did not do anything if a tarball already
existed. This is wrong, because the source may have changed and cargo
does not do any dependency tracking for package tarballs yet, so it did
not notice this.

This commit changes cargo package to always overwrite existing tarballs,
which works fine until proper dependency tracking is implemented.

Fixes #2799
@bors bors closed this as completed in #2828 Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Experience: Easy
Projects
None yet
Development

No branches or pull requests

3 participants