Skip to content

Gate the wide-observable test helpers on their users' features and lint pecos-decoders with default features in CI - #696

Open
ciaranra wants to merge 2 commits into
devfrom
fix/pecos-decoders-default-clippy
Open

Gate the wide-observable test helpers on their users' features and lint pecos-decoders with default features in CI#696
ciaranra wants to merge 2 commits into
devfrom
fix/pecos-decoders-default-clippy

Conversation

@ciaranra

@ciaranra ciaranra commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

cargo clippy -p pecos-decoders --all-targets -- -D warnings with default features has been red on dev: three helpers in the spec::build test module (width_dem, assert_wide_correct, assert_64_then_65_rejected) are only called from tests gated on optional decoder features, so a default-feature build sees dead code. Workspace-wide clippy never showed it because feature unification enables those features, and CI's per-crate default-feature lane did not include this crate.

Changes

  • The three helpers now carry the union of their users' feature gates (pymatching, ldpc, relay-bp for the wide-observable helper; tesseract, fusion-blossom, uf, mwpf for the 64-then-65 helper; all seven for the shared DEM builder), with a comment explaining why.
  • pecos-decoders is added to the "clippy without LLVM features" per-crate lane in rust-test.yml, so a default-feature regression in this crate fails CI instead of hiding behind workspace feature unification.

Verification

  • cargo clippy --locked -p pecos-decoders --all-targets -- -D warnings: clean for default features, --all-features, and each of the eight features alone (ldpc, fusion-blossom, mwpf, pymatching, tesseract, chromobius, relay-bp, uf), and via the exact CI-lane invocation from inside the crate directory.
  • cargo test --locked -p pecos-decoders: 29 pass (default), 46 pass (--all-features).
  • A default-feature clippy sweep over the other feature-bearing crates (pecos-foreign, pecos-quantum, pecos-qec, pecos-phir, pecos-neo, pecos-lindblad, pecos-zx, pecos-wasm, pecos-simulators, pecos-core, pecos-qasm, pecos-phir-json, pecos) found no other instance.
  • pre-commit run --all-files: pass.

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.

1 participant