Skip to content

Support for descriptions on third-party subcommands in cargo --list - #10663

Closed
dtolnay wants to merge 2 commits into
rust-lang:masterfrom
dtolnay-contrib:desc
Closed

Support for descriptions on third-party subcommands in cargo --list#10663
dtolnay wants to merge 2 commits into
rust-lang:masterfrom
dtolnay-contrib:desc

Conversation

@dtolnay

@dtolnay dtolnay commented May 12, 2022

Copy link
Copy Markdown
Member

What does this PR try to resolve?

This PR implements my proposal in #10662 to enable cargo --list to show descriptions of third-party subcommands, not only the subcommands which are built into Cargo.

How should we test and review this PR?

I have included an ELF note containing a description in the most recent version of the cargo-expand crate. You can confirm that cargo --list is able to print a description for that subcommand (on Linux only, to begin with).

$ cargo install cargo-expand --force
$ gh pr checkout 10663
$ cargo run -- --list

@rust-highfive

Copy link
Copy Markdown

r? @ehuss

(rust-highfive has picked a reviewer for you, use r? to override)

Comment thread src/bin/cargo/subcommand_metadata.rs Outdated
@dtolnay
dtolnay marked this pull request as ready for review May 12, 2022 18:12
@bors

bors commented Jul 1, 2022

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #10804) made this pull request unmergeable. Please resolve the merge conflicts.

@dtolnay

dtolnay commented Jul 2, 2022

Copy link
Copy Markdown
Member Author

Comment on lines +49 to +50
macro_rules! description {
($description:expr) => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: maybe cargo_subcommand_metadata::description!(); with no string argument could embed env!(CARGO_PKG_DESCRIPTION) by default.

@bors

bors commented Sep 1, 2022

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11029) made this pull request unmergeable. Please resolve the merge conflicts.

@dtolnay

dtolnay commented Sep 2, 2022

Copy link
Copy Markdown
Member Author

@bors

bors commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11159) made this pull request unmergeable. Please resolve the merge conflicts.

@dtolnay

dtolnay commented Oct 2, 2022

Copy link
Copy Markdown
Member Author

@bors

bors commented Nov 14, 2022

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11369) made this pull request unmergeable. Please resolve the merge conflicts.

@dtolnay

dtolnay commented Nov 16, 2022

Copy link
Copy Markdown
Member Author

@bors

bors commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11807) made this pull request unmergeable. Please resolve the merge conflicts.

@ehuss

ehuss commented May 18, 2023

Copy link
Copy Markdown
Contributor

I'm sorry for not responding sooner. I'm going to close since nobody on the team has the capacity to help with this at this time. I've followed up on #10662 with some thoughts we had on the design. I think there might be some more discussion needed on the design, but I don't think any of us can follow up with it right now. Hopefully at some time in the future we can engage with this idea more.

@ehuss ehuss closed this May 18, 2023
@dtolnay
dtolnay deleted the desc branch May 18, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

5 participants