-
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
Inconsistency with publishing/vendoring listing of files #9555
Comments
Using `cargo vendor` with `zstd-sys` does not copy the `zstd` directory, due to a bug in Cargo: rust-lang/cargo#9555 This commit replaces the "exclude" field with a negation, which causes an issue with current version of Cargo, by an equivalent "include" field.
Using `cargo vendor` with `zstd-sys` does not copy the `zstd` directory, due to a bug in Cargo: rust-lang/cargo#9555 This commit replaces the "exclude" field with a negation, which causes an issue with current version of Cargo, by an equivalent "include" field.
Using `cargo vendor` with `zstd-sys` does not copy the `zstd` directory, due to a bug in Cargo: rust-lang/cargo#9555 This commit replaces the "exclude" field with a negation, which causes an issue with current version of Cargo, by an equivalent "include" field.
So thinking about this more, I would almost say that the behavior when under
Git won't allow you to add anything in the
When a directory is ignored, subdirectories need to be negated explicitly. From the git docs:
(Or, better, just use WDYT? |
Oh I don't have any thoughts here really personally, but matching |
Currently I'm seeing some weird behavior in Cargo with respect to vendoring and publishing. Notably this project will succeed to compile but then fail to compile with a vendored build:
Sure enough the
zstd
folder is indeed missing from the vendored checkout. Some other tidbits:zstd
folderexclude
directive which presumably tries to filter the files includedI believe the problem here is that
cargo vendor
useslist_files
to list the files that are going to be used for publication/building, and something funny is happening here with the presence of a.git
folder. For example checking outzstd-sys
and runningcargo package -v
does indeed vendor thezstd
folder. If you delete thezstd/.git
folder, however, and then runcargo package -v
thezstd
folder is not included. This I think best simulates what's happening with the registry because it's presumably published from a source checkout (therefore includingzstd
), but it's then vendored from a checkout without.git
(what was downloaded from crates.io). This means that vendors don't have thezstd
folder but downloads from crates.io do.I haven't dug too much into this but the bug is likely around
list_files
and how theexclude
directory is handled relative to discovered submodules. We should probably warn about this or handle this differently at publication time, ideally publication and vendoring would work with similar sets of files.The text was updated successfully, but these errors were encountered: