no longer adds "use strict" to the resulting code.
I'm guessing that all the recent changes for modules have affected this feature? Or am I just doing something wrong? I didn't see anything about this in a quick scan of the
release notes, but maybe I missed it? Should I file an issue on this?
Here is the complete command & compiler version
Version: v20160315-213-g4787bb5
java -jar ../javascript/closure-compiler/build/compiler.jar --entry_point=goog:myphysicslab.sims.pendulum.PendulumApp --compilation_level=ADVANCED --define=goog.DEBUG=true '--define=goog.LOCALE='\''en'\''' --define=myphysicslab.lab.util.UtilityCore.ADVANCED=true --generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls --jscomp_error=ambiguousFunctionDecl --jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const --jscomp_error=constantProperty --jscomp_error=fileoverviewTags --jscomp_error=globalThis --jscomp_error=invalidCasts --jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties --jscomp_error=missingProvide --jscomp_error=missingRequire --jscomp_error=missingReturn --jscomp_error=newCheckTypes --jscomp_error=strictModuleDepCheck --jscomp_error=suspiciousCode --jscomp_error=typeInvalidation --jscomp_error=undefinedNames --jscomp_error=undefinedVars --jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility --language_in=ECMASCRIPT5_STRICT --dependency_mode=STRICT --warning_level=VERBOSE '--output_wrapper=(function(){%output%}).call(window)'
Here is the start of the resulting compiled code, note there is no "use strict".
(function(){var f,ba=this;function n(a){return void 0!==a}
I also need "use strict" to be added when compilation_level=SIMPLE.
I've been unable to find anything about this from web searches, not even anything stating that language_in=ECMASCRIPT5_STRICT should be adding "use strict" to the resulting code.
I've been trying to add the "use strict" to the output_wrapper, but the bash quoting rules and the presence of a space in "use strict" has so far prevented this from succeeding. I suppose I can write a program to manually insert "use strict" into the code after compilation, but that seems rather ugly -- it's something that the compiler should be able to do.
--ErikN