tunnelvisionlabs / antlr4ts

Optimized TypeScript target for ANTLR 4
Other
624 stars 106 forks source link

TypeScript version upgrade blocked #459

Open BurtHarris opened 4 years ago

BurtHarris commented 4 years ago

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

BurtHarris commented 4 years ago

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.

volkanunsal commented 2 years ago

It would be great to see this PR merged.