build: fail loudly when the bundled SDK dist is incomplete - #6342
Merged
Conversation
A post-bundling completeness check (verify-dist.js, wired into build-source.sh and build-source.ps1): every SDK module folder under src/ with an index.ts must have produced dist/esm/<module>/index.mjs and dist/cjs/<module>/index.js, else the BUILD fails listing exactly what is missing. Without it a truncated dist - e.g. from a concurrent build mutating the same checkout while this module's esbuild pass runs (the output lives in src/main/resources, shared mutable state) - ships silently inside the jar, every '@aerokit/sdk/*' import fails, and the whole JS layer 500s at runtime with a cryptic 'Could not resolve indirect export entry', far from the cause. The check converts that multi-hour runtime mystery into a one-line build error. Verified both ways: with dist absent the script exits 1 listing 58 missing outputs; the real Maven build reports 'verify-dist: OK - 29 SDK modules'. Fixes #6339 (the loud-failure half; moving the bundling output out of src/ remains open as the structural follow-up). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The loud-failure half of #6339: a
verify-dist.jscompleteness check wired intobuild-source.sh/build-source.ps1- every SDK module folder undersrc/must have produced itsdist/esm/<module>/index.mjs+dist/cjs/<module>/index.js, else the build fails listing exactly what is missing (and pointing at the concurrent-build cause).Verified both ways: with
distabsent → exit 1 listing 58 missing outputs; the real Maven build →verify-dist: OK - 29 SDK modules present.The structural half (moving the bundling output from
src/main/resourcestotarget/generated-resourcesso concurrent builds cannot race each other's output) stays open on #6339.🤖 Generated with Claude Code