Skip to content

build: fail loudly when the bundled SDK dist is incomplete - #6342

Merged
delchev merged 1 commit into
masterfrom
fix/sdk-dist-completeness-check
Jul 21, 2026
Merged

build: fail loudly when the bundled SDK dist is incomplete#6342
delchev merged 1 commit into
masterfrom
fix/sdk-dist-completeness-check

Conversation

@delchev

@delchev delchev commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

The loud-failure half of #6339: a verify-dist.js completeness check wired into build-source.sh/build-source.ps1 - every SDK module folder under src/ must have produced its dist/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 dist absent → 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/resources to target/generated-resources so concurrent builds cannot race each other's output) stays open on #6339.

🤖 Generated with Claude Code

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>
@delchev
delchev merged commit e3b5758 into master Jul 21, 2026
10 checks passed
@delchev
delchev deleted the fix/sdk-dist-completeness-check branch July 21, 2026 11:15
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