-
Notifications
You must be signed in to change notification settings - Fork 130
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
Duplicate errors with noEmitOnError
#543
Comments
The problem occurs here: gulp-typescript/lib/compiler.ts Lines 144 to 151 in 6914e22
With
But with
|
I pushed a test-case demonstrating the issue on my branch A possible explanation is that the error seems to be counted both as a semantic error and emit error. |
The uniqueness of the errors is checked by hashing them and adding them to a set. If an error is already in the set, it is not reported. To support older versions of Node, the set is implemented using the keys of a JS object. The hash of diagnostic is created using a JSON serializing of object (after dropping circular references). Closes ivogabe#543
The uniqueness of the errors is checked by hashing them and adding them to a set. If an error is already in the set, it is not reported. To support older versions of Node, the set is implemented using the keys of a JS object. The hash of diagnostic is created using a JSON serializing of object (after dropping circular references). Closes ivogabe#543
The uniqueness of the errors is checked by hashing them and adding them to a set. If an error is already in the set, it is not reported. To support older versions of Node, the set is implemented using the keys of a JS object. The hash of diagnostic is created using a JSON serializing of object (after dropping circular references). Closes ivogabe#543
Thanks for reporting and investigating this issue. I think this is an issue of TypeScript, I do not think that we should remove duplicate errors ourselves in gulp-typescript. So I reported microsoft/TypeScript#20876, and hope that we'll get a response from them soon. |
The related TS issue was closed by this PR. |
Thanks for fixing this! |
When the option
notEmitOnError
is set to true,gulp-typescript
reports all the errors twice. This is specific togulp-typescript
, there is no issue when passing this option totsc
.The easiest way to understand it is to see an example (see below for the source code):
Actual behavior:
Unique errors are reported twice when using the option
noEmitOnError
.Expected behavior:
Unique errors should only be reported once.
You can easily reproduce this error with the three following files (or just clone this temporary repo):
package.json
gulpfile.js
src/index.ts
The text was updated successfully, but these errors were encountered: