alexcrichton/cargo-vendor

unused manifest key: source

Closed this issue · 7 comments

Is cargo vendor plugin available in rust 1.20? Running cargo vendor downloads all the dependencies, which indicates it is, but after updating Cargo.toml cargo build outputs following warnings:
warning: unused manifest key: source
This fails during cargo build on the machine without network connection.
Can someone guide me how to set it up correctly please?

Ah the configuration is supposed to go in .cargo/config, not Cargo.toml. Does that work for you?

I see, yes that fixed the problem. Thanks!

Actually I noticed some of the crates from cargo are still trying to setup the connection. I guess this is something specific to particular package (https://github.com/gchp/termbox-sys). What would be the best practice here, with Cargo?

Hm I'm not quite sure what you mean, can you elaborate?

Sorry, what I was thinking of is that particular library downloads the relevant source and build at compile time (according to the Readme). Currently cargo vendor plugin does not handle this edge case.
So I'm not sure if the only resort here is to build that crate separately, by hand in the created vendor directory?
With a few more packages with similar problem it could quickly get out of hands.

Edit: After manual edit of this specific crate, I get this warning:
directory sources are not intended to be edited, if modifications are required then it is recommended that [replace] is used with a forked copy of the source

@kubaroth oh if a dependency is downloading stuff in a build script that needs to be fixed upstream, it's not something cargo-vendor can handle

ok, Thanks for clarification.