Skip to content
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

feat: new --root-only flag for metadata #15105

Closed
wants to merge 5 commits into from
Closed

Conversation

tkr-sh
Copy link

@tkr-sh tkr-sh commented Jan 26, 2025

This PR introduces a new flag for cargo metadata: --root-only.

This flag will only output the cargo workspace root.

This is a useful information. But when you're in a big workspace, it can take a lot of time just to get the workspace root. Therefore, this flag allow users to get the workspace without computing all the workspace's metadata.

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-documenting-cargo-itself Area: Cargo's documentation Command-metadata S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 26, 2025
@rustbot rustbot added the A-cli-help Area: built-in command-line help label Jan 26, 2025
@weihanglo
Copy link
Member

As a heads up, our contribution process asks that issues be labelled as S-accepted before moving on to PRs.

@weihanglo
Copy link
Member

To find the workspace root, there's already a similar command cargo locate-project

@tkr-sh
Copy link
Author

tkr-sh commented Jan 26, 2025

@weihanglo Oh Sorry! I missed that, thanks! (Opened: #15106)

@tkr-sh
Copy link
Author

tkr-sh commented Jan 26, 2025

oh... thanks! Going to close this PR therefore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation Command-metadata S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants