Skip to content

Conversation

@tchernobog
Copy link

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.

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.

@rust-highfive
Copy link

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2021
@alexcrichton
Copy link
Member

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.

@tchernobog
Copy link
Author

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.

@tchernobog tchernobog force-pushed the issues/2267 branch 2 times, most recently from 147578b to 9d32e84 Compare August 27, 2021 14:09
@tchernobog tchernobog marked this pull request as draft August 27, 2021 16:20
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.
@tchernobog tchernobog force-pushed the issues/2267 branch 4 times, most recently from f08e031 to 530f89c Compare August 31, 2021 10:28
@ehuss ehuss removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 26, 2021
@Eh2406
Copy link
Contributor

Eh2406 commented Oct 5, 2021

I will close for now. We can reopen when the RFC is discussed.

@Eh2406 Eh2406 closed this Oct 5, 2021
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

Successfully merging this pull request may close these issues.

Make commands in dev-dependencies available to run

5 participants