chore: merge train 245 (v0.5.1624) - #10845
Merged
Merged
Conversation
added 5 commits
September 21, 2026 00:50
…#10677) Squashed rebase of #10677 onto main. Generated/absolute-count files (Cargo.lock, docs/api/perry.d.ts, docs/src/api/reference.md, scripts/native_result_ledger.py, scripts/string_payload_access_baseline.txt, scripts/unrooted_local_shape_baseline.json, workspace-architecture.json) are left at main's values here and regenerated from their owning scripts in a later commit (#10739).
Squashed rebase of #10680 on top of #10677. Generated/absolute-count files are left at main's values here and regenerated from their owning scripts in a later commit (#10739). Non-obvious conflict call: #10680's side of crates/perry-hir/src/lower/expr_call/native_module.rs still contained native_module_member_path(), which main deleted with the node-forge binding. Taking 'theirs' would have resurrected it as dead code, so the whole hunk resolves to empty.
#10677 deleted perry-ext-pg and perry-stdlib/src/pg but left the call sites that reference their symbols: - lower_call/builtin.rs still lowered `new Client(cfg)`/`new Pool(cfg)` from an `import ... from "pg"` to `js_pg_client_new`/`js_pg_pool_new`. With no provider those are undefined at link time, which is exactly the failure the real `pg` package would hit (it constructs `new Client`). Dropped the two arms and the `"Client" | "Pool" => Some(&["pg"])" import gate together, so a user-defined Pool/Client falls through to the generic path (#536). - runtime_decls/stdlib_ffi/data_stores.rs declared the ten js_pg_* externs. - perry-ui-android/src/stdlib_stubs.rs defined seven js_pg_* stubs (#10680 had already dropped the matching mysql2 ones). - perry-codegen-js browser-emit list and a native_table/mod.rs comment. - scripts/run_doc_tests.sh / .ps1 still passed -p perry-ext-pg to cargo build, which no longer resolves.
…ysql2 removal that is now 28 commits behind `main`, so neither side's numbers could be merged (#10739). Every count below is what the owning script reports on this resolved tree — none of it is arithmetic on the two PRs' figures: Cargo.lock cargo metadata --offline (drops perry-ext-pg, perry-ext-mysql2 and, via sqlx's mysql-rsa edge, rsa/pkcs1/ crypto-primes) workspace-architecture.json scripts/workspace_architecture.py --check --print-summary: members 66 -> 64, externalize 17 -> 15 (keep/merge/remove/ review unchanged). The two `crates` policy entries are deleted; the script errors on a policy entry with no workspace crate. native_result_ledger.py/.tsv scripts/native_result_ledger.py: 349 -> 314 rows, 300 -> 279 providers. Both PRs landed on 349/300 for unrelated reasons, so the textual auto-merge agreed and was wrong. unrooted_local_shape_baseline scripts/unrooted_local_shape.py --update-baseline: total 527 -> 428. string_payload_access_baseline scripts/string_payload_access_inventory.py --write-baseline: perry-stdlib 36 -> 28, the perry-ext-pg/mysql2 rows dropped. docs/src/api/reference.md target/<profile>/perry --print-api-manifest docs/api/perry.d.ts (run directly: regen_api_docs.sh hardcodes <worktree>/target/release/perry and silently truncates both files when that path is absent). 2870 -> 2829 entries across 120 -> 117 modules, which is exactly the 41 manifest rows (9 pg + 32 mysql2) and 3 specifiers removed; tails intact. Also folded in here: a stray `}` left in perry-hir's native_module.rs by the conflict markers), the changelog fragments corrected to the results actually measured on this branch, and a `pg` entry in governance.md's "Completed source migrations" list to match the one #10680 added for mysql2.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (52)
✨ 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 |
This was referenced Sep 20, 2026
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.
Merge train 245 — the combined
pg+mysql2native-binding removal. −6,705 lines. Released as v0.5.1624.Contents
chore(pg): remove the native pg binding, compile the real package from sourcerefactor(stdlib): remove the mysql2 native bindingWhy these two together, and not one at a time
#10678's hazard is only closed by removing both. Each binding existed twice —
crates/perry-ext-pg(sqlx + tokio overperry-ffi) and the pre-#466 in-tree implementation incrates/perry-stdlib/src/pg/, kept alive behind abundled-pgfeature since before the migration. Both defined the sameextern "C"symbols (js_pg_client_new,js_pg_client_query, …), and whichever won the link order silently shadowed the other. That is not a link error; it is a choice made by command-line ordering that nothing reported.Removing one binding leaves the other's pair intact. Landing them as one tree is what makes the duplicate-symbol claim true rather than half-true.
import ... from "pg"no longer resolves as a native module at all. It compiles the real npm package from source, withpgand its 13 transitive deps picked up by the compile-package wildcard — andmysql2likewise, including thegenerate-functionrow-parser factory handled at runtime viadyn_eval.Also removed: the
[bindings.pg]/[bindings.mysql2]entries, theNATIVE_MODULESrows and api-manifest entries, theNativeModSigdispatch rows inlower_call/native_table/databases.rs, thestdlib_features.rs/optimized_libsfeature-gate arms, thebundled-*/database-postgresCargo features, the now-unreachablesqlx"postgres"feature, and theworkspace-architecture.jsonentries.One consequence worth naming: dropping the
"Client" | "Pool" => Some(&["pg"])import gate leaves a user-definedPool/Clienton the generic path — which is what #536 wanted anyway.Verified against live servers
Both fragments carry end-to-end evidence, and both are stronger than the source PRs' own:
pg@8.22.0as the only dependency of a throwaway fixture. (chore(pg): remove native pg binding, compile real package from source #10677's own note said "No live Postgres was available to test a real query round-trip.")CREATE TABLE/INSERT/SELECT/DROP TABLEround trip through the realmysql2package with noperry.compilePackagesentry at all — the default automatic package-routing path. (refactor(stdlib): remove mysql2 native binding #10680's own note said 8.0.46.)Rebase: the Cargo.lock was regenerated, not hand-merged
The rebase onto v0.5.1623 conflicted in
Cargo.lock. A hand-merged lock for a change that deletes two crates and their transitive dependency trees is a guess; this tookmain's lock and let cargo reconcile it against this tree's manifests, then asserted the result:cargo metadata --offline --lockedexits 0, no conflict markers, and noperry-ext-{pg,mysql2}/postgres/mysql_*entries remain.Absolute counts re-derived against the new base, not carried
Removal counts are chained absolutes — a baseline re-derived against yesterday's
mainis wrong against today's. All eight ratchets were re-run on the rebased tree:native_result_ledger,gc_runtime_root_holders,shape_descriptor_census,check_file_size,addr_class_inventory,raw_handle_debt,unrooted_local_shape,string_payload_access_inventory— every one green.binding_governance --checkwas then checked for discrimination rather than assumed live: rc=0 on this tree, and rc=1 on main'sworkspace-architecture.jsonwithworkspace_architecture.py, incidentally, passes on both — it is a reporter, not the gate. Running it and reading its exit code would have proved nothing.Representation, checked on the part where the sibling cannot confound it
A naive whole-PR representation check reports ~1,000 "missing" insertions per PR here, because each PR is stale relative to the union: #10677 alone keeps mysql2, #10680 alone keeps pg. Checking each PR against only its exclusive, non-changelog files removes that confound:
pgreference the sibling half removes (the"fastify" | "ws" | "pg" | …dispatch arm, the sevenjs_pg_*android stubs,-p perry-ext-pgin the doc-tests script).The remaining flagged lines are changelog prose the combined re-derive commit rewrote, with the stronger evidence quoted above.
Validation
Source heads asserted fresh against the assembly record before spending the cycle; no attribution trailers on any of the five commits. Ten cheap gates,
cargo check --workspace --all-targetsunder-D warnings, all five pinned artifacts byte-identical before and after the gap sweep.lintcomplete at 6-of-6 compile commands,lint_unexpected_failures=[]live=[] deleted=[]— verified correct rather than assumed: neither deleted crate had atests/*.rs, and the train touches no integration test file at all, so the empty stamp is a real answer and not a broken derivationcor_native-region-proof/cor_native-abi-proofboth rc=0,failed_workloads=[]— no transient excusedrepsel_census rc=0 wasted_promotion=Falsesecurity_audit: the single tracked RUSTSEC-2026-0285 (security: cargo audit fails on RUSTSEC-2026-0285 (rustls 0.23.44) — the fix is unblocked by the soak window on 2026-09-21 #10791), nothing elseGap sweep at
PERRY_RUN_TIMEOUT=30over the module-resolution surface this removal movespg/mysql2onto, plusclassas an unrelated control. 140 fixtures, every area asserted live, zero unexplained regressions: