Skip to content

Nest 3/4: compile hello-nest ahead of time - #8

Draft
puskuruk wants to merge 7 commits into
nest/platform-node-vendorfrom
nest/aot-hello-nest
Draft

puskuruk wants to merge 7 commits into
nest/platform-node-vendorfrom
nest/aot-hello-nest

Conversation

@puskuruk

@puskuruk puskuruk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

apps/hello-nest (a decorated controller on NodeAdapter, @nestjs/core 12.5.1 from npm) compiles with geatsc. tools/nest/aot resolves @Module, @Controller, @Injectable and the route decorators with the TypeScript checker into a generated module function; scripts/build.mjs runs it as a compiler source-transform plugin, and reflect-metadata and the three @nestjs packages map to typed shims the generated application drives.

The app was added on 12.1.3; a commit moves it to 12.2.0 and ports that release's adapter exception mapping into the core shim (an http-errors style client error, such as the body parser's or URI too long, becomes an HttpException with its status and message; a 5xx one stays an unknown exception), and the last installs the 12.5.1 packages from npm.

  • 11e7b0d Add tools/nest/aot: resolve @module, @controller, @Injectable and the route decorators with the checker into a generated module function
  • 2168860 Map reflect-metadata and @nestjs/common, core and platform-node to typed shims the AOT-generated application drives
  • cb88c8d Rewrite a Nest entry through the AOT resolver as a compiler source-transform plugin in build.mjs
  • e8d2898 Add hello-nest on NodeAdapter with platform-node 12.1.3
  • d81f914 Add scripts/test-hello-nest.mjs comparing the compiled hello-nest against its Node oracle over eleven requests
  • c5ca89b Move hello-nest to platform-node 12.2.0 and map client http-errors as the adapter does
  • 7ddae25 Install hello-nest's @nestjs packages from npm 12.5.1

Builds only with compiler fixes no release carries yet: geastack/compiler#21, geastack/compiler#28, geastack/compiler#29, geastack/compiler#30, geastack/compiler#31 and geastack/compiler#33 (on main 1ae87837 / 1.0.61). Main alone refuses hello-nest at instanceof Date (#28) and does not compile apps/hono-hello (#33, a regression since 1.0.47). The package.json floor moves on #4 once they are released.

Verification on 7ddae25 with main + those PRs, macOS arm64: node scripts/test-hello-nest.mjs → HELLO_NEST_PARITY: 11 of 11 identical; tools/nest check 24 tables; node --test scripts/test-package.mjs 6 pass.

Related

Stack: #6 (1/4, shims) → #7 (2/4, vendor) → this PR → #9 (4/4, benchmark).

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@puskuruk

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from be6383d to beb3f1d Compare October 20, 2026 04:33
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from 714d794 to f6c7b52 Compare October 20, 2026 04:33
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from beb3f1d to aeb89ff Compare October 23, 2026 01:48
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from f6c7b52 to 00d3cba Compare October 23, 2026 01:48
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from aeb89ff to 6dbe313 Compare October 23, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch 2 times, most recently from 2663870 to df1a705 Compare October 25, 2026 16:20
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 2c9b517 to 73f5599 Compare November 10, 2026 10:57
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch 2 times, most recently from 3d91d0c to e85f57d Compare November 12, 2026 08:50
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from 233a8e7 to 8c7c7a7 Compare November 12, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from e85f57d to 4195fae Compare November 12, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 8c7c7a7 to c33d325 Compare November 20, 2026 22:26
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch 2 times, most recently from 08418b9 to 7ddae25 Compare November 21, 2026 03:29
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from c33d325 to 49225bc Compare November 21, 2026 03:29
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 49225bc to a683a2d Compare November 21, 2026 10:18
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from 7ddae25 to 9da80ba Compare November 21, 2026 10:18
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from a683a2d to c8f3bb9 Compare November 21, 2026 11:09
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from 9da80ba to d973afd Compare November 21, 2026 11:09
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from c8f3bb9 to 04c8eeb Compare November 21, 2026 11:50
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from d973afd to 04b4d2f Compare November 21, 2026 11:50
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 04c8eeb to e30d2a2 Compare November 21, 2026 12:57
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from 04b4d2f to 45f6379 Compare November 21, 2026 12:57
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from e30d2a2 to 79691c6 Compare November 21, 2026 13:54
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch 2 times, most recently from 62da4d2 to 4bb7964 Compare November 21, 2026 14:34
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from 90fa814 to 08c6c80 Compare November 21, 2026 17:30
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch 2 times, most recently from 01af736 to fc6ecd3 Compare November 21, 2026 19:00
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from 2f08506 to 67cac29 Compare November 21, 2026 19:55
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from fc6ecd3 to 45e9256 Compare November 21, 2026 19:55
… route decorators with the checker into a generated module function
…ped shims the AOT-generated application drives
… the adapter does

hello-nest depends on the 12.2.0 tarballs the pinned builder now packs.

The core shim follows 12.2.0's NodeAdapter exception mapping: an
http-errors style client error (body parser, URI too long) becomes an
HttpException with its status and message (the status text when it must
not be exposed); a 5xx one stays unmapped and is answered as an unknown
exception.
The vendored platform-node is at 12.5.1 (085f83a16), and @nestjs/{common,core,platform-node} 12.5.1 are on the registry, so hello-nest pins them there instead of the 12.2.0 tarballs.
@puskuruk
puskuruk force-pushed the nest/aot-hello-nest branch from 45e9256 to 3b32156 Compare November 21, 2026 20:33
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 67cac29 to 23cb6ce Compare November 21, 2026 20:33
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