Description
When running alloy compile on the studentfutter app, it will error out with the below, at first glance it appears to be choking on the Ti API usage I think
https://github.com/hansemannn/studentenfutter-app/blob/2855926288f8ada820b947336f4d3dbd9f5f0f4e/app/lib/android/actionbar.js
[INFO] ----- OPTIMIZING -----
[INFO] - alloy/moment/lang/de-at.js
[INFO] - alloy/moment/lang/de.js
[INFO] - alloy/moment/lang/en-au.js
[INFO] - alloy/moment/lang/en-ca.js
[INFO] - alloy/moment/lang/en-gb.js
[INFO] - alloy/moment/lang/es.js
[INFO] - alloy/moment/lang/pt-br.js
[INFO] - alloy/moment/lang/pt.js
[INFO] - iphone/actionbar.js
[INFO] - iphone/alloy.js
[INFO] - iphone/api.js
[INFO] - iphone/dateutils.js
[INFO] - iphone/loader.js
[INFO] - iphone/locations.js
[INFO] - iphone/request.js
[INFO] - iphone/utils.js
[INFO] - iphone/alloy/models/Cart.js
[INFO] - iphone/alloy/models/Lunch.js
[INFO] - iphone/alloy/sync/localStorage.js
[INFO] - iphone/alloy/sync/properties.js
[INFO] - iphone/alloy/sync/sql.js
[INFO] - iphone/alloy/widgets/nl.fokkezb.pullToRefresh/styles/widget.js
[ERROR] Error transforming JS file
[ERROR] /Users/eharris/Documents/git/testing_apps/studentenfutter-app/Resources/iphone/actionbar.js: Property id of VariableDeclarator expected node to be of a type ["LVal"] but instead got "BooleanLiteral"
Steps to reproduce
Run alloy compile --config platform=ios
Actual
Compile process will error out with the above
Expected
Compile process should not error out
I dont think this is because of Ti API usage Uncommenting the platforms optimization gets rid of this error https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/ast/optimizer-plugin.js#L28-L30 https://github.com/appcelerator/alloy/blob/18ec7eae9b2447cc8affad0909f1ed92a893e184/Alloy/commands/compile/ast/optimizer-plugin.js#L64-L66
PR: https://github.com/appcelerator/alloy/pull/828
Validated with the environment: Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.13 Appc CLI: 6.3.0-master.7 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.1.2 The app compiled with no errors and the fix is validated.. One side note is that the test app needs to be updated by moving DefaultIcon.png to app/