clausreinke / typescript-tools

(repo no longer active) Tools related to the TypeScript language
Apache License 2.0
266 stars 29 forks source link

showError command with maxCount or per file #21

Closed Railk closed 10 years ago

Railk commented 10 years ago

I tested Typescript-tools (and my plugin) on a project with lots of errors (especially the Generic type references must include all type arguments they introduce recently, i think) and tss command line or my plugin stall and become unresponsive, the numbers of errors must be really high.

Could there be a maxcount or a showError per file to limit the numbers of errors ?

clausreinke commented 10 years ago

Usually, I prefer to find and eliminate the cause for any unresponsiveness instead of adding arbitrary limits to sweep problems under a rug.

Perhaps this is an exception and it would make sense to add a per-file error limit here anyway -for usability- but I'd still like to know the cause of this stall, if only to see whether there are other situations where we might run into it. Is that bug-ridden project available somewhere?

Railk commented 10 years ago

I understand your view of eliminating the cause instead of hiding it. I just think here it's the number of errors that make the showErrors command to stall.

It's not my project, it was given to me has a mean of a test for the plugin, i'll ask if i can give it to you for test. I come back to you when i have his answer.

Railk commented 10 years ago

here's the project address : https://github.com/seanhess/librosapp you can try tss on the public/app.ts showErrors command stall and cannot quit with ctrl+c

clausreinke commented 10 years ago

Thanks for the test case. That doesn't look like a numbers problem - it hangs while trying to get semantic diagnostics for jquery.d.ts. This does not happen before the most recent TS update, so it could be a bug or a change in TS's develop branch that is incompatible with the public jquery.d.ts.

clausreinke commented 10 years ago

There is an odd types.ts file (a soft link checked in as text?). If I fix that (as a reference path) and recompile tss with TS v0.9.1-1052-g90cf3df, the hang is gone.

clausreinke commented 10 years ago

found a version that does not seem to suffer from this bug, yet still compiles tss (newer versions don't). Please check.

Railk commented 10 years ago

Thank you for your quick troubleshooting and answer. I'll check tonight when i'm back home

Railk commented 10 years ago

I've tested the fix and everything works fine, thank you :)