che-server/plugins/plugin-maven
Artem Zatsarynnyi 66e2d89095 Fix failing Closure Compiling in case GWT JavaScript compiler output style set to DETAILED mode (#2796)
When I enable Closure Compiler and set GWT JavaScript compiler output style to DETAILED mode
by providing the following configuration of gwt-maven-plugin:
<configuration>
    <modules>
        <module>org.eclipse.che.ide.IDE</module>
    </modules>
    <style>DETAILED</style>
    <enableClosureCompiler>true</enableClosureCompiler>
</configuration>

I get the following compilation error:
[INFO]    Compiling 4 permutations
[INFO]       Compiling permutation 0...
[ERROR] error optimizing:JSC_VAR_ARGUMENTS_SHADOWED_ERROR. Shadowing "arguments" is not allowed at org/eclipse/che/plugin/maven/client/command/MavenCommandModel.java line 25 : 0
[INFO]       [ERROR] Unexpected internal compiler error
[INFO] java.lang.RuntimeException: Shadowing "arguments" is not allowed
[INFO] 	at com.google.gwt.dev.js.ClosureJsRunner.compile(ClosureJsRunner.java:207)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$PermutationCompiler.generateJavaScriptCode(JavaToJavaScriptCompiler.java:524)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$PermutationCompiler.compilePermutation(JavaToJavaScriptCompiler.java:347)
[INFO] 	at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.compilePermutation(MonolithicJavaToJavaScriptCompiler.java:296)
[INFO] 	at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:143)
[INFO] 	at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:197)
[INFO] 	at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
[INFO] 	at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
[INFO] 	at java.lang.Thread.run(Thread.java:745)
[INFO]       [ERROR] Unrecoverable exception, shutting down
[INFO] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
[INFO] 	at com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:112)
[INFO] 	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler$PermutationCompiler.compilePermutation(JavaToJavaScriptCompiler.java:363)
[INFO] 	at com.google.gwt.dev.jjs.MonolithicJavaToJavaScriptCompiler.compilePermutation(MonolithicJavaToJavaScriptCompiler.java:296)
[INFO] 	at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:143)
[INFO] 	at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:197)
[INFO] 	at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
[INFO] 	at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
[INFO] 	at java.lang.Thread.run(Thread.java:745)
[INFO]       [ERROR] Not all permutation were compiled , completed (0/4)

It means that using 'arguments' as a name of a method parameter is forbidden by Google Closure Compiler because, it seems, that it's reserved for internal using here:
https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/SyntacticScopeCreator.java#L38
2016-10-17 12:51:56 +03:00
..
che-plugin-maven-generator-archetype
che-plugin-maven-ide
che-plugin-maven-server
che-plugin-maven-shared
che-plugin-maven-tools
maven-server
pom.xml