-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Should cargo package check for new directories? #6931
Comments
Empty directories are not tracked by git, therefore creating an empty directory does mark the workspace as being dirty. |
Sorry for the confusion, I am referring to this error message:
where |
Build scripts probably shouldn't be creating empty directories. The "does not modify" check during packaging isn't really intended to be bullet-proof. However, it recently changed and it would be trivial to add a check for directories by checking for a directory here if someone wants to. |
Looks quite trivial indeed! I'll have a go at it. |
cargo package: detect new empty directories Detect the creation of directories in a build script, which is currently a very tempting workaround for the fact that a crate built from a package will be missing any empty directories. Maybe it would be better to only include directories in the map of hashes if they are completely empty. The removal of a directory that is initially empty cannot be tested because, as stated above, a crate built from a package will not *have* any empty directories. Closes #6931.
In trying to work around a problem involving excludes I noticed that
cargo package
does not complain about a build script that creates directories:build.rs
Is this a feature or a bug?
Notes
cargo 1.36.0-nightly (759b616 2019-05-06)
The text was updated successfully, but these errors were encountered: