Skip to content

fix(ci): per-PR cargo-test — per-package runs + don't fan into FFI shims#5415

Merged
proggeramlug merged 1 commit into
mainfrom
fix/fast-test-perpackage
Jun 18, 2026
Merged

fix(ci): per-PR cargo-test — per-package runs + don't fan into FFI shims#5415
proggeramlug merged 1 commit into
mainfrom
fix/fast-test-perpackage

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Follow-up to #5411/#5413. Two issues made the fast per-PR path fail on foundational diffs (surfaced by #5402):

  1. Feature-unification link errors — testing several crates in ONE cargo test --lib --bins -p A -p B ... invocation unifies perry-runtime's 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 reverse-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 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.

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.
@proggeramlug proggeramlug merged commit 8432048 into main Jun 18, 2026
@proggeramlug proggeramlug deleted the fix/fast-test-perpackage branch June 18, 2026 17:21
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