Closed simonsarris closed 6 years ago
cc @alexeagle
Hmm, this problem does not seem specific to this project (but also to the regular closure compiler with the tsc output passed to it)
@simonsarris Could you provide a stack trace from the regular / Java version of Closure Compiler? I admit the stack trace from GWT is currently unusable. Thanks.
C:\SomePath\buildTS> java -jar .\closure-compiler.jar --js_output_file=go.js '../built/**.js' --jscomp_off=deprecatedAnnotations
java.lang.RuntimeException: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
null
Node(ASSIGN): ../built/util.js:653:0
Util['vfo'] = '@vfo'; // version info
Parent(EXPR_RESULT): ../built/util.js:653:0
Util['vfo'] = '@vfo'; // version info
at com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread(CompilerExecutor.java:126)
at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:753)
at com.google.javascript.jscomp.Compiler.compile(Compiler.java:723)
at com.google.javascript.jscomp.Compiler.compile(Compiler.java:693)
at com.google.javascript.jscomp.AbstractCommandLineRunner.doRun(AbstractCommandLineRunner.java:1080)
at com.google.javascript.jscomp.AbstractCommandLineRunner.run(AbstractCommandLineRunner.java:492)
at com.google.javascript.jscomp.CommandLineRunner.main(CommandLineRunner.java:1898)
Caused by: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
null
Node(ASSIGN): ../built/util.js:653:0
Util['vfo'] = '@vfo'; // version info
Parent(EXPR_RESULT): ../built/util.js:653:0
Util['vfo'] = '@vfo'; // version info
at com.google.common.base.Preconditions.checkState(Preconditions.java:429)
at com.google.javascript.jscomp.CheckJSDoc.isValidMsgName(CheckJSDoc.java:375)
at com.google.javascript.jscomp.CheckJSDoc.validateMsgJsDoc(CheckJSDoc.java:351)
at com.google.javascript.jscomp.CheckJSDoc.visit(CheckJSDoc.java:90)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:639)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:711)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:635)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:711)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:635)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:711)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:635)
at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:311)
at com.google.javascript.jscomp.NodeTraversal.traverseEs6(NodeTraversal.java:582)
at com.google.javascript.jscomp.CheckJSDoc.process(CheckJSDoc.java:77)
at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:304)
at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:236)
at com.google.javascript.jscomp.Compiler.check(Compiler.java:892)
at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:781)
at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:87)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:726)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:723)
at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:91)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException
... 26 more
Crashes in the compiler need to be reported to https://github.com/google/closure-compiler.
I'm using the closure compiler with TypeScript output. In one class (
class Util
) I have:Which turns into:
Which is pretty close to the JS I use with the Java Closure compiler and it has no problem with it.
Then when I use webpack with my JS (that was output from TS with
tsc
) and the closure compiler, I get:Eyeballing it, I'm really not sure why this line would be a problem. If I comment it out, a similar static line is problematic.