microsoft / microsoft/TypeScript
Computing buildInfoTime even when !isIncremental
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
@sheetalkamat @johnnyreilly I'm out of my depth, but I think there's maybe a bug introduced here.
I'm getting
TypeError: Cannot read properties of undefined (reading 'includes')in fork-ts-checker-webpack-plugin when my project is NOTincremental: true.Prior to this revision
buildInfoTimewas not computed ifbuildInfoPathwasundefinedbut after this change, even thoughbuildInfoPathis undefined, it is still attempting to computets_getModifiedTime(host, buildInfoPath)Eventually, this calls to
isArtifact(undefined)in fork-ts-checker-webpack-plugin\lib\typescript\worker\lib\system.js[function isArtifact(path) {
return ((artifacts.dirs.some((dir) => path.includes(dir)) || artifacts.files.some((file) => path === file)) && artifacts.extensions.some((extension) => path.endsWith(extension)));Perhaps this needs to be handled in fork-ts-checker-webpack-plugin? But it seems to me that perhaps
buildInfoTimecould be skipped whenbuildInfoPathis unavailable.
Originally posted by @JasonKleban in dca9182
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 dca9182 revision and the compiler path that computes ts_getModifiedTime when buildInfoPath is unavailable. Then inspect fork-ts-checker-webpack-plugin/src/typescript/worker/lib/system.ts, especially isArtifact(path). The issue is resolved when a non-incremental project no longer passes an undefined build-info path into that handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100