fix(release): unify extension archive feature builds - #7952
Conversation
📝 WalkthroughWalkthroughThe release workflow now builds native extensions with ChangesNative extension release build
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/perry/src/commands/compile/well_known.rs (1)
681-714: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy liftAdd an executable integration regression for the reported runtime failure.
This test only reads
.github/workflows/release-packages.ymland checks package-token adjacency. It does not compile an extension, link it with the shipped archives, or run the HTTP accept path. The workflow can satisfy this test while the reactor mismatch remains.Add a
crates/perry/tests/*.rstest that invokesCARGO_BIN_EXE_perryand validates the compile → link → run path with the real runtime archive. Keep this workflow-contract test as a separate fast guard.Based on learnings, Perry regressions that require the
perrybinary and the full compile → link → run path belong incrates/perry/tests/*.rsintegration tests, not only in--libunit tests.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/perry/src/commands/compile/well_known.rs` around lines 681 - 714, Add a separate integration test under crates/perry/tests that invokes CARGO_BIN_EXE_perry and exercises the real compile, link, and run flow against the shipped runtime archive, including the HTTP accept path that exposes the reactor mismatch. Keep release_ext_builds_share_the_shipped_runtime_feature_set as the fast workflow-contract guard, but do not rely on its YAML token checks as the executable regression.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/perry/src/commands/compile/well_known.rs`:
- Around line 681-714: Add a separate integration test under crates/perry/tests
that invokes CARGO_BIN_EXE_perry and exercises the real compile, link, and run
flow against the shipped runtime archive, including the HTTP accept path that
exposes the reactor mismatch. Keep
release_ext_builds_share_the_shipped_runtime_feature_set as the fast
workflow-contract guard, but do not rely on its YAML token checks as the
executable regression.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 29619f4f-6194-4963-a1eb-6b34ea3d374a
📒 Files selected for processing (3)
.github/workflows/release-packages.ymlchangelog.d/7952-ext-feature-union.mdcrates/perry/src/commands/compile/well_known.rs
Closes #7358
What changed
Release packaging now builds every native extension archive in the same Cargo invocation as
perry,perry-runtime-static, andperry-stdlib-static. This gives the extension and the separately shipped runtime/stdlib archives the same resolved feature union.A regression test checks that the release workflow keeps those packages paired.
Root cause
The release workflow built each
perry-ext-*crate alone. Cargo therefore resolved a different runtime/shared-dependency feature set for that archive than for the separately built stdlib/runtime archives. The compiler's archive deduper could not discard the entire duplicate copy, leaving the HTTP accept loop attached to a reactor different from the one driven by the JS event loop.The old no-op dispatch warning was removed by #6574, but that did not fix this feature-resolution mismatch.
Reproduction and verification
Using one compiler/runtime build and changing only how
perry-ext-httpwas built:curlreceived HTTP 200 withpong, and the TypeScript handler loggedrequest received: /.Additional checks:
cargo test -p perry --bin perry commands::compile::well_known::tests::(21 passed)perry-stdlib-staticfrom the workflow made the new test failcargo fmt --all -- --checkactionlint -shellcheck= .github/workflows/release-packages.ymlbash scripts/check_file_size.shgit diff HEAD~1 --checkNo performance benchmark is needed: this changes release build package selection, not generated code or runtime hot paths.
Summary by CodeRabbit
Bug Fixes
Tests