Skip to content

Merge train 185r: #10224 #10226 #10228 #10229 #10230 #10231 #10232 - #10242

Merged
proggeramlug merged 17 commits into
mainfrom
train185r
Sep 14, 2026
Merged

proggeramlug merged 17 commits into
mainfrom
train185r

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Merge train 185r — seven audited PRs cherry-picked onto main (d8bfa28), plus two train commits and the version bump to 0.5.1563.

PR Change Closes
#10224 fix(run): discover bundled cross-target runtime libraries #10209
#10226 fix(string): context-dependent final sigma lowercasing #10116
#10228 fix: count UTF-16 units for inline string length #10191
#10229 fix: preserve fractional keys in dynamic array reads #10190
#10230 fix: read valid fields from wide JSON objects #10175
#10231 fix(hir): namespace classes lowered completely + exported namespace functions are first-class inside the namespace (both commits) #10222
#10232 fix: initialize sloppy block functions at block entry #10079

Train commits:

Local validation (macOS, release, one target pool):

  • scripts/run_lint_gates.sh: 80/83, the same three steps that fail on main; check_thread_locals.py only main's regex/perex_owner.rs; raw-handle bare + --no-raise-vs, holders full + self-test, shape census, fmt, file-size pass.
  • cargo test -p perry-hir / -p perry-codegen / -p perry-runtime (RUST_TEST_THREADS=1): pass, except runtime's known release-only heap_generation::a_free_or_move_outside_every_scope_is_caught_in_debug_builds (red on main since perf(regex): resume JS-level searches on non-ASCII strings from the previous call's position #10205).
  • Integration: namespace_classes, namespace_function_values, issue_10079_script_block_function_hoisting; commands::run::entry unit tests: pass.
  • Full gap suite: only main's regressions (2899_2779_2777_static_helpers, disposablestack_2875, iterator_prototype_next_patch, gc_http2_pending_event_callback_rooting) plus local-host 9574/9592. regex_replace_dyn_regex_with_http failed once because a local cleanup job deleted its in-use auto-optimize dir mid-build; re-run separately: PASS.
  • Namespace-filter parity run: all pass except test_issue_1723_require_stdlib_subnamespace, where Node 26.5.1 itself throws require is not defined in ES module scope (oracle side; Perry's output is unchanged).
  • Per-PR CI attribution against main's baseline logs: identical failing steps/tests/gap sets for every PR (besides the raw-handle lint step fixed above).

Ralph Küpper added 17 commits September 14, 2026 00:35
…ely (#10222)

A class inside a `namespace` block was lowered with `lower_class_decl` and
pushed into the module's class table, and nothing else: it was never
published as a namespace member (`N.C` read `undefined`), its static field
initializers, computed member names, static blocks and legacy decorators
never ran, and a call-expression heritage was never registered
(`RegisterClassParentDynamic`), so `class Service extends
Context.Service<Service, I>()(id) {}` inside a namespace had no parent edge and
`Service.of(x)` threw "of is not a function".

The namespace arm now mirrors the module-level class declaration path:
heritage and computed keys are evaluated first, then static fields/blocks and
decorators in declaration order, and exported classes, functions and
variables are published as namespace members in source order (so
`Object.keys(N)` matches tsc/bun). Namespace-local class names are qualified
internally (`NS.C`) with a scope-local alias, so unrelated namespaces can each
declare the same class name and sibling functions can reference a class that
is declared later; non-exported classes stay usable by sibling functions.

Unblocks OpenCode v1.18.30's runtime bootstrap (`packages/core/src/fs-util.ts`,
`effect-flock.ts`, `ripgrep/binary.ts`), tracker #10107.

Claude-Session: https://claude.ai/code/session_01As1fetJAqDFib4n7Wm5Suo
(cherry picked from commit 2e69ca5)
…espace (#10222)

Inside a namespace body an exported function is emitted as a static method
of the namespace class, not as a module function. Calls were already
redirected to `StaticMethodCall`, but a VALUE reference (`const f = g`,
`call(g)`, `Effect.gen(g)`) still lowered to `FuncRef(id)` — a closure over
a function that has no module-function body — and calling it returned
garbage (`0`, `undefined`, `(number).next is not a function`). The identifier
now lowers to the published namespace member, exactly as `NS.g` resolves
from outside, which also keeps `g === NS.g`.

This was the wall right after the namespace-class fix in OpenCode's
`AppRuntime` bootstrap (`next is not a function`).

Claude-Session: https://claude.ai/code/session_01As1fetJAqDFib4n7Wm5Suo
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