microsoft / microsoft/TypeScript
Composite (-b) projects don't report duplicate compilations
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 4.0.0-dev.20200615
Search Terms: type narrowing composite build project references duplicate compilations
Code
Expected behavior:
As determined in #38406, the above projects are misconfigured so that Wat.tsx is included twice in compilation (https://github.com/microsoft/TypeScript/issues/38406#issuecomment-625546420). There should be some indication that the projects are misconfigured.
Actual behavior:
Mysterious, difficult-to-debug inconsistencies in type narrowing during compile checking coupled with unusually slow builds.
Repository Link:
https://github.com/JoshuaKGoldberg/ts-repro-project-narrowing/tree/5b71a26b336e6b5267d919832e076923dbb38296
Related Issues: #38406
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 with the linked repro's tsconfig.base.json, tsconfig.json, src/a/tsconfig.json, and src/a/Wat.tsx, and compare its duplicate compilation behavior with the discussion in #38406. Trace the composite project-reference compilation and diagnostic entry points that handle repeated source inclusion. Done means the misconfiguration produces a clear indication instead of silent duplicate compilation and inconsistent narrowing.
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
- 45/100