Skip to content
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

[docs] cargo vendor -x no longer works replace with cargo-vendor vendor -x #107

Closed
bweston92 opened this issue Aug 23, 2019 · 3 comments
Closed

Comments

@bweston92
Copy link

I have run the cargo vendor and it has created directories where I want them however they don't have a version suffix which seems required by this tool.

/workspace/src/lwebco.de/third_party/cargo $ 
/workspace/src/lwebco.de/third_party/cargo $ ls vendor/
linked-hash-map log             yaml-rust
/workspace/src/lwebco.de/third_party/cargo $ cat Cargo.toml 
[package]
name = "lwebco_de"
version = "0.1.0"

[lib]
path = "fake_lib.rs"

[dependencies]
log = "=0.3.6"
yaml-rust = "0.4.3"

[raze]
workspace_path = "//third_party/cargo"
target = "x86_64-unknown-linux-gnu"

You can see the output below when I try to run cargo raze.

$ cargo raze
Loaded override settings: RazeSettings {
    workspace_path: "//third_party/cargo",
    target: "x86_64-unknown-linux-gnu",
    crates: {},
    gen_workspace_prefix: "raze",
    genmode: Vendored,
    output_buildfile_suffix: "BUILD",
}
error: Raze failed to render with cause: "Failed to find expected vendored crates in Some("/workspace/src/lwebco.de/third_party/cargo/./vendor/"): ["yaml-rust-0.4.3", "linked-hash-map-0.5.2", "log-0.3.6"]. Did you forget to run cargo-vendor?"   

Versions

$ rustc --version
rustc 1.37.0 (eae3437df 2019-08-13)
$ cargo --version
cargo 1.37.0 (9edd08916 2019-08-02)
@bweston92
Copy link
Author

Instead of using cargo vendor -x which fails you now need to use cargo-vendor vendor -x

See error message below:

$ cargo vendor -x
error: the crates.io `cargo vendor` command has now been merged into Cargo itself
and does not support the flag `--explicit-version` currently; to continue using the flag you
can execute `cargo-vendor vendor ...`, and if you would like to see this flag
supported in Cargo itself please feel free to file an issue at
https://github.com/rust-lang/cargo/issues/new

Should we update the docs?

@bweston92 bweston92 changed the title Vendored Cargo libraries not being picked up. [docs] cargo vendor -x no longer works replace with cargo-vendor vendor -x Aug 23, 2019
@acmcarther
Copy link
Member

Thanks for reporting this! Yeah I did see the inclusion of cargo-vendor in cargo fly by my news feed, but it slipped my mind to update the docs here.

I regret to see that explicit versions are not supported out of the box. I've filed rust-lang/cargo#7291 accordingly.

I can commit to figuring out what actually works (it seems cargo-vendor vendor -x is it) and updating the documentation.

@acmcarther
Copy link
Member

Fixed in #108. I'll keep an eye on rust-lang/cargo#7291. Thanks again for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants