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

zx: use clap for arg parsing #505

Merged
merged 4 commits into from
Jan 22, 2024
Merged

Conversation

FineFindus
Copy link
Contributor

@FineFindus FineFindus commented Nov 5, 2023

Update zbus-xmlgen to use clap. This change converts the --session, --system, --address, and file arguments into subcommands.

Builds on #499 to also add the --split-interfaces options.

Possible future improvements

  • Improve help/documentation by adding descriptions/comments to arguments.
  • Generate completions and a man page

zbus_xmlgen/src/main.rs Outdated Show resolved Hide resolved
@FineFindus FineFindus force-pushed the feat/zx-args-parser branch 3 times, most recently from 223afd2 to 8d272dc Compare November 7, 2023 15:47
@zeenix
Copy link
Contributor

zeenix commented Nov 23, 2023

@FineFindus hey. You think you'll be able to finish this soon?

@FineFindus
Copy link
Contributor Author

It's basically done, the only two things missing are #499 being merged and the MSRV CI failing. I'm still not quite sure why, for some reason it tries to build a newer clap version than specified. Maybe a caching problem? We could try a re-run, hoping that the cache is now old enough not to be an issue-.

@FineFindus FineFindus force-pushed the feat/zx-args-parser branch 2 times, most recently from 15841a1 to 3468d59 Compare January 19, 2024 23:15
@FineFindus
Copy link
Contributor Author

FineFindus commented Jan 19, 2024

Rebased the pr to the latest main. I had a bit of trouble rebasing with the additional changes in #499, so I ported the code in a single commit. I also found some minor issues with the previous version along the way, see the following commits. Should be ready for a review now :)

@FineFindus FineFindus marked this pull request as ready for review January 19, 2024 23:23
@FineFindus FineFindus force-pushed the feat/zx-args-parser branch 2 times, most recently from b432d51 to b89f7db Compare January 20, 2024 11:30
Copy link
Contributor

@zeenix zeenix left a comment

Choose a reason for hiding this comment

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

Thanks for updating. Some questions and concerns still. Also the last commit feels very much like a fixup of the second commit. Is it? If so, please squash it into that. If not, please add some description to the commit.

zbus_xmlgen/Cargo.toml Show resolved Hide resolved
zbus_xmlgen/src/cli.rs Show resolved Hide resolved
zbus_xmlgen/src/main.rs Outdated Show resolved Hide resolved
zbus_xmlgen/src/cli.rs Show resolved Hide resolved
@FineFindus FineFindus force-pushed the feat/zx-args-parser branch 2 times, most recently from b989419 to 8023001 Compare January 20, 2024 22:01
@FineFindus FineFindus requested a review from zeenix January 22, 2024 16:40
Changes the command-line interface, input files are now specified with subcommands
instead of arguments.
`global` arguments can be positioned in subcommands. This makes it
possbile to use the argument at the end.
@zeenix zeenix force-pushed the feat/zx-args-parser branch from 8023001 to 0fe4b11 Compare January 22, 2024 21:34
Copy link
Contributor

@zeenix zeenix left a comment

Choose a reason for hiding this comment

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

LGTM. There were issues in the testing but as we discussed in the PMs, they're not caused by your changes here.

@zeenix zeenix merged commit c03e249 into dbus2:main Jan 22, 2024
7 checks passed
@FineFindus FineFindus deleted the feat/zx-args-parser branch January 22, 2024 22:13
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.

2 participants