Make commands in dependencies available to run#9833
Make commands in dependencies available to run#9833tchernobog wants to merge 3 commits intorust-lang:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Eh2406 (or someone else) soon. Please see the contribution instructions for more information. |
|
Thanks for the PR, but this is a pretty large feature to add to Cargo, so I don't think that a PR is necessarily the best starting point. If you're interested in pursuing this I think the first thing to do is to write up a design of what this would look like and get consensus around that first. This may also end up requiring an RFC for broader feedback as well. |
Thanks @alexcrichton, I opened rust-lang/rfcs#3168 as per your suggestion. |
147578b to
9d32e84
Compare
TDD testcases for allowing `cargo run` to be invoked on dependencies of the workspace members via their corresponding pkgid. Relates to rust-lang#2267, rust-lang#872.
This approach teaches `cargo run` to handle also binary targets in dependencies. In turn, it allows using cargo as a shim when needing to invoke a specific package version from the set of dependencies, without resorting to install a user-wide version of a binary. Users of e.g. `mdbook` should rejoice. Fixes rust-lang#2267.
f08e031 to
530f89c
Compare
530f89c to
fb5d0b4
Compare
|
I will close for now. We can reopen when the RFC is discussed. |
This approach teaches
cargo runto handle also binary targets in dependencies. In turn, it allows using cargo as a shimwhen needing to invoke a specific package version from the set of dependencies, without resorting to install a user-wide
version of a binary.
Users of e.g.
mdbookshould rejoice.Note that this is my first contribution to
cargo. I am not familiar yet on how is the best way to do things.Also, I haven't adjusted any documentation yet, I wanted first to see if my idea is sound or not.
If approved, fixes #2267.