Skip to content

cargo vendor vs cargo package inconsistency #9054

@avindra

Description

@avindra

Problem
When using cargo vendor, I end up with fewer files than expected compared to if I used cargo package
instead.

More specifically, I expected the exclude of Cargo.toml to be handled consistently in the package and vendor commands. For the deno project, the exclusions are listed here (note: there are inverted exclusions too. aka: !somefile = include somefile):

https://github.com/denoland/rusty_v8/blob/54a72d7628028063f82802f11e48c7eac89f96bf/Cargo.toml#L11-L50

I expected the vendor folder to contain a file named .gn, which is required for building the project.

Steps

$ cd path/to/denoland/deno
$ cargo vendor
$ ls  -la ./vendor/rusty_v8/

# The problem here is that we are not seeing .gn,
# and a few other files that are required for the
# deno build. This means the ./vendor cannot be used
# to build.
# 
# But if we "cargo package"
# instead that seems to work.

See the original report to denoland/rusty_v8#566 for more logs and other info.

Possible Solution(s)
Maybe the vendoring and publishing code paths are divergent somewhere?

Notes

Platform info

❯ uname -o
❯ uname -r
❯ cargo version
❯ rustc --version
GNU/Linux
5.10.3-1-default
cargo 1.47.0 (f3c7e066a 2020-08-28)
rustc 1.47.0 (18bf6b4f0 2020-10-07)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions