Picks up where the auto-fix pass left off. Workspace warning count
goes from 105 to 0 across `cargo build --workspace --all-targets`.
Three categories of fixes:
1. Mechanical fixes the auto-pass couldn't handle (unused imports
inside braced multi-name `use` statements, unused variables that
needed an underscore prefix without breaking other references):
batched via a small Python script, then 6 manual edits where the
warning location and the actual identifier were on different
lines.
2. Dead-code that's intentionally kept around for future wiring or
debug visibility — `#[allow(dead_code)]` at the right scope:
- 19 individual items (struct fields, methods, free functions,
type aliases, enum variants), e.g. `default_namespace` / `default_cluster_issuer`
in zitadel/mod.rs (used via serde defaults, opaque to rustc),
`score` fields on the OKD bootstrap interpret types,
`crd_exists` methods on the prometheus alerting scores, the
`harmony_inventory_agent::local_presence::{DiscoveryEvent,
discover_agents}` re-exports.
- 5 module-level allows for files where most items are
aspirational scaffolding (harmony_agent's replica workflow,
opnsense-config dnsmasq, three opnsense-api examples).
3. Special cases that needed real fixes, not allows:
- `opnsense-config-xml/src/data/haproxy.rs`: deprecated
`rand::thread_rng` / `Rng::gen` updated to `rng()` / `random`.
- `harmony_secret/src/lib.rs`: the `secrete2etest` integration
test gate is now declared in Cargo.toml's `[lints.rust]
unexpected_cfgs.check-cfg`; the gated test module is structured
so its dead `TestSecret`/`TestUserMeta` types come along for
the cfg ride and don't show up as unconditional dead code.
- `harmony/src/modules/nats/score_nats_k8s.rs:241`: `K8sIngressScore
{ name: todo!(), ... }`'s unreachable expression annotated.
- `harmony/src/domain/topology/k8s_anywhere/k8s_anywhere.rs:982`:
wrap the dead-after-`return Ok(Noop)` branch in
`#[allow(unreachable_code)] { ... }`. Behavior unchanged.
- `examples/try_rust_webapp/Cargo.toml`: `autobins = false` so
`src/main.rs` isn't auto-registered as both bin AND example.
All 16 lib-test suites pass: 437 tests, 0 failed, 13 ignored.
Ready for `-Dwarnings` in CI as a follow-up — the gate makes
sense once we're sure no contributor's local builds slip warnings
back in.
37 lines
1.1 KiB
TOML
37 lines
1.1 KiB
TOML
[package]
|
|
name = "harmony_secret"
|
|
edition = "2024"
|
|
version.workspace = true
|
|
readme.workspace = true
|
|
license.workspace = true
|
|
|
|
# `secrete2etest` is a custom cfg flag used to gate integration tests
|
|
# that require a live OpenBao instance. Declare it here so rustc doesn't
|
|
# emit `unexpected_cfg` warnings.
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(secrete2etest)'] }
|
|
|
|
[dependencies]
|
|
harmony_secret_derive = { version = "0.1.0", path = "../harmony_secret_derive" }
|
|
serde = { version = "1.0.209", features = ["derive", "rc"] }
|
|
serde_json = "1.0.127"
|
|
thiserror.workspace = true
|
|
lazy_static.workspace = true
|
|
directories.workspace = true
|
|
log.workspace = true
|
|
# infisical = "0.0.2"
|
|
infisical = { git = "https://github.com/jggc/rust-sdk.git", branch = "patch-1" }
|
|
tokio.workspace = true
|
|
async-trait.workspace = true
|
|
http.workspace = true
|
|
inquire.workspace = true
|
|
interactive-parse = "0.1.5"
|
|
schemars = "0.8"
|
|
vaultrs = "0.7.4"
|
|
reqwest = { workspace = true, features = ["json"] }
|
|
url.workspace = true
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions.workspace = true
|
|
tempfile.workspace = true
|