{ "id": "134007", "key": "ALOY-1104", "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": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-24T15:37:39.000+0000", "created": "2014-08-01T00:18:55.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "usability" ], "versions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" }, { "id": "15759", "description": "Alloy 1.3.1", "name": "Alloy 1.3.1", "archived": false, "released": true, "releaseDate": "2014-02-10" }, { "id": "16389", "name": "Alloy 1.4.1", "archived": false, "released": true, "releaseDate": "2014-07-28" } ], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-03-26T23:01:11.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": "h6. Problem description\r\nBuild fails on Android if the 'asset' folder is being deleted from the app project and is also not present in the Resources files folder. \r\n\r\nh6. Steps to reproduce\r\n1. Create a new Alloy project\r\n2. Delete everything in app folder except \"views/index.xml\" and \"controllers/index.tss\". Also delete config.json and alloy.js files. \r\n3. Run on Android\r\n\r\nResult: app build and does not properly start with error:\r\n\r\n{code}\r\n[ERROR] TiExceptionHandler: (main) [438,438] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [1,439] - In ti:/module.js:280,9\r\n[ERROR] TiExceptionHandler: (main) [0,439] - Message: Uncaught Error: Requested module not found: alloy/CFG\r\n[ERROR] TiExceptionHandler: (main) [1,440] - Source: \t\tthrow new Error(\"Requested module not found: \" + request);\r\n[ERROR] V8Exception: Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: alloy/CFG\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Fail build with clear message if controllers/index.js is missing", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.3.1.v20140725130913 & 3.3.0.GA\r\nAppcelerator Studio 3.3.1.201407300800\r\nAlloy 1.3.1, 1.4.0, 1.4.1\r\n\r\nAndroid Google Nexus Galaxy 4.3", "closedSprints": [ { "id": 180, "state": "closed", "name": "2014 Sprint 17 Alloy", "startDate": "2014-08-18T15:31:24.649Z", "endDate": "2014-09-01T15:31:00.000Z", "completeDate": "2014-09-02T07:53:26.447Z", "originBoardId": 124 }, { "id": 234, "state": "closed", "name": "2014 Sprint 21 Alloy", "startDate": "2014-10-13T16:36:31.077Z", "endDate": "2014-10-25T01:36:00.000Z", "completeDate": "2014-10-27T13:28:36.470Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "319483", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I posed the question to the Titans: \r\n\r\n{quote}\r\nThere’s a minimal set of files/folders required for a valid project (controllers/index.js & views/index.xml for sure, but perhaps config.json, alloy.js, an assets folder, etc.). What should happen if you attempt to build a project that is missing something from that minimal set? \r\n\r\nA) The compile fails with a helpful message\r\nB) The build proceeds anyway, with the tooling creating temp versions of the missing files \r\nC) The tooling creates the missing files for you in your project’s directory\r\n{quote}\r\n\r\nTheir vote was C, plus output a red error message that described which files were created and why. Something like: \"These missing, required files were created for you: \\[list\\]\"\r\n\r\nWe need to determine what that minimal set of files & folders is, check for those as part of compiling, create missing files/folders in the project directory, and output the message at the [ERROR] level.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-20T15:11:07.000+0000", "updated": "2014-08-20T15:11:07.000+0000" }, { "id": "319499", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Upon further discussion with the Titans, their opinion was refined to:\r\n\r\nThere should be just one required file for an Alloy project, which is app/controllers/index.js. If it's missing, fail the alloy compile process with a suitable error message. \r\n\r\nIf any other file or folder is missing, build anyway without an error message and without creating that file. This is specifically true for files that would be normally empty, such as config.json and alloy.js. But also for any of the other folders (views, assets, etc.) typically found in an Alloy project.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-20T16:13:22.000+0000", "updated": "2014-08-20T16:13:22.000+0000" }, { "id": "319648", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/515\r\n\r\nFunctional review:\r\n1. Create a new Alloy project\r\n2. Remove all files and folders in {{app}} dir, only keep the {{app/controllers}} folder\r\n3. Remove the content of {{app/controllers/index.js}}\r\n4. Compile and run the app on Android, there should be no exception\r\n5. Now remove the {{app/controllers}} folder\r\n6. Compile the app on Android again, there should be an error message like the the following:\r\n{code}\r\n[ERROR] : Alloy \"app\" directory has no \"controllers/index.js\" file at \"/Users/fmiao/Titanium_Studio_Workspace/ALOY-1104/app/controllers/index.js\".\r\n[ERROR] : Alloy compiler failed\r\n {code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-08-21T04:46:36.000+0000", "updated": "2014-08-21T04:46:36.000+0000" }, { "id": "319649", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~skypanther] Could you please review this. Thank you! :)", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-08-21T04:47:47.000+0000", "updated": "2014-08-21T04:47:47.000+0000" }, { "id": "319713", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged.\r\n\r\nPlease note that this change affects all platforms, not just Android as originally noted. Testing should be done for each platform, though make sure to clean the project ({{ti clean}} from the CLI) between each build attempt.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-21T15:38:12.000+0000", "updated": "2014-08-21T15:38:12.000+0000" }, { "id": "329228", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Reopen to backport to 1_6_X branch", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-23T19:58:18.000+0000", "updated": "2014-10-23T19:58:18.000+0000" }, { "id": "329296", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "1_6_X: https://github.com/appcelerator/alloy/pull/599", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-10-24T05:15:38.000+0000", "updated": "2014-10-24T05:15:38.000+0000" }, { "id": "329342", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-24T15:37:39.000+0000", "updated": "2014-10-24T15:37:39.000+0000" }, { "id": "347485", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150325201813\r\nStudio 4.0.0.201503232213\r\nAppc NPM: 0.3.35\r\nAppc CLI 0.2.192\r\nAlloy 1.6.0-alpha\r\n\r\nNot having an index.js file in the controllers folder will result in an error indicating such. Projects with only an index.js file and no other files in the app folder will build and run.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-26T23:01:11.000+0000", "updated": "2015-03-26T23:01:11.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }