BREG: clippy fails with the runtime feature alone

Open Beginner friendly
#1,058 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

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.

Description

agent-ready area:breg criticality:p3 rust triage:needs-implementation

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.
Dominant language
Rust
Stars
2
Forks
0
Avg merge
3h 45m
Merged PRs (30d)
134

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from registrystack/registry-stack

All issues in registrystack/registry-stack

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.