{ "id": "144738", "key": "ALOY-1244", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-02-14T13:57:46.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "16595", "name": "Alloy 1.5.1", "archived": false, "released": true, "releaseDate": "2014-10-01" } ], "issuelinks": [ { "id": "48529", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "150069", "key": "TIMOB-19304", "fields": { "summary": "Classic resources left behind in Alloy projects even after build", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2015-07-31T21:09:44.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "When you convert a classic project in an Alloy project, the classic {{Resources/app.js}} file will remain untouched because Alloy works with {{Resources/\\[platform\\]/app.js}}.\r\n\r\nWhile this isn't a problem, it is really confusing for new users, wondering if that code will be executed.\r\n\r\nh1. Solution\r\n\r\nIt would be better if running {{alloy new}} would delete or empty the {{Resources}} folder.\r\n\r\nAs per [~sfeather]'s suggestion this might be improved upon by letting the user confirm he's aware {{Resources}} folder will be deleted and/or renaming it to e.g. {{Resources (classic)}} so it is preserved. This would also improve the current situation where the first time the user runs {{alloy compile}} or {{ti build}} he will lose his classic files as well.\r\n\r\nh1. To reproduce\r\n\r\nExecute the following in a temporary directory:\r\n{code}\r\nti create -t app -p ios -n res --id test.res -d . -u http://appcelerator.com\r\ncd res\r\nalloy new\r\nti build -p ios -b\r\ncd Resources\r\nnano app.js\r\n{code}\r\n\r\nYou'll see that even after alloy compiles {{Resources/app.js}} is still the default classic {{app.js}}.", "attachment": [], "flagged": false, "summary": "Alloy: \"alloy new\" should remove/empty \"Resources\" folder", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Alloy 1.5.1", "comment": { "comments": [ { "id": "343446", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "`alloy new` should NOT be destructive.\r\n\r\nIf a user is converting a classic to alloy, their old project would be IN Resources, and they may have forgotten to move the contents themselves, and now Alloy has eaten it.\r\n\r\nThis is a bad idea.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-15T01:35:57.000+0000", "updated": "2015-02-15T01:35:57.000+0000" }, { "id": "343450", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Although {{alloy new}} currently is NOT destructive, the next time you run {{ti build}} the {{Resources}} folder IS destructed, apart from the {{app.js}} file. So I don't see much difference.\r\n\r\nThe UX could even improve if {{alloy new}} would prompt the user to confirm {{Resources}} to be destructed.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-02-15T06:41:40.000+0000", "updated": "2015-02-15T06:41:40.000+0000" }, { "id": "343453", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "\"So I don't see much difference.\"\r\n\r\n1. Your ticket is not for `ti build` it is for `alloy new`.\r\n2. The behavior of `ti build` is a different stage of development, namely building, not converting.\r\n3. A user converting a project from classic to alloy doesn't have a place to put their old files in the new structure until `alloy new` has been run.\r\n\r\nIf you are looking for a consumer/user friendly solution, take the contents of the classic Resources, move/rename/place them in Resources.classic or Resources.old to protect/preserve them, create the alloy structure as before and if purging Resources is so important to you, do it.\r\n\r\n", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-15T14:42:58.000+0000", "updated": "2015-02-15T14:42:58.000+0000" }, { "id": "343455", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "By not much different I mean:\r\n\r\n* Current: you lose the classic files (except for {{app.js}}) as soon as you do {{ti build}} or {{alloy compile}} after {{alloy new}}\r\n* Proposed: you lose the classic files as soon as you do {{alloy new}} \r\n\r\nI agree that if you're unaware that Alloy soon or later will clean {{Resources}}, both the current and proposed situation might surprise users and cause them to lose their classic files (if they're not using versioning or backups).\r\n\r\nSo I've updated the ticket to ask for the user to confirm or for the current {{Resources}} directory to be renamed. Thanks for that suggestion Stephen!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-02-15T16:27:23.000+0000", "updated": "2015-02-15T16:27:23.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }