You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// no include option and not git repo discovered (see rust-lang/cargo#7183).
exclude_builder.add_line(None,".*")?;
}
This will cause the publish command to list all the files in the git repo of the dependency, while the vendor will use the sparse cache, which is not a git repository, to copy the files.
Notes
An example of this is having a dependency using sqlx offline files that are stored in the .sqlx/ directory.
Does cargo vendor include dotfiles (.file) when specified in the package.include field?
Given that dotfiles sometimes contain sensitive information, it would be prudent to include only those explicitly mentioned in the package.include field.
Yes it does, but I am talking specifically of a package already published on a registry. The published crate already includes the .files since they were added in the VCS and not in the exclude list, but the vendor doesn't.
Yes it does, but I am talking specifically of a package already published on a registry. The published crate already includes the .files since they were added in the VCS and not in the exclude list, but the vendor doesn't.
Ah, now I get it. We should be including dotfiles just like publish does, except when they are present in the package.exclude field.
Problem
Vendoring a dependency ignores hidden files present in the published crate and that are required to build it.
Steps
include_str!(".hidden")
(e.g. test-dep-cargo-hidden).hidden
filecargo vendor
and in the vendor directory the.hidden
file is missingPossible Solution(s)
Vendoring should probably include all the files of the published package.
I believe those line caused this discrepancy:
cargo/src/cargo/sources/path.rs
Lines 159 to 162 in 3b43aa8
This will cause the
publish
command to list all the files in the git repo of the dependency, while thevendor
will use the sparse cache, which is not a git repository, to copy the files.Notes
An example of this is having a dependency using
sqlx
offline files that are stored in the.sqlx/
directory.Relevant documentation, issues and PRs I found:
cargo package
excludes hidden files that are explicitly included #7183Version
The text was updated successfully, but these errors were encountered: