HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

Invalid Output Wrapper Flag Should Cause An Error #1291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When an output wrapper flag is specified without a valid output wrapper marker 
(usually from a typo), the compiler doesn't wrap the output at all and the 
compilation succeeds without warning or error.

Example: --output_wrapper="(function(){output})()"

We should throw an error and halt compilation in this case.

Original issue reported on code.google.com by chadkill...@missouristate.edu on 31 Mar 2014 at 4:54

GoogleCodeExporter commented 9 years ago
Just as follow up, the problem is especially bad because the entire flag is 
ignored if the wrapper doesn't contain a valid marker. Example (using an IIFE 
wrapper):

input:
console.log('foo');

expected output:
(function(){console.log('foo');})()

actual output:
console.log('foo');

Original comment by chadkill...@missouristate.edu on 1 Apr 2014 at 2:51

GoogleCodeExporter commented 9 years ago
Sounds reasonable to me, care to prepare a patch?

Original comment by concavel...@gmail.com on 5 Apr 2014 at 11:57

GoogleCodeExporter commented 9 years ago
Issue tracking has been migrated to github. Please make any further comments on 
this issue through https://github.com/google/closure-compiler/issues

Original comment by blic...@google.com on 1 May 2014 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by blic...@google.com on 1 May 2014 at 6:34