Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computing buildInfoTime even when !isIncremental #60500

Open
JasonKleban opened this issue Nov 14, 2024 · 0 comments
Open

Computing buildInfoTime even when !isIncremental #60500

JasonKleban opened this issue Nov 14, 2024 · 0 comments
Labels
Help Wanted You can do this Possible Improvement The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone

Comments

@JasonKleban
Copy link

@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 NOT incremental: true.

Prior to this revision buildInfoTime was not computed if buildInfoPath was undefined but after this change, even though buildInfoPath is undefined, it is still attempting to compute ts_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)));

}](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/0fab463b21c6edc4d94834568a3f440241d57887/src/typescript/worker/lib/system.ts#L284C1-L290C2)

Perhaps this needs to be handled in fork-ts-checker-webpack-plugin? But it seems to me that perhaps buildInfoTime could be skipped when buildInfoPath is unavailable.

Originally posted by @JasonKleban in dca9182

@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this Possible Improvement The current behavior isn't wrong, but it's possible to see that it might be better in some cases labels Nov 14, 2024
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted You can do this Possible Improvement The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Projects
None yet
Development

No branches or pull requests

2 participants