Hacker News new | ask | show | jobs
by Silhouette 3352 days ago
Unfortunately, recent versions of Closure Compiler don't appear to produce entirely reliable output when run with the advanced optimisations that make it interesting and give the kinds of impressive results observed by the OP here.

Case in point: We just installed the latest version on a new computer yesterday, and it causes some JS code that runs fine in its original form to fail on IE11 after transformation. The original code isn't complicated at all and multiple developers and lint tools think it's correct and not doing anything non-standard, but the transformed version seems to confuse IE. In fairness to Closure Compiler, we also can't immediately see why the transformation it has applied would be invalid, so maybe this is really a bug in IE's JS parser or something along those lines. Unfortunately, the fact remains that the original code works, the slightly different transformed version from a previous version of Closure Compiler also worked, but the transformed code in the new version does not.