registrystack / registrystack/registry-stack

BREG: clippy fails with the runtime feature alone

Open Beginner friendly
#1,058 0 comments 0 reactions 0 assignees View on GitHub
agent-ready area:breg criticality:p3 rust
Dominant language
Rust
Stars
2
Forks
0
Avg merge
2h 57m
Merged PRs (30d)
128

Description

Follow-up to #1057.

`cargo clippy --locked -p registry-breg --no-default-features --features runtime --all-targets -- -D warnings` fails:

```
error: unused import: `action::erase_expired_action_evidence`
--> crates/registry-breg/src/mutation.rs:6:16
error: function `erase_expired_action_evidence` is never used
--> crates/registry-breg/src/mutation/action.rs:2141:21
```

`crates/registry-breg/src/action_evidence_maintenance.rs` is the only consumer,
and `crates/registry-breg/src/lib.rs:16` gates it on `all(feature = "runtime",
feature = "tooling")` while `mutation.rs:6` re-exports the function
unconditionally. Root CI's `rust` job runs `cargo clippy --workspace
--all-targets`, which enables the union of workspace features, so the
combination is never exercised there. `--no-default-features` alone, and the
`schema` and `tooling` feature sets on their own, are clean.

- [ ] Match the gate: either gate the `pub(crate) use` in
`crates/registry-breg/src/mutation.rs:6` and the definition in
`crates/registry-breg/src/mutation/action.rs:2141` on the same
`all(feature = "runtime", feature = "tooling")` the module is gated on,
or relax `crates/registry-breg/src/lib.rs:16` to `feature = "runtime"` if
the maintenance module does not actually need `tooling`.
- [ ] Add the combination to CI so it cannot regress, or state in
`crates/registry-breg/Cargo.toml` that `runtime` is not a supported
standalone feature set.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the listed cargo clippy command for registry-breg. Read crates/registry-breg/src/lib.rs:16, mutation.rs:6, mutation/action.rs:2141, and action_evidence_maintenance.rs to determine the intended feature gate. Align the gate or document the unsupported feature set, then add the standalone combination to CI or Cargo.toml and rerun clippy with -D warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, ci-cd, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.