{ "id": "101517", "key": "TIMOB-10991", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-03-25T16:44:42.000+0000", "created": "2012-09-19T12:06:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "21111", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "100760", "key": "ALOY-245", "fields": { "summary": "Add .gitignore to Alloy projects", "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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "26929", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "111559", "key": "TIMOB-13168", "fields": { "summary": "CLI: App fails to build if Resources directory does not exist", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "21112", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "101501", "key": "ALOY-282", "fields": { "summary": "Alloy - Syntax error breaks build process", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T20:41:30.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": "12305", "name": "Core", "description": "Central component of the Platform (outside of Tooling, or platform specific implementation details)" } ], "description": "In Alloy, the \"Resources\" directory is essentially recreated on every build via compiler plugin. In order for the generated \"Resources\" directory to reflect changes made in the Alloy \"app/assets\" directory (added/removed files), we need to delete then re-create the \"Resources\" directory each time. Alloy maintains the platform-specific folders in \"app/assets\", so generally this isn't an issue. \r\n\r\nThe problem arises when a developer would want to import an Alloy project that has no \"Resources\" folder already in it. From an Alloy developer's perspective, the \"Resources\" folder is unnecessary baggage since all things that would be contained in it can be found throughout the \"app\" directory. It would likely be common that Alloy projects in version control won't even keep the \"Resources\" directory.\r\n\r\nWhen a developer imports an Alloy project without a \"Resources\" directory, or has an existing Alloy project and manually deletes the \"Resources\" directory, then attempts to run on any platform, they will encounter the following errors:\r\n\r\nh4. ios\r\n{code}\r\n[INFO] One moment, building ...\r\n[INFO] app property, ti.ui.defaultunit : system\r\n[INFO] Traceback (most recent call last):\r\n[INFO] File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.2.0/iphone/builder.py\", line 1596, in \r\n[INFO] main(sys.argv)\r\n[INFO] File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.2.0/iphone/builder.py\", line 723, in main\r\n[INFO] find_name_conflicts(project_dir, app_name)\r\n[INFO] File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.2.0/iphone/builder.py\", line 508, in find_name_conflicts\r\n[INFO] for name in os.listdir(os.path.join(project_dir, dir)):\r\n[INFO] OSError: [Errno 2] No such file or directory: '/Users/tlukasavage/Development/alloy/test/projects/Harness/Resources'\r\n{code}\r\n\r\nh4. android\r\n{code}\r\nTraceback (most recent call last):\r\n File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/android/builder.py\", line 2187, in \r\n s = Builder(project_name,sdk_dir,project_dir,template_dir,app_id)\r\n File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/android/builder.py\", line 248, in __init__\r\n android_creator.create(parent_dir, project_dir=self.top_dir, build_time=True)\r\n File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/android/android.py\", line 338, in create\r\n copy_resources(os.path.join(template_dir,'resources'),android_project_resources)\r\n File \"/Users/tlukasavage/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/android/android.py\", line 45, in copy_resources\r\n os.mkdir(os.path.expanduser(target))\r\nOSError: [Errno 2] No such file or directory: '/Users/tlukasavage/Development/alloy/test/projects/Harness/Resources/android'\r\n{code}\r\n\r\nThe reason this seems to occur is that the above validation is happening before the compiler plugin has a chance to repopulate the Resources directory. \r\n\r\nIs it possible for the compiler plugin to run before this validation? If not, a more complex method of tracking differences between the changes in the \"app\" directory and the \"Resources\" directory will need to be maintained by Alloy.\r\n\r\nh2. Steps to Reproduce\r\n\r\n# Create a new Titanium mobile project with the Alloy template\r\n# Delete the \"Resources\" directory\r\n# Attempt to run for android or ios", "attachment": [], "flagged": false, "summary": "Compiler plugins pre-empted, can't run an app with no Resources directory (Alloy)", "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": "TiSDK 2.2.0 master\r\nTiStudio 2.1.3", "comment": { "comments": [ { "id": "219803", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To note, placing an empty \"iphone\" or \"android\" folder, depending on the build target of course, will cause the build to execute as normal. There doesn't need to be anything else in the folders, so it seems as though it is unnecessary to have this validation before the compiler plugin processes. Unfortunately I can't do anything on the alloy side until the compiler plugin fires, but it is never reached.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T13:19:37.000+0000", "updated": "2012-09-19T13:19:37.000+0000" }, { "id": "235302", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "bump, would be nice to get a fix version or something on this one. The Resources directory is hidden in Alloy projects now, but it still needs to exist or the CLI will crash attempting to create the app.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-22T03:49:14.000+0000", "updated": "2013-01-22T03:49:14.000+0000" }, { "id": "414905", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T20:41:30.000+0000", "updated": "2017-03-22T20:41:30.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }