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

Migrate to clap 4.2, run binaries/examples with --help in CI, and clean up examples #315

Merged
merged 12 commits into from
Apr 28, 2023

Conversation

micolous
Copy link
Collaborator

@micolous micolous commented Apr 27, 2023

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 -), so conflicts_with_all and ArgGroups need updating. It also looks like some parts of clap only check argument definitions at runtime, and errors don't show up with cargo 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:

  • rename authenticate/main.rs to authenticate.rs
  • rename cable_domain/main.rs to cable_domain.rs
  • cable_tunnel example now uses required-features in Cargo.toml; so cable_tunnel/main.rs is gone, and effectively renaming cable_tunnel/core.rs to cable_tunnel.rs. This also fixes a broken link in the cable-tunnel-server README.
  • delete obsolete nfc_token_info example, as fido-key-manager can do the same thing
  • rename softtoken/main.rs to softtoken.rs

Fixes #313

  • cargo test has been run and passes
  • documentation has been updated with relevant examples (if relevant)

@micolous 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 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
@micolous micolous marked this pull request as ready for review April 28, 2023 00:50
fido-key-manager/src/main.rs Show resolved Hide resolved
@micolous micolous merged commit c7ab114 into kanidm:master Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable clippy in CI for stable once clap issues addressed.
2 participants