{ "id": "172562", "key": "ALOY-1637", "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": "20430", "name": "CLI Release 7.0.10", "archived": false, "released": true }, { "id": "20470", "name": "Alloy 1.13.8", "archived": false, "released": true, "releaseDate": "2019-02-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-01-11T11:51:31.000+0000", "created": "2018-11-06T09:08:55.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2019-02-18T11:46:46.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": "When using ES6 constants and accidentially redeclaring them like in the following example:\r\n{code.js}\r\nconst test = '';\r\nconst test = 'hello';\r\n{code}\r\nthe build fails like expected, but the error is hidden by a parsing error inside our code-frame / ES6 transform handling:\r\n{code}\r\n[DEBUG] /usr/local/lib/node_modules/alloy/Alloy/commands/compile/ast/controller.js:66\r\n[DEBUG] \tU.dieWithCodeFrame('Error generating AST for \"' + file + '\". Unexpected token at line ' + e.loc.line + ' column ' + e.loc.column, e.loc, code);\r\n[DEBUG] \t ^\r\n[DEBUG] TypeError: Cannot read property 'line' of undefined\r\n[DEBUG] at Object.exports.processController (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/ast/controller.js:66:99)\r\n[DEBUG] at Object.exports.loadController (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:929:33)\r\n[DEBUG] at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:833:17)\r\n{code}\r\n\r\nThis is no critical error, but reaaally hard to track if never happened before. I hope this JIRA also helps some people tracking it down more easily.", "attachment": [], "flagged": false, "summary": "ES6 code frame fails when using duplicate variable declarations", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1094, "state": "closed", "name": "2018 Sprint 23", "startDate": "2018-11-04T22:55:10.289Z", "endDate": "2018-11-18T22:55:00.000Z", "completeDate": "2019-01-14T17:19:53.829Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "445213", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This is merged but not published. Will publish alongside ALOY-1640 and ALOY-1639", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-01-11T11:51:22.000+0000", "updated": "2019-01-11T11:51:22.000+0000" }, { "id": "445405", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in CLI 7.0.10-master.5 with alloy 1.13.7.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.1.2.201812191831\r\nOS Ver: 10.14\r\nXcode Ver: Xcode 10.1\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.10-master.5\r\nDaemon Ver: 1.1.3\r\nTi CLI Ver: 5.1.1\r\nAlloy Ver: 1.13.7\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10.0.2\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-16T18:11:00.000+0000", "updated": "2019-01-16T18:11:00.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }