test(library): vendor the introspector's own test suite - #30
Draft
TomChv wants to merge 1 commit into
Draft
Conversation
Vendoring the library left its tests behind, so library/src had nothing verifying it. The introspector's suite is the part that matters here: it scans the fixture modules under testdata and compares against a recorded expectation, which is the contract entrypoint generation rests on. Our own golden pins the renderer given a typedef; nothing pinned the typedef given a module. 46 tests, run in the same bun container that builds the bundle. The specs needing a live session (invoke, registry, api, connect) are left out: they would need an engine inside the test container, and they cover the library's runtime rather than anything this SDK generates. Adding the test dependencies exposed that the build was not as reproducible as claimed. A rebuild from an unchanged tree quietly gained transitive modules — yarn.lock is a yarn v1 file that does not pin everything bun resolves. Both lockfiles now sit in the tree and neither is redundant: dropping yarn.lock pulls newer transitives and grows core.js by a quarter, while bun.lock pins what bun actually installs. The install is frozen against it, so drift fails the install instead of silently changing the bundle. Signed-off-by: Tom Chauveau <tom@dagger.io>
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.
Vendoring the library left its tests behind, so library/src had nothing
verifying it. The introspector's suite is the part that matters here: it scans
the fixture modules under testdata and compares against a recorded expectation,
which is the contract entrypoint generation rests on. Our own golden pins the
renderer given a typedef; nothing pinned the typedef given a module.
46 tests, run in the same bun container that builds the bundle.
The specs needing a live session (invoke, registry, api, connect) are left out:
they would need an engine inside the test container, and they cover the
library's runtime rather than anything this SDK generates.
Adding the test dependencies exposed that the build was not as reproducible as
claimed. A rebuild from an unchanged tree quietly gained transitive modules —
yarn.lock is a yarn v1 file that does not pin everything bun resolves. Both
lockfiles now sit in the tree and neither is redundant: dropping yarn.lock pulls
newer transitives and grows core.js by a quarter, while bun.lock pins what bun
actually installs. The install is frozen against it, so drift fails the install
instead of silently changing the bundle.
Signed-off-by: Tom Chauveau tom@dagger.io
Stack created with GitHub Stacks CLI • Give Feedback 💬