Reporting this per instructions in the compiler output.
For what it's worth, compilation has previously been successful until
I updated the compiler to a recent build.
Source file used:
https://raw.github.com/scottschiller/SoundManager2/V2.97a.20110801+DEV/script/soundmanager2-nodebug.js
This version of the compiler throws the internal error with my JS:
Closure Compiler (
http://code.google.com/closure/compiler)
Version: 1346
Built on: 2011/08/11 15:02
Previous version I had prior to downloading, which works:
Closure Compiler (
http://code.google.com/closure/compiler)
Version: 1180
Built on: 2011/06/15 21:40
My installed JRE:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
(Hardware: 2011 Mac Mini Server, OS X Lion 10.7.1)
The compiler error output (from version 1346):
https://gist.github.com/1187837
Here is the source file used where the error occurred:
https://github.com/scottschiller/SoundManager2/blob/V2.97a.20110801+DEV/script/soundmanager2-nodebug.js
For the record, the "suspicious code" warnings are empty blocks
created as part of my minified build process that removes some custom
debug statements where in the past, the compiler has safely removed
these empty blocks and has not had problems.
eg. soundmanager2.js has some statements like:
if (foo) {
debugCall();
}
.. which then is written to soundmanager2-nodebug.js as:
if (foo) {
// debugCall();
}
.. and the -nodebug.js is then run through the compiler to make the
compressed version.
Interestingly, compressing the original version of soundmanager2.js,
which does not have the empty blocks, seems to be OK with version 1346
of the compiler - thus, I assume it's the empty blocks that are
causing the issue with version 1346. However, I expect it should work
given it used to.
The full, debug-enabled version (which compiles OK) is here:
https://github.com/scottschiller/SoundManager2/blob/V2.97a.20110801+DEV/script/soundmanager2.js
For what it's worth, the debug-enabled version passes
jslint.com save
for two "use a named parameter" errors where I reference arguments[0]
and arguments[1].
Compiler has been a treat to use and I've been quite happy with how
well it works. If more detail is needed, let me know and I'll follow
up as I can. Perhaps I'm doing something wrong, but it's worked up
until this point. ;)
Danke!