-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Print a clear warning when including untracked files in package #1597
Comments
Some food for thought, I downloaded all packages from crates.io, and I'm grepping for junk and filing bugs. Mostly the bugs will help everyone because we don't have to download things like 10 MB of perf.data files or a random 10 MB mp4 file that a developer had lying around, or some extra 160 MB database directory they had.. issues:
Edit: Everyone responded. Well done team! |
This came up on IRC #rust recently. I'd prefer:
Because:
|
See also #2063. I'd prefer cargo not package anything not explicitly traceable from the crate sources and Cargo.toml, but limiting it to VCS-tracked files would definitely help. |
Issue rust-bakery/nom/issues/117 is another “victim” |
Prevent packaging a crate if any files are dirty This commit alters Cargo's behavior to prevent publishing a crate by default if any files in that crate are determined to be dirty, that is either modified or not part of the working tree. This can prevent common mistakes like many listed in #2063 and enables features like #841. Closes #1597 Closes #2063
Print a clear warning when including untracked files in package.
Admonition the user to track or ignore these files in git.
See issue #1584.
Cargo should help the author for two reasons:
If it's about empty directories, tell the crate author to use the standard workaround (.gitignore inside to make it non-empty).
The text was updated successfully, but these errors were encountered: