fix(ci): build compile-smoke's ext wrappers with the stdlib archive - #9290
Conversation
compile-smoke failed on the release candidate with one compile error out of
1348:
test_issue_414_mysql_query_params
Error: the wrapper archive(s) below bundle a DIFFERENT tokio compilation
than the stdlib archive they would be linked with
libperry_stdlib.a bundles tokio-e69c74b77ea3bbaf
libperry_ext_mysql2.a bundles tokio-aa3a849219b7b42b
The job named only perry, perry-runtime, perry-stdlib and the two -static
wrappers, so perry-ext-mysql2 came from a different cargo invocation with its
own tokio unification. The guard is right to refuse: two tokio compilations in
one binary give two runtime::context::CONTEXT thread-locals, and perry-stdlib's
runtime then reports 'there is no reactor running' (#507, #7629).
Name the ext wrappers in the same invocation, matching what the doc-tests job
already does.
0cff369 to
bf1d62e
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe compile-smoke workflow now builds five extension wrapper crates with the stdlib archive in one Cargo invocation. A changelog entry documents the change and the related Tokio runtime issue. ChangesCompile-smoke extension build
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change updates the compile-smoke build to compile extension wrappers with the standard library archive, preventing a known CI configuration failure. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) Full details: Description checkExplanation The description gives strong technical context and explains the cause and fix, but it does not follow the required template. It omits the Summary, Changes, Related issue, Test plan, Screenshots / output, and Checklist sections.
✨ Finishing Touches🧪 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 |
|
Merged. The diagnosis is right and it's a trap I've hit from the other side: cargo unifies features per invocation, so building the ext wrappers separately from the stdlib archive gives each its own tokio compilation — two Verified the specifics rather than the description:
The comment naming #507 and #7629 and the concrete symptom ( Worth noting alongside the "masked for weeks by |
compile-smokefailed on release candidate83754818eawith one compile error out of 1348 (1347 passed, 67 skipped):This is a job-configuration bug, not a product bug — and the guard is doing its job. Two tokio compilations in one binary mean two independent
runtime::context::CONTEXTthread-locals, and perry-stdlib's runtime then reportsthere is no reactor running, must be called from the context of a Tokio 1.x runtime(#507, #7629). Refusing the link is the correct outcome; the mistake is upstream.The job named only
perry,perry-runtime,perry-stdliband the two-staticwrappers, soperry-ext-mysql2was built by a separate invocation with its own feature unification. The fix names the ext wrappers in the samecargo build, which is what makes cargo unify tokio across them — exactly what thedoc-testsjob already does (-p perry-ext-ioredis -p perry-ext-mongodb -p perry-ext-mysql2 -p perry-ext-pg -p perry-ext-nodemailer). This adopts that same set rather than onlymysql2, since any of them can hit the same class.Why this went unnoticed
compile-smokewas cancelled on every prior release candidate, so this is the first verdict it has produced. It was one of six jobs with no result on any candidate; two have now reported and both were configuration issues rather than product defects (the other,parity (10), was a stale suppression — #9286).The error message deserves credit: it names both tokio hashes, explains the runtime consequence, and prints the exact fix. That is what made this a five-minute diagnosis.
Summary by CodeRabbit
Bug Fixes
Documentation