-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Compiler API (language service) becomes incredibly slow when noEmitOnError = true
#24444
Comments
Didn't see anything obviously wrong with the way things were being called. It'd be great if you could identify when this regressed |
TS 2.9.0-RC:
TS 2.8.3:
TS 2.7.2:
TS 2.6.2:
TS 2.5.3:
TS 2.4.2:
TS 2.3.4:
TS 2.2.2:
TS 2.1.6:
TS 2.0 doesn't work. |
The time spent in |
What exactly do you mean by "declaration diagnostics"? Since I do need the declarations, is there a better way to detect that the compilation had errors than setting I still find it weird that the time needed for that almost doubled from 2.5 to 2.7. Also when I try to reproduce the test manually using the |
See microsoft/TypeScript#24444 for the reason. Errors are detected by checking the diagnostic types and emit is skipped "manually", depending on that check result.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 3.0.0-dev.20180526
Search Terms: compiler api noEmitOnError
I'm building an in-memory version of the TypeScript compiler using the language service API. This allows to compile and generate declarations for files that never reach the hard disk. While debugging another issue, I found that setting
noEmitOnError
totrue
drastically increases compile times with minor changes to the compiled sources.I'm not 100% sure that the problem doesn't come from me misusing the API, so forgive me if this is actually not an issue in TypeScript.
Code
This is too much for a short repro, so I created a repro repo here:
https://github.com/AlCalzone/virtual-tsc/tree/ts-repro
To reproduce,
npm install
and thennpm test
. The project will run a few simple compilations using the language service API. It contains two identical test cases, where one hasnoEmitOnError = true
and the other onefalse
.Both test cases correctly compile correct code and both catch syntax errors.
Expected behavior:
Similar results for both.
Actual behavior:
Related Issues: none found
The text was updated successfully, but these errors were encountered: