-
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
Subcommand dependencies #1225
Subcommand dependencies #1225
Conversation
The subcommand dependencies outputs the resolved dependencies of a project, the concrete used versions including overrides, in a TOML format.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
Thanks for the PR! This is definitely an important part of Cargo's story in easy and amenable tooling. Some things to think about:
In general there's a lot of ways a subcommand like this can go, and I don't think we've truly fleshed out our "subcommand producing machine-readable data" story just yet. For example we may want to standardize on an output format flag to output in e.g. TOML or JSON format. What are your thoughts on this? |
The first thing is, if it could make sense to have a e.g.
And then a low level function like:
The dependency output could then be based on this function. If the dependencies subcommand should be used for several operations Regarding the standardization of subcommands outputing machine-readable |
The implementation of this subcommand is now continued in #1434. |
Most of the work was done by @dan-t in rust-lang#1225 and by @winger in rust-lang#1434 Fixes rust-lang#2193
Most of the work was done by @dan-t in #1225 and by @winger in #1434 Fixes #2193 I failed to properly rebase previous attempts so I just salvaged this from bits and pieces. @alexcrichton are you sure that the default format should be TOML? I think that TOML is more suitable for humans, and JSON is better (at the moment at least) for tools. Maybe we should default to ~~TOML~~ JSON?
The subcommand dependencies outputs the resolved dependencies
of a project, the concrete used versions including overrides,
in a TOML format.