Titanium JIRA Archive
Alloy (ALOY)

[ALOY-540] Resolve suboptimal compression from uglify-js v2 update

GitHub Issuen/a
TypeSub-task
PriorityMedium
StatusClosed
ResolutionWon't Do
Resolution Date2018-01-06T03:21:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsXML
Labelsn/a
ReporterTony Lukasavage
AssigneeBruce Wayne
Created2013-03-01T19:25:27.000+0000
Updated2018-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.

Comments

  1. Tim Poulsen 2014-07-11

    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.
  2. Tim Poulsen 2014-07-14

    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.
  3. Feon Sua Xin Miao 2018-01-06

JSON Source