Opened 7 years ago

Closed 7 years ago

#16488 closed enhancement (fixed)

Update closureCompiler included in Dojo build system to a newer version

Reported by: alexeim Owned by: Rawld Gill
Priority: high Milestone: 1.9
Component: BuildSystem Version: 1.8.2
Keywords: Cc:
Blocked By: Blocking:

Description

The one that is currently being used is way too talkative, so whoever builds with Rhino receives tons of

"INFO: coalesceVariableNames Dec 19, 2012 9:11:48 AM com.google.javascript.jscomp.PhaseOptimizer?$NamedPass? process INFO: peepholeOptimizations Dec 19, 2012 9:11:48 AM com.google.javascript.jscomp.PhaseOptimizer?$NamedPass? process INFO: exploitAssign Dec 19, 2012 9:11:48 AM com.google.javascript.jscomp.PhaseOptimizer?$NamedPass? process INFO: collapseVariableDeclarations"

in the build log.

Change History (6)

comment:1 Changed 7 years ago by jdalton

+1

There is also a bug in the version of Closure Compiler used by Dojo's build system that causes some issues if devs use it for other projects. In some cases Closure Compiler may convert something like var a = {}, b = {}.hasOwnProperty to var a = void 0, b = void 0.

http://code.google.com/p/closure-compiler/downloads/detail?name=compiler-latest.zip

comment:2 Changed 7 years ago by phated

+1

Have actually run into the case jdalton describes when including Lo-Dash in a build.

comment:3 Changed 7 years ago by Rawld Gill

Milestone: tbd1.9
Status: newassigned

comment:4 Changed 7 years ago by Rawld Gill

Seems like we should make this configurable so that users can optionally point to a different closure compiler.

comment:5 Changed 7 years ago by Rawld Gill

Priority: undecidedhigh

comment:6 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

The Closure compiler was been upgraded in #15232.

If building on node, users can change the Closure compiler by setting the profile variable

closureCompilerPath

to point to the compiler jar file

If building on Rhino on *nix, the command line should look like...

java -Xms256m -Xmx256m -cp ./../shrinksafe/js.jar:./../closureCompiler/compiler.jar:./../shrinksafe/shrinksafe.jar org.mozilla.javascript.tools.shell.Main ./../../dojo/dojo.js baseUrl=./../../dojo load=build <normal build arguments go here>

change ./../closureCompiler/compiler.jar as required.

If building on Rhino on windows, the command line should look like...

java -Xms256m -Xmx256m  -cp "%~dp0../shrinksafe/js.jar";"%~dp0../closureCompiler/compiler.jar";"%~dp0../shrinksafe/shrinksafe.jar" org.mozilla.javascript.tools.shell.Main  "%~dp0../../dojo/dojo.js" baseUrl="%~dp0../../dojo" load=build

again, change ./../closureCompiler/compiler.jar as required.

Note: See TracTickets for help on using tickets.