antlr4ts icon indicating copy to clipboard operation
antlr4ts copied to clipboard

TypeScript version upgrade blocked

Open BurtHarris opened this issue 4 years ago • 2 comments

Strange error behavior if we upgrade to TypeScript version 3. The tsc command seems to hang or become very slow.

BurtHarris avatar Apr 16 '20 01:04 BurtHarris

In this context, I've isolated the problem to benchmark/TestPerformance.ts, the way this code is structured is giving tsc fits. Sometimes I see error messages that say something to the effect of ... comparing JavaParser to JavaParser, which gave me a clue. There are 4 or 5 different JavaParsers involved, leading me to suspect this line of code, just after the imports:

 type AnyJavaParser = JavaParser | JavaParserAtn | JavaLRParser | JavaLRParserAtn | ParserInterpreter;

I have a fix pending which simplifies cases where JavaParser | JavaParserAtn | JavaLRParser | JavaLRParserAtn gets replaced with a very simple IJavaParser interface, in the above line and elsewhere. Compiler no longer hangs.

BurtHarris avatar Apr 18 '20 17:04 BurtHarris

It would be great to see this PR merged.

volkanunsal avatar Oct 02 '21 21:10 volkanunsal