Skip to content

Conversation

@sunshowers
Copy link
Contributor

I'm going to add an xtask to manage OpenAPI documents soon, and the template I currently have works with clap.

Also replace the manual FromStr with ValueEnum.

Created using spr 1.3.6-beta.1
Omicron, // package to be included in an omicron zone
Global, // package to run standalone in the global zone
/// .deb or .p5p, depending on the platform
#[value(alias = "n")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The ValueEnum means we get the --format omicron for free without the FromStr implementation, right? The buildomat jobs are still using the long form of the option and passing, so I assume this is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, both the short and long forms will work, so there aren't any behavior changes compared to today.

@sunshowers sunshowers merged commit 515c31e into main Oct 1, 2025
4 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/12-xtask-migrate-to-clap branch October 1, 2025 20:38
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.

3 participants