-
Notifications
You must be signed in to change notification settings - Fork 84
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
Migrate to clap 4.2, run binaries/examples with --help in CI, and clean up examples #315
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ple and fido-key-manager
micolous
changed the title
Migrate to clap 4.2
Migrate to clap 4.2, and run binaries/examples with --help in CI
Apr 27, 2023
micolous
changed the title
Migrate to clap 4.2, and run binaries/examples with --help in CI
Migrate to clap 4.2, run binaries/examples with --help in CI, and clean up examples
Apr 28, 2023
Firstyear
approved these changes
Apr 28, 2023
kikuomax
pushed a commit
to codemonger-io/webauthn-rs
that referenced
this pull request
Nov 24, 2024
…an up examples (kanidm#315) * Migrate to clap 4.2.4, and update for API changes * fix cable_domain for clap 4.2 * formatting * run tools with --help in CI * fix flag names in clap 4 * fix another flag, attempt to pull spurious dep on PCSC * fix cable_domain for clap4 * cable_tunnel: use required-features * Remove nfc_token_info, which has been superceded by authenticate example and fido-key-manager * cable_tunnel: fix another flag name * move examples with just a "main.rs" up one level
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was an issue with clippy throwing correctness errors on Rust 1.69 for clap 3.2.x's macros, so I had previously disabled it. Migrating to clap 4.x fixes this, so we can re-enable clippy in CI.
clap 4.x has a few API changes, the main one for us was that it now the original struct field name as a field ID, rather than the "normalised" form (changing
_
to-
), soconflicts_with_all
andArgGroup
s need updating. It also looks like some parts of clap only check argument definitions at runtime, and errors don't show up withcargo test
; so we need to run those binaries manually with--help
to discover errors.While here, I've done some house-keeping on many
webauthn-authenticator-rs
examples:authenticate/main.rs
toauthenticate.rs
cable_domain/main.rs
tocable_domain.rs
cable_tunnel
example now usesrequired-features
inCargo.toml
; socable_tunnel/main.rs
is gone, and effectively renamingcable_tunnel/core.rs
tocable_tunnel.rs
. This also fixes a broken link in thecable-tunnel-server
README.nfc_token_info
example, asfido-key-manager
can do the same thingsofttoken/main.rs
tosofttoken.rs
Fixes #313