-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make commands in dependencies available to run #9833
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 run
to 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.
mdbook
should 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.