Skip to content

fix(cli): enable keyring cli feature to restore use_native_store on keyring 4.1#164

Closed
BryanFRD wants to merge 1 commit into
mainfrom
fix/keyring-cli-feature
Closed

fix(cli): enable keyring cli feature to restore use_native_store on keyring 4.1#164
BryanFRD wants to merge 1 commit into
mainfrom
fix/keyring-cli-feature

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #163.

CI (Rust CLI) has been red on main since the keyring 4.1.0/4.1.1 bumps (#159/#160): cargo clippy fails with error[E0425]: cannot find function use_native_store in crate keyring at cli/src/storage.rs:14.

Cause: keyring 4.1 split into default = ["v1"] and a cli feature, moving use_native_store into the cli module. We depend on keyring = "4" (default features) so it is no longer at the crate root.

Fix: keyring = { version = "4", default-features = false, features = ["cli"] }. The cli use_native_store(prefer_secret_service: bool) is behavior-identical to before (true = Secret Service on Linux), so cli/src/storage.rs is unchanged.

Verified locally: cargo check, cargo clippy --all-targets -- -D warnings, and cargo fmt --check all pass (Windows target). CI covers Linux.

Note / follow-up: the cli feature pulls a lot of transitive deps the CLI does not need (clap, rpassword, and db-keystore → a SQLite engine). The keyring maintainers explicitly recommend that real apps link keyring-core + only the platform store crates they need instead. A lean follow-up can drop keyring entirely and call keyring_core::set_default_store(<platform>::Store::new()) under #[cfg(target_os)] — happy to do that as a separate PR.

@BryanFRD BryanFRD enabled auto-merge (squash) June 26, 2026 10:42
@BryanFRD BryanFRD disabled auto-merge June 26, 2026 10:45
@BryanFRD

Copy link
Copy Markdown
Contributor Author

Superseded by the lean keyring-core + platform-store version (no SQLite/clap bloat). See follow-up PR.

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.

CLI build broken on keyring 4.1: use_native_store moved behind the cli feature

1 participant