{ "id": "101196", "key": "ALOY-271", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "14171", "description": "", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14176", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": false, "released": true, "releaseDate": "2012-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-19T19:51:10.000+0000", "created": "2012-09-14T13:35:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "14171", "description": "", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:25:36.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "Right now we are allowing the default behavior for uglifyjs exceptions, which is an unfortunately massive and not terribly useful stack dump. What we really need is to catch the exceptions and pull out the message, line, column, and position to let developers know exactly where the errors are occurring. Essentially, we need to turn this:\r\n\r\n{code}\r\n[INFO] Now parsing view index.xml...\r\n[ERROR] Unexpected token string, expected punc\r\n[ERROR] Error\r\n[INFO] at new JS_Parse_Error (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:263:22)\r\n[INFO] at js_error (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:271:15)\r\n[INFO] at croak (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:732:17)\r\n[INFO] at token_error (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:739:17)\r\n[INFO] at expect_token (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:752:17)\r\n[INFO] at expect (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:755:40)\r\n[INFO] at object_ (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1148:56)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1109:51\r\n[INFO] at maybe_unary (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1208:27)\r\n[INFO] at expr_ops (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1235:32)\r\n[INFO] at maybe_conditional (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1239:28)\r\n[INFO] at maybe_assign (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1263:28)\r\n[INFO] at maybe_assign (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1267:76)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1277:28\r\n[INFO] at prog1 (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1311:23)\r\n[INFO] at simple_statement (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:905:35)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:813:35\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1296:32\r\n[INFO] at Object.parse (/usr/local/lib/node_modules/alloy/Alloy/uglify-js/lib/parse-js.js:1298:10)\r\n[INFO] at processTssFile (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:787:20)\r\n[INFO] at Object.loadStyle (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:492:15)\r\n[INFO] at Object.loadAndSortStyle (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:502:28)\r\n[INFO] at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:219:22)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:124:5\r\n[INFO] at Array.forEach (native)\r\n[INFO] at Function. (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:11:39)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:122:5\r\n[INFO] at Array.forEach (native)\r\n[INFO] at Function. (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:11:39)\r\n[INFO] at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:120:4\r\n[INFO] at Object. (/usr/local/lib/node_modules/alloy/Alloy/alloy.js:101:44)\r\n[INFO] at Module._compile (module.js:441:26)\r\n[INFO] at Object..js (module.js:459:10)\r\n[INFO] at Module.load (module.js:348:31)\r\n[INFO] at Function._load (module.js:308:12)\r\n[INFO] at Module.require (module.js:354:17)\r\n[INFO] at require (module.js:370:17)\r\n[INFO] at Object. (/usr/local/lib/node_modules/alloy/bin/alloy:3:1)\r\n[INFO] at Module._compile (module.js:441:26)\r\n[INFO] at Object..js (module.js:459:10)\r\n[INFO] at Module.load (module.js:348:31)\r\n[INFO] at Function._load (module.js:308:12)\r\n[INFO] at Array.0 (module.js:479:10)\r\n[INFO] at EventEmitter._tickCallback (node.js:192:40)\r\n{code}\r\n\r\ninto this:\r\n\r\n{code}\r\n[ERROR] Error processing style for view \"index.xml\" in \"index.xml.tss\"\r\n[ERROR] Unexpected token string, expected punc\r\n[ERROR] line 9, column 1, position 150\r\n{code} ", "attachment": [], "flagged": false, "summary": "Get message, line, column, and position from all AST parsing errors", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "219892", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Future refactoring should be done to simplify the handling of uglify-js AST parsing errors. For now though, all AST operations should be accounted for in terms of proper error handling.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T19:51:10.000+0000", "updated": "2012-09-19T19:51:10.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }