{ "id": "113713", "key": "ALOY-654", "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": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15406", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-05-02T21:38:21.000+0000", "created": "2013-05-02T15:22:17.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "cli", "qe-testadded" ], "versions": [ { "id": "15271", "description": "Alloy 1.1.0, concurrent with SDK 3.1.0", "name": "Alloy 1.1.0", "archived": false, "released": true, "releaseDate": "2013-04-16" }, { "id": "14634", "description": "Alloy 1.0.0", "name": "Alloy 1.0.0", "archived": false, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [ { "id": "28389", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "113699", "key": "TISTUD-4496", "fields": { "summary": "Windows defender python access request after attempt to debug the App on device or emulator", "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 } } } } ], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-18T19:59:19.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": "12332", "name": "Titanium SDK", "description": "Any integration or issues with the TiSDK" }, { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "Due to the splintered nature of the Android build process currently, where the new CLI runs and then delegates back to the old python plugins, both the Alloy new CLI hook and and legacy python compiler plugin are running on each Android build. This is causing Alloy to essentially be executed twice. The execution of the legacy plugin should be eliminated. It is responsible for the issue in TIMOB-13744.\r\n\r\nUnfortunately, the new CLI hooks and the legacy python plugins use the same notation in the tiapp.xml file for indicating that they should be used:\r\n\r\n{code:xml}\r\n\r\n\tti.alloy\r\n\r\n{code}\r\n\r\nThe new CLI hook executes first. As the hook/plugin gets added in on every build, as a final step to the new CLI hook it could delete the old legacy plugin. Then on subsequent builds that match a certain criteria, like Android with TiSDK >= 3.0.2, Alloy could _not_ copy back in the legacy compiler plugin. The caveat here is that although this would prevent the android build process from running twice on on TiSDK versions that support the new CLI, if a dev rolls back to an earlier version, the alloy process won't run at all. \r\n\r\nThere may need to be something in the CLI itself that determines how to handle this situation, as it is created by laying the new CLI on top of the old one, a situation that is by definition a temporary one.", "attachment": [], "flagged": false, "summary": "Android builds runs the new CLI hook, then also the legacy python compiler plugin ", "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": "249990", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/127\r\n\r\nh3. testing\r\n\r\n*Make sure the log level is set to at least \"debug\".*\r\n\r\nAny basic Alloy app will do for functional testing. Follow these steps to first produce the error resolved in this issue, and please do so on Mac, Windows, and Linux:\r\n\r\n1. Install Alloy 1.1.2\r\n2. Build an app for Alloy with TiStudio or the CLI for Android emulator.\r\n3. Watch the console log. You should see the Alloy compile process run twice. The first time is the new CLI hook, the second time is the legacy python plugin. You do not have to wait for a full build and install to see this, it should happen within the first few seconds.\r\n\r\nOnce you have asserted that you created the \"double compile\" condition with android builds, install Alloy to the version from the PR via the command below:\r\n\r\n{code}\r\n[sudo] npm install -g git://github.com/appcelerator/alloy.git#ALOY-654\r\n{code}\r\n\r\nNow on all supported OSes, let's do this again:\r\n\r\n1. Install alloy as above\r\n2. Build an Alloy app for Android. Use an existing Alloy app. You will likely still see the \"alloy compile\" command run twice still. This is because the code to prevent this needs to be executed once before it takes effect and it is contained in the plugin code itself. \r\n3. Build the same app for Android again. You should see Alloy execute only once this time\r\n4. Dig through console log to find a line that reads: \r\n{code}\r\n[DEBUG] build/.alloynewcli file found, skipping plugin...\r\n{code}\r\nThough only seeing Alloy run once confirms the issue is resolved, validating that the message that .alloynewcli file was found makes certain.\r\n\r\nRepeat the above steps, on all OSes, for a fresh Alloy app as well. The default one will work just fine, the content of the app is not important. After all that, if the Alloy compile command is being run only once on Android builds and there are no failures, the issue can be verified as fixed. ", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-02T21:38:21.000+0000", "updated": "2013-05-02T21:40:32.000+0000" }, { "id": "262358", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed.\n\nTitanium SDK 3.1.2.v20130718094558\nAlloy 1.2.0\nAppcelerator Studio 3.1.1.201306131423\n\nAndroid device 4.2.2 - iOS 6\nMax OS X 10.8.4, Linux Ubuntu 12.04 and Windows 8 OS\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-18T19:58:58.000+0000", "updated": "2013-07-18T19:58:58.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }