fix(ci): per-PR cargo-test — per-package runs + don't fan into FFI shims#5415
Merged
Conversation
Two issues made #5411's fast path fail on foundational diffs (#5402): 1. Feature unification: one multi-package 'cargo test -p A -p B' invocation unifies perry-runtime features; a crate enabling e.g. fetch turns on perry-runtime's js_fetch_with_options reference, defined in a separate crate the other test binaries don't link -> undefined reference. Fix: run each crate in its own invocation (per-package), isolating feature sets. 2. Over-broad fan-out: a perry-runtime change closured into ~40 FFI shims (perry-ext-*/perry-stdlib), each a perry-runtime feature rebuild, for unit tests that don't exercise runtime internals. Fix: ci_test_scope.py no longer fans into perry-ext-*/perry-stdlib (_is_fanout_leaf); direct changes still select them. perry-runtime change now -> 4 crates, not ~50. Validated locally end-to-end: green, ~2min warm.
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.
Follow-up to #5411/#5413. Two issues made the fast per-PR path fail on foundational diffs (surfaced by #5402):
cargo test --lib --bins -p A -p B ...invocation unifies perry-runtime's features; a crate enabling e.g.fetchturns on perry-runtime'sjs_fetch_with_optionsreference, defined in a separate crate the other test binaries don't link →undefined reference. Fix: run each crate in its own invocation (per-package), isolating feature sets.perry-ext-*, perry-stdlib), each a perry-runtime feature rebuild, for unit tests that don't exercise runtime internals. Fix:ci_test_scope.pyno longer fans into those (_is_fanout_leaf); a direct change still selects them. A perry-runtime change now selects 4 crates, not ~50.Validated locally end-to-end: the full #5402 fast-path scope (12 core crates, per-package) runs green in ~2 min warm; no link errors.