antlr4ts
antlr4ts copied to clipboard
TypeScript version upgrade blocked
Strange error behavior if we upgrade to TypeScript version 3. The tsc command seems to hang or become very slow.
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 JavaParser
s 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.
It would be great to see this PR merged.