alexcrichton / cargo-vendor

Archived as subcommand is now part of Cargo itself
Apache License 2.0
262 stars 30 forks source link

unused manifest key: source #49

Closed kaarrot closed 6 years ago

kaarrot commented 6 years ago

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?

alexcrichton commented 6 years ago

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

kaarrot commented 6 years ago

I see, yes that fixed the problem. Thanks!

kaarrot commented 6 years ago

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?

alexcrichton commented 6 years ago

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

kaarrot commented 6 years ago

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

alexcrichton commented 6 years ago

@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

kaarrot commented 6 years ago

ok, Thanks for clarification.