Quantcast

Closure compiler not failing on errors

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Closure compiler not failing on errors

Ron M

We have a problem with our use of the closure compiler in that it is reporting errors, such as trailing commas, but yet in the end it says the build succeeded. One of our engineers found a way to fix that by changing the following file:

 

File: dojo/util/build/transforms/optimizer/closure.js

 

from:

compiler.compile(externSourceFile, jsSourceFile, options);

 

to:

var complierResult = compiler.compile(externSourceFile, jsSourceFile, options);

if (!complierResult.success)

    throw new Error("Error during Closure optimization");

 

Would it be possible to make this part of the Dojo release, either by default or as a build option?

 

Thanks,

Ron


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Closure compiler not failing on errors

dylanks
Hi Ron,

Sure, please open a pull request against the util package per the
contributing guidelines,
https://github.com/dojo/util/blob/master/CONTRIBUTING.md , and I'll
review and land it.

Regards,
-Dylan

on 2/15/17, 12:09 (GMT-07:00) Ronald MacCracken said the following:

> We have a problem with our use of the closure compiler in that it is
> reporting errors, such as trailing commas, but yet in the end it says
> the build succeeded. One of our engineers found a way to fix that by
> changing the following file:
>
>  
>
> File: dojo/util/build/transforms/optimizer/closure.js
>
>  
>
> from:
>
> compiler.compile(externSourceFile, jsSourceFile, options);
>
>  
>
> to:
>
> var complierResult = compiler.compile(externSourceFile, jsSourceFile,
> options);
>
> if (!complierResult.success)
>
>     throw new Error("Error during Closure optimization");
>
>  
>
> Would it be possible to make this part of the Dojo release, either by
> default or as a build option?
>
>  
>
> Thanks,
>
> Ron
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Loading...