Repository navigation
Conversation
TomChv
force-pushed
the
feat/packager-introspector
branch
from
August 21, 2026 12:11
5b9e4e1 to
09abdd7
Compare
TomChv
force-pushed
the
feat/packager-introspector
branch
from
August 25, 2026 16:06
09abdd7 to
0bd79a0
Compare
TomChv
marked this pull request as ready for review
August 25, 2026 16:15
eunomie
approved these changes
Aug 26, 2026
TomChv
force-pushed
the
feat/packager-introspector
branch
from
August 28, 2026 11:24
0bd79a0 to
9f5d39e
Compare
TomChv
force-pushed
the
feat/packager-introspector
branch
from
August 28, 2026 12:26
9f5d39e to
4d9844b
Compare
Entrypoint generation scans a module's TypeScript with the compiler API, so the scanner and the compiler have to come from somewhere. The engine ships both in its image; we build the scanner from the vendored source and let codegen install the compiler. The scanner is a plain `bun build`, not the `--compile`d binary the engine ships: that is ~100MB and per-platform, where this is portable JS. The compiler is not shipped with it. It is a build-time dependency of the scanner, not something a user's module consumes: the scanner calls the API of the version the vendored library locks (6.0.3), while a module declares 5.9.3 for its own runtime. Carrying 9.1MB of third-party blob in git, re-committed on every engine bump, to serve one exec is the wrong trade — codegen installs it, pinned, so the layer is content-addressed on the version alone and shared across every module's generate. The version is derived rather than hand-written: the packager reads it off the resolved install into bundle/typescript-version.txt, so re-vendoring cannot silently move the scanner onto a compiler API it was not written against. Verified before anything depends on it: with the compiler installed from that pin, the bundled scanner runs over a fixture module and emits a typedef.json carrying the per-declaration source locations the entrypoint renderer consumes. index.ts and telemetry.ts join it — the module-facing wrappers that make sdk/ resolvable as @dagger.io/dagger. They are taken from the v1.0.0-beta.9 tag, not from upstream's working tree, which re-exports an `agent` symbol this engine's core.js does not have; every name they re-export is checked against the bundle. The bundle costs ~9.5MB committed, and everything in it is built from the vendored source. The cost is a registry fetch on a cold cache; committing the compiler instead is one line if offline generation ever matters. Signed-off-by: Tom Chauveau <[email protected]>
TomChv
force-pushed
the
feat/packager-introspector
branch
from
August 28, 2026 13:17
4d9844b to
2ec9f38
Compare
Member
Author
|
Superseded by #39, which squashes this whole stack into a single PR off The stack had PRs overwriting each other — this one included — which made the intermediate states hard to reason about, and thirteen PRs each fanning out a full check suite made CI unreadable. Branch is left pushed, so nothing here is lost. |
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.
Entrypoint generation scans a module's TypeScript with the compiler API, so the
scanner and the compiler have to come from somewhere. The engine ships both in
its image; we build the scanner from the vendored source and carry the compiler
next to it.
The scanner is a plain
bun build, not the--compiled binary the engineships: that is ~100MB and per-platform, where this is portable JS. The compiler
stays external to it and is trimmed to package.json + lib/typescript.js, which
resolves because TypeScript 6 declares no exports map and points main straight
at that file.
Verified before anything depends on it: with the compiler mounted at
node_modules/typescript, the bundled scanner runs over a fixture module and
emits a typedef.json carrying the per-declaration source locations the
entrypoint renderer consumes.
index.ts and telemetry.ts join them — the module-facing wrappers that make sdk/
resolvable as @dagger.io/dagger. They are taken from the v1.0.0-beta.9 tag, not
from upstream's working tree, which re-exports an
agentsymbol this engine'score.js does not have; every name they re-export is checked against the bundle.
The bundle now costs ~18MB committed, over half of it the compiler.
Signed-off-by: Tom Chauveau [email protected]
Stack created with GitHub Stacks CLI • Give Feedback 💬