CI: scope cargo-hack to shipped crates via composed switcheroo presets#2730
Draft
citizen-stig wants to merge 2 commits intodevfrom
Draft
CI: scope cargo-hack to shipped crates via composed switcheroo presets#2730citizen-stig wants to merge 2 commits intodevfrom
citizen-stig wants to merge 2 commits intodevfrom
Conversation
The hack and hack_default_targets jobs previously ran `cargo switcheroo disable`, which forced cargo-hack's feature-powerset search over the whole workspace — including demo-rollup, benchmarks, soak-testing, fuzz harnesses, and prover binaries that we don't ship. Replace `disable` with an additive composition (`set default` + `add zkvms/ethereum/ celestia/demo-stf`) so only shipped crates are checked. While building the composition surfaced 13 shipped crates that were in the workspace but in no preset (silently covered only by `disable`). Distribute them into `default.json` / `ethereum.json` and add new `celestia.json` and `demo-stf.json` presets. Fix a stale path typo in `examples.json` (sov-soak-lib -> sov-soak-testing-lib). Add `scripts/check_preset_coverage.sh` + `scripts/switcheroo/excluded.json` as a pre-flight step in the two hack jobs: fail fast if any workspace member is neither covered by a preset nor explicitly excluded, and flag preset entries whose paths no longer exist. Prevents the same kind of silent omission from recurring when new crates are added. Only the two hack jobs are touched; other `cargo switcheroo disable` callers (nextest, doctests, coverage) remain unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit extended default.json with 8 orphaned shipped crates but forgot to regenerate the committed [workspace.default-members] array in Cargo.toml. The `check` job's "Exit if working tree is dirty" step (rust.yml:128) and the dedicated `cargo-switcheroo-default` job both run `cargo switcheroo set default && git diff --exit-code` to enforce that the two stay in sync, so CI was failing. Run `cargo switcheroo set default` to bring Cargo.toml back in sync. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hack and hack_default_targets jobs previously ran
cargo switcheroo disable, which forced cargo-hack's feature-powerset search over the whole workspace — including demo-rollup, benchmarks, soak-testing, fuzz harnesses, and prover binaries that we don't ship. Replacedisablewith an additive composition (set default+add zkvms/ethereum/ celestia/demo-stf) so only shipped crates are checked.While building the composition surfaced 13 shipped crates that were in the workspace but in no preset (silently covered only by
disable). Distribute them intodefault.json/ethereum.jsonand add newcelestia.jsonanddemo-stf.jsonpresets. Fix a stale path typo inexamples.json(sov-soak-lib -> sov-soak-testing-lib).Add
scripts/check_preset_coverage.sh+scripts/switcheroo/excluded.jsonas a pre-flight step in the two hack jobs: fail fast if any workspace member is neither covered by a preset nor explicitly excluded, and flag preset entries whose paths no longer exist. Prevents the same kind of silent omission from recurring when new crates are added.Only the two hack jobs are touched; other
cargo switcheroo disablecallers (nextest, doctests, coverage) remain unchanged.Description
Summary of the changes...
CHANGELOG.mdwith a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.Cargo.tomlchanges before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)Linked Issues
Testing
Describe how these changes were tested. If you've added new features, have you added unit tests?
Docs
Describe where this code is documented. If it changes a documented interface, have the docs been updated?
Rendered docs are available at
https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html