[ALOY-540] Resolve suboptimal compression from uglify-js v2 update
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Medium |
Status | Closed |
Resolution | Won't Do |
Resolution Date | 2018-01-06T03:21:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Bruce Wayne |
Created | 2013-03-01T19:25:27.000+0000 |
Updated | 2018-01-06T03:23:01.000+0000 |
Description
The v2 update of uglify-js in Alloy, specifically version 2.2.5, has some suboptimal compressions, which are causing the optimizer.js test spec to fail in certain cases. Specifically the issues are around booleans and cascading of variables in assignments. These issues have been logged with the Uglifyjs2 project in the following links:
* https://github.com/mishoo/UglifyJS2/issues/137
* https://github.com/mishoo/UglifyJS2/issues/138
When these issues are resolved and distributed in an npm release, we need to revisit these compressions and testing to ensure that the fixes are in place, and that new uglify-js version has no regressions that impact alloy.
With update to v2.4.15 of uglify, code is not compressed in the same way, nor as compactly as before. See updates to _generated (known-good) code addressed in https://github.com/appcelerator/alloy/pull/476. As part of this ticket, test the uglify options to see if we can return to the compression results we had before.
Issue 137 has been resolved. Issue 138 has not. I've been through each of the compress options (Alloy/commands/compile/ast/compress.js) in succession and none of them returns the compressed output to match that of the previous Uglify version. Stopping progress, though not resolving this ticket; revisit once issue 138 is resolved.