fix(vscode): skip redundant tsc build in prepackage to prevent TS5055#4401
Conversation
📋 Review SummaryThis PR fixes the TS5055 error ("Cannot write file '...dist/index.d.ts' because it would overwrite input file") that occurs in the VSCode IDE companion release workflow. The fix adds a 🔍 General Feedback
🎯 Specific Feedback🔵 Low
✅ Highlights
📝 Additional NotesThe PR description mentions The fix is ready to merge pending verification that the VSCode IDE companion release workflow passes. |
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
5851922 to
ecb8c3b
Compare
The prepackage script called `npm run build` (full tsc compilation of all workspace packages) before bundling. This second tsc pass fails with TS5055 in CI because: 1. `npm ci` already built everything via the `prepare` lifecycle 2. `release:version` bumps package versions, making tsbuildinfo stale 3. The redundant `npm run build` triggers tsc --build which attempts a full rebuild, but composite project references cause dist/*.d.ts to be resolved as input files → TS5055 The fix removes the redundant `npm run build` call. The CLI bundle is produced by esbuild directly from TypeScript source files (entry: packages/cli/index.ts), so compiled dist/ artifacts are not needed. Root cause introduced by #4295 (composite project references).
7b2ebbb to
32f718e
Compare
Summary
The VSCode IDE companion release workflow fails with TS5055 during the Prepare VSCode Extension step.
Root cause: prepackage.js called
npm run build(fulltsc --buildon all workspace packages) after the version bump had already made tsbuildinfo stale. With composite project references (introduced in #4295),tsc --buildresolves existingdist/*.d.tsfiles as input, triggering TS5055.Fix: Remove the redundant
npm run buildcall from prepackage.js. The CLI bundle is produced by esbuild directly from TypeScript source (packages/cli/index.ts), so compiled dist/ artifacts are not needed.Combined with #4383 (which fixed the version.js path), this eliminates all scenarios where
tsc --buildruns on stale state during the release workflow.Test plan