{ "id": "172397", "key": "TIMOB-26438", "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": null, "resolutiondate": null, "created": "2018-10-05T16:51:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "20183", "description": "", "name": "Release 7.4.0", "archived": false, "released": true, "releaseDate": "2018-09-17" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2020-01-30T22:02:16.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "I was attempting to manually debug an Android project through Chrome's DevTools. To do so, I was running:\r\n{{ti build -p android --debug-host /127.0.0.1:51388}}\r\n\r\nBut since my selected SDK was a locally built 8.0.0 dev SDK, it \"forked\" the call to the SDK versions from the project's tiapp.xml - but it *did not forward the debug-host option/value*", "attachment": [], "flagged": false, "summary": "CLI: Not all arguments/options forwarded to forked SDK call when tiapp version isn't selected SDK", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "444696", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "So I took a quick look at this, I believe this occurs because when we fork an sdk [here|https://github.com/appcelerator/node-titanium-sdk/blob/bb0a93a33fd2999a65950a1fce8955e3b3103c1f/lib/titanium.js#L586-L591] we copy across all the known flags and options by looking at the various contexts (global context, command context, platform specific command context)\r\n\r\nWhen I had an SDK that I built locally for iOS only it would drop all the options/flags that were android specific i.e. the --debug-host flag, if i built that SDK for android then they would be forwarded as they are known to the command context. \r\n\r\nI would guess that this is expected behaviour, but maybe we do want to forward unknown args to the forked SDK? I think the best person to ask is [~cbarber] :)", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-12-18T16:47:18.000+0000", "updated": "2018-12-18T16:47:18.000+0000" }, { "id": "444701", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I'm not sure why it's not picking up the {{\\-\\-debug\\-host}} flag. It should work.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T18:01:36.000+0000", "updated": "2018-12-18T18:01:36.000+0000" }, { "id": "444707", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "I think it makes sense (given the current code) why it's not picking it up. In the fail case the SDK forking the command only has iOS as a platform, so it can't know about any options/flags defined by android (such as --debug-host), so when it loops over the various command contexts trying to decide what flags should be copied over it will drop the things it doesn't know. Once I build that SDK with Android and iOS, it knows to pass through --debug-host because it now is aware of the flag through Android command context.\r\n\r\nI'm assuming that this was intended behaviour, and that there is reasoning for us not forwarding unknown args, but I can see why we would also want possibly forward unknown args.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-12-18T19:13:56.000+0000", "updated": "2018-12-18T19:13:56.000+0000" }, { "id": "444714", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "We don't forward args because there was a time when we thought we were going to have to map options where the option name would change. That hasn't really happened.\r\n\r\nSo the question comes down to this: does the SDK that [~cwilliams] built locally include Android? If yes, then add the output where it says forking the correct SDK. If no, then build the SDK with Android, give it a try, and resolve this ticket.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T19:48:46.000+0000", "updated": "2018-12-18T19:48:46.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }