fix: eliminate parallel build races that can produce empty output dirs - #116
Merged
dprevost-LMI merged 2 commits intoSep 23, 2026
Merged
Conversation
- build: run-p clean compile -> run-s: rimraf and tsc wrote to the same packages/*/build dirs concurrently, so a slow filesystem could let clean delete output tsc had just emitted for one package. - cddl2ts cli-examples: run-p cli-examples:* -> run-s: local/remote each independently run the full `pnpm -w run compile`, so running them in parallel meant two concurrent tsc invocations writing to the same build output at once. This class of race is the likely cause of cddl2ts@0.11.0 publishing to npm without its build/ directory, breaking both the package's main export and its CLI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Per review feedback on PR webdriverio#116: run-s avoided the concurrent-write race but each leaf script still ran the full `pnpm -w run compile` independently, compiling the workspace twice in a row. Hoist the compile into the parent script so it runs once before both generators. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dprevost-LMI
added a commit
that referenced
this pull request
Sep 23, 2026
cddl2ts was the only workspace package without a "files" allowlist, so npm/pnpm fell back to gitignore-based inclusion for publishing - and the root .gitignore excludes build/. Every sibling package (cddl, cddl2java, cddl2py, cddl2swift, cddl2kotlin) already has "files": ["build", "bin"]; cddl2ts never did, in its entire release history. This is the actual cause of cddl2ts@0.11.0 and 0.12.0 publishing without their build/ output - unrelated to the run-p/run-s race fix in #116, which was a real but separate issue. Verified in a clean worktree: with build/ compiled but no files field, `pnpm pack --dry-run` excluded build/ entirely; adding the field fixes it. Co-authored-by: Claude Sonnet 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.
pnpm -w run compile, so running them in parallel meant two concurrent tsc invocations writing to the same build output at once.This class of race is the likely cause of cddl2ts@0.11.0 publishing to npm without its build/ directory, breaking both the package's main export and its CLI.