Migrate to clap 4.2, run binaries/examples with --help in CI, and clean up examples #315
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