{ "id": "168517", "key": "ALOY-1570", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "19783", "name": "CLI Release 6.3.0", "archived": false, "released": true }, { "id": "19791", "name": "Alloy 1.10.3", "archived": false, "released": true, "releaseDate": "2017-06-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-22T18:18:55.000+0000", "created": "2017-06-20T12:58:39.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "19558", "name": "Alloy 1.10.0", "archived": false, "released": true, "releaseDate": "2017-05-19" } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-10-10T19:26:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "since 1.10.0 exports.baseController = 'name' does not work.\r\n\r\nI attached simple project with three controllers \r\n* Base\r\n* BasedOnBase with exports.baseController = 'base' in js\r\n* BasedOnBaseXML with in xml\r\n\r\nWith Alloy 1.9.11 I got correct result in both cases:\r\n{code}\r\nfunction Controller() {\r\n require(\"/alloy/controllers/Base\").apply(this, Array.prototype.slice.call(arguments));\r\n...\r\n{code}\r\n\r\nbut with Alloy 1.10.x I get correct code only for BasedOnBaseXML\r\n\r\nfor BasedOnBase I get:\r\n{code}\r\n\trequire('/alloy/controllers/' + 'BaseController').apply(this, Array.prototype.slice.call(arguments));\r\n\tthis.__controllerPath = 'BasedOnBase';\r\n\tthis.args = arguments[0] || {};\r\n\r\n\tif (arguments[0]) {\r\n\t\tvar __parentSymbol = __processArg(arguments[0], '__parentSymbol');\r\n\t\tvar $model = __processArg(arguments[0], '$model');\r\n\t\tvar __itemTemplate = __processArg(arguments[0], '__itemTemplate');\r\n\t}\r\n\tvar $ = this;\r\n\tvar exports = {};\r\n\tvar __defers = {};\r\n\r\n\t$.__views.BasedOnBase = Ti.UI.createView({ id: \"BasedOnBase\" });\r\n\t$.__views.BasedOnBase && $.addTopLevelView($.__views.BasedOnBase);\r\n\texports.destroy = function () {};\r\n\r\n\t_.extend($, $.__views);\r\n\r\n\tvar args = $.args;\r\n\texports.baseController = 'Base';\r\n{code}", "attachment": [ { "id": "62703", "filename": "app.zip", "author": { "name": "darknos", "key": "darknos", "displayName": "Sergey Nosenko", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2017-06-20T12:54:38.000+0000", "size": 7419, "mimeType": "application/zip" } ], "flagged": false, "summary": "Alloy: exports.baseController does not work since 1.10.0 (Regression)", "creator": { "name": "darknos", "key": "darknos", "displayName": "Sergey Nosenko", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "darknos", "key": "darknos", "displayName": "Sergey Nosenko", "active": true, "timeZone": "Europe/Helsinki" }, "environment": null, "closedSprints": [ { "id": 912, "state": "closed", "name": "2017 Sprint 13 Tooling", "startDate": "2017-06-18T16:15:17.914Z", "endDate": "2017-07-02T16:15:00.000Z", "completeDate": "2017-07-06T23:54:40.012Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "422367", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Likely related to move to babylon/babel. I modified https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/ast/controller.js and it seems maybe it's not grabbing the controller name properly now? I think it may be a simple typo: 'export.baseController' vs 'exports.baseController'", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-06-20T13:40:38.000+0000", "updated": "2017-06-20T13:40:38.000+0000" }, { "id": "422368", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/alloy/pull/832", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-06-20T13:45:13.000+0000", "updated": "2017-06-20T13:45:13.000+0000" }, { "id": "422378", "author": { "name": "darknos", "key": "darknos", "displayName": "Sergey Nosenko", "active": true, "timeZone": "Europe/Helsinki" }, "body": "If you release 6.20 without this it will be broken. :(", "updateAuthor": { "name": "darknos", "key": "darknos", "displayName": "Sergey Nosenko", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2017-06-20T17:24:31.000+0000", "updated": "2017-06-20T17:24:31.000+0000" }, { "id": "422561", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~darknos] The 'Release 6.3.0' refers to the Appcelerator CLI release version, it is currently at 6.2.2, as opposed to the 6.1.0 of Titanium SDK. If you are not using the Appc CLI, (Titanium CLI+Alloy) this change will be in Alloy 1.10.3", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-06-22T19:02:32.000+0000", "updated": "2017-06-22T19:02:32.000+0000" }, { "id": "428906", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Node Version: 6.10.3\r\nNPM Version: 3.10.10\r\nMac OS: 10.13\r\nAppc CLI: 6.3.0-master.7\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.2.2\r\nValidated with the environment. I tested with the attached app, and app functioned as expected. No errors were seen.\r\n", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-10T19:26:10.000+0000", "updated": "2017-10-10T19:26:10.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }