Skip to content

cargo vendor breaks crates such as rusty_v8, removes .gn file #9481

Closed
@apaprocki

Description

@apaprocki

let no_include_option = pkg.manifest().include().is_empty();
let git_repo = if no_include_option {
self.discover_git_repo(root)?
} else {
None
};
let mut exclude_builder = GitignoreBuilder::new(root);
if no_include_option && git_repo.is_none() {
// no include option and not git repo discovered (see rust-lang/cargo#7183).
exclude_builder.add_line(None, ".*")?;
}

The denoland/rusty_v8 crate has a .gn file that is included by saying:

exclude = [
 ...
 ".*",
 ...
 "!.gn"
]

This excludes all dotfiles except .gn, but when this crate is vendored into a project, the .gn file is missing. Given that this is legal syntax, it seems the path.rs logic above needs to handle this situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions