apollo_node: forward os_input feature to committer/batcher deps#14371
Conversation
PR SummaryLow Risk Overview This aligns feature gates when building with Reviewed by Cursor Bugbot for commit 633c801. Bugbot is set up for automated code reviews on this repo. Configure here. |
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).
`--all-features` clippy builds enable the `os_input` gates on shared types (`apollo_committer_types`, `starknet_committer`) while leaving the consumers' own `os_input` feature off, because `apollo_node` exposed no `os_input` feature to propagate it. This produced cross-crate compile errors: - E0027 in `apollo_committer::update_metrics` (missing `os_input`-gated `BlockMeasurement.fetched_witnesses_count` in the destructure) - E0004 in `apollo_batcher` (non-exhaustive match on the `os_input`-gated `CommitterRequestLabelValue::ReadPathsAndCommitBlock`, added in #14003) Forward `os_input` from `apollo_node` to every direct dependency that defines it (`apollo_batcher`, `apollo_committer`, `apollo_committer_types`) so the gate stays unified under `--all-features`. No `#[cfg]` flags removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9e0fa10 to
633c801
Compare
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).
Problem
--all-featuresclippy builds (e.g. thecode_stylejob) fail to compile becauseapollo_nodeexposed noos_inputfeature. Under--all-features, theos_inputgates on shared types (apollo_committer_types,starknet_committer) get enabled, while the consumers' ownos_inputstays off, yielding cross-crate errors:apollo_committer::update_metrics— theos_input-gatedBlockMeasurement.fetched_witnesses_countfield is present in the compiled struct but omitted from the exhaustive destructure.apollo_batcher— non-exhaustive match on theos_input-gatedCommitterRequestLabelValue::ReadPathsAndCommitBlockvariant (added in apollo_committer: add new request handler #14003).Reproduced on a clean
mainpost-#14003 viacargo clippy -p apollo_node --all-targets --all-features.Note: #14003 was expected to resolve this but does not — the E0027 still reproduces after it merged, and it additionally introduced the E0004 site.
Fix
Forward
os_inputfromapollo_nodeto every direct dependency that defines it (apollo_batcher,apollo_committer,apollo_committer_types), unifying the cross-crate gate under--all-features. No#[cfg]flags removed; no source code changed.Verification
All green against current
main:--all-featurescargo clippy -p apollo_node --all-targets --all-featurescargo clippy -p apollo_node --all-targets(no-feature path)🤖 Generated with Claude Code