microsoft / microsoft/TypeScript
Build mode handling of emitDeclarationOnly has not been generalized to cover noEmit
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.4k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
Discovered while investigating #45082 - when stack.ts is updated, the rebuild reason (as of fe7962af3d20b0cefb9cf4345923d1adc82d48c7) is Status.OutputMissing because the .js, .js.map, .d.ts, and .d.ts.map files don't exist. The immediate cause is that getAllProjectOutputs is returning too many values, but the fix probably belongs deeper, e.g. in getOutputJSFileName and getEmitDeclarations (which might have unforeseen consequences).
I am not presently aware of a resulting correctness problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/compiler/emitter.ts at getAllProjectOutputs and getOutputJSFileName, then inspect getEmitDeclarations in src/compiler/utilities.ts. Trace how noEmit and emitDeclarationOnly affect expected outputs, and verify that updating stack.ts no longer reports missing outputs when the corresponding files are intentionally not emitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100