-
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
cargo package
excludes hidden files that are explicitly included
#7183
Comments
FTR, this is my rather ugly workaround: https://gitlab.com/sequoia-pgp/nettle-src/commit/8541b16d739ca01af4c8f065ce18856370a302cb |
I started looking into this issue and wrote a test case to verify it. I also was able to write a fix for it but this needs some discussion I think. my fix will also change the existing behavior (but looks like it does not break any existing tests). Currently all dotfiles are getting ignored during packaging, with my change the dotfiles aren't ignored anymore. So my questions is what is the desired behavior? I see two ways for the implementation
there is a existing comment regarding this, but it is unclear to me
Is it intention to only skip directories starting with a dot, or also dotfiles? |
include dotfiles in packages This PR solves #7183 It changes the behavior of `cargo package` to also include dotfiles by default. It should be discussed if this is intended or if the implementation should be changed to only include dotfiles which are specified in the `include` section. From the [existing comment](https://github.com/stefanhoelzl/cargo/blob/40885dfab40a1bf62b22aa03f732ef45163c013f/src/cargo/sources/path.rs#L358) it is a little bit unclear to me, but I supposed it was intended only to exclude directories starting with a dot?
This has been fixed by #7680. |
Problem
I'm packaging the source of a C library to "vendor" it. The build system of said library uses hidden files (UNIX style, beginning with a dot). These files are excluded by
cargo package
even if I explicitly include them. The missing file cause problems with the build system.The crate in question is
nettle-src
. Resulting build problems: https://gitlab.com/sequoia-pgp/sequoia/issues/328Furthermore, the cargo manifest documentation (https://doc.rust-lang.org/cargo/reference/manifest.html) does not mention any special handling of hidden files.
Steps
This problem can be reproduced using a minimal example:
Possible Solution(s)
Please allow me to package hidden files, if necessary by explicitly including them. Also, the documentation needs to reflect the special handling of hidden files.
Notes
Output of
cargo version
:cargo 1.34.0
I'm on Debian Buster, the Rust toolchain is as packaged by Debian. However, the same applies to
cargo 1.36.0 (c4fcfb725 2019-05-15)
I got via rustup.The text was updated successfully, but these errors were encountered: