Commit Graph
29 Commits
Author SHA1 Message Date
Malte Ubl f43332a0b6 Merge remote-tracking branch 'origin/ni/i10-js-island-requires' into ni/i11-cross-heap-gc 2026-10-27 19:07:22 -07:00
Malte UblandClaude Opus 5.5 d06155048e Only bare binding getters are pure; compare getter exports for mutation
A member read in an export getter (a.b or a[b]) can invoke another
accessor that runs code on every read, so the recorder now accepts only a
bare identifier as a plain binding getter. Everything else keeps its
runtime read and is not snapshotted.

The mutation check that makes an earlier island module eager copied only
data properties of a module value, so an object exported through a
binding getter could stay stale when a later load changed it. The shape
now reads binding getters the same way the snapshot does, and compares
them by reading again, so those modules no longer defer.

Corpus fixtures pin both: a getter that reads a member counts every read,
and a later load that mutates a getter-exported object keeps both modules
eager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:06:41 -07:00
Malte Ubl f29a780112 Merge remote-tracking branch 'origin/ni/i10-js-island-requires' into HEAD 2026-10-26 16:39:53 -07:00
Malte Ubl 3f696a8a79 Merge remote-tracking branch 'origin/ni/i8-exit' into HEAD 2026-10-26 16:39:06 -07:00
Malte Ubl e274620b81 Merge remote-tracking branch 'origin/ni/i7-routing' into HEAD 2026-10-26 16:38:44 -07:00
Malte Ubl 22a88838bc Merge remote-tracking branch 'origin/ni/i6-subclasses' into HEAD 2026-10-26 16:38:10 -07:00
Malte Ubl 55e7cc20db Have orderkit require its part when it loads
Main resolves computed createRequire specifiers at run time, so a computed
require inside a function no longer makes an island; one in module code
still does.
2026-10-26 16:35:52 -07:00
Malte Ubl 3bfe3f7c85 Merge base branch 2026-10-26 05:35:29 -07:00
Malte Ubl 55b20ab200 Merge base branch 2026-10-26 05:35:23 -07:00
Malte Ubl 80b5fdeb54 Merge base branch 2026-10-26 05:35:21 -07:00
Malte Ubl ffff3bfc19 Merge base branch
# Conflicts:
#	tests/harness/node-island.test.ts
2026-10-26 05:35:15 -07:00
Malte UblandClaude Opus 5.5 91b437c090 Keep path-mapped island declarations out of the module graph
A re-export from an island package that tsconfig `paths` maps to its
installed directory pushed the package's declaration file into the module
order, so the lowering compiled the declarations' own imports (SC2013 in
the package's .d.mts). Such a re-export now adds no module edge; the
lowering reports the island boundary as for any island re-export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 05:34:47 -07:00
Chris Tate fade126bb5 Merge ni/i10-js-island-requires and fix live-handle tracing 2026-10-26 05:18:31 -05:00
Malte Ubl 92a4b39ef6 Merge base branch 2026-10-25 18:38:31 -07:00
Malte Ubl 8cde53d7cf Merge base branch 2026-10-25 18:38:30 -07:00
Malte Ubl 68eda2ec95 Merge base branch 2026-10-25 18:38:30 -07:00
Malte UblandClaude Opus 5.5 7687cf2d26 Type island packages from their declarations in failed builds and generics
When a native build failed and the packages it compiled with runtime fences
then failed as islands too, the native build's diagnostics were reported.
That build types those packages from their JavaScript, where declared-only
types (interfaces, `Static<T>`-style aliases) are `any`, so typed user code
reported cascades the island build does not have (a schema library's `TSchema`).
The island build's errors are reported instead.

In a generic function instance over island types (`<T extends TSchema>`),
a `T` value bound to dyn now crosses into the island the way `any` does,
instead of being refused as a native object.

Corpus 6829 types user code with an island package's interfaces, generic
aliases and a generic function; node-island.test.ts pins the reported
diagnostics of a failed build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:38:29 -07:00
Chris Tate fce38bcbcf Merge base branch and fix 2026-10-25 07:35:31 -05:00
Chris Tate 4f07fbd66f Merge base branch and fix 2026-10-25 07:22:16 -05:00
Chris Tate 5cfcc8fb51 Merge base branch and fix 2026-10-25 07:18:13 -05:00
Chris Tate 0f7fd1bdb6 Merge base and fix 2026-10-25 02:27:42 -05:00
Chris Tate f3750ef976 Merge base and fix 2026-10-25 02:16:24 -05:00
Chris Tate c0e24cdb3f Embed island modules, bound V8's stack scan in-thread, and keep Node's environment out 2026-10-23 12:52:57 -05:00
Chris Tate fe452bdb03 Merge main and harden the Node island loader 2026-10-23 11:04:36 -05:00
Malte UblandClaude Opus 5.5 d646fa70d0 Collect garbage cycles across the scriptc and V8 heaps (NI-8)
Node islands stack, part 11 of 11 (scriptc-perf/results/islands-prs/PLAN.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:49:56 -07:00
Malte UblandClaude Opus 5.5 55a69232b7 Exit cleanly with Node loaded and keep nested entries on Node's stack (NI-7c, NI-3b)
Node islands stack, part 8 of 11 (scriptc-perf/results/islands-prs/PLAN.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:49:55 -07:00
Malte UblandClaude Opus 5.5 a1b6fda11c Run npm packages in Node islands: object handles and compiler routing (NI-4)
Node islands stack, part 2 of 11 (scriptc-perf/results/islands-prs/PLAN.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:49:52 -07:00
Chris Tate 33110f1938 Track unions in nonJsonPart and expect per-platform lifecycle output 2026-10-21 12:08:57 -05:00
Malte UblandClaude Opus 5.5 51e9812493 Call into Node.js from compiled programs with @scriptc/node
Scope-B milestone NI-1, API side: the explicit call API that replaces the
build container's hand-written node subprocess (api patch 09).

- The new package @scriptc/node exports callSync(specifier, name, ...args)
  and call(...). The module loads with require() from the calling module;
  arguments and results cross as JSON copies; a thrown Error crosses as its
  nearest intrinsic class with its message and string code, other thrown
  values as JSON copies; callSync refuses a function that returns a
  promise. Its Node implementation runs the calls in-process with the same
  copies, so a program prints the same under Node and compiled.
- The compiler lowers calls to the named or namespace imports
  (node-api-import.ts, lower-node-island.ts) to the nodeIsland.callSync
  and nodeIsland.call libCalls: the calling module's real path, the
  specifier, the export name and the boxed argument array, with the result
  checked against the declared type like `JSON.parse(s) as T`. Arguments
  and results whose types are not JSON data are refused at build time, and
  the functions and the namespace refuse as values.
- Corpus programs 6800-6803 (sync and async results, errors, process.exit
  from Node with the program's exit listeners, Node's pending timers
  keeping the program alive) run under Node and as binaries that load
  libnode; `// @requires-libnode` skips them where SCRIPTC_LIBNODE names no
  pack (until the pack CI matrix publishes packs). The node-island harness
  covers loading Node only on the first call, the beside packaging, a
  missing pack, a pack of another Node version or bridge ABI, and the
  executable's symbols.
- Release tooling publishes @scriptc/node with the other packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 09:59:55 -07:00