{ "id": "116688", "key": "TIMOB-14449", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-30T17:27:51.000+0000", "created": "2013-07-01T14:02:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "30005", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "105586", "key": "TIMOB-11869", "fields": { "summary": "CLI: Missing values prompt needs to process values iteratively", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-27T17:39:55.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": "10207", "name": "Tooling" } ], "description": "Titanium/Appcelerator Studio has a file named sdk_info.json that we grab from a server and use to determine extra dependencies for specific platforms. An example is that we have entries that point the range of Tizen SDKs we support, XCode versions, Android addons/api levels, etc. This information is not something Studio should be maintaining, and it does not take into context the current project's Mobile SDK - so we apply the dependencies globally, regardless of whether the user is using 1.7.5 or 3.2.0 - which can mean the dependencies are not correct (older versions of the SDK supported older ranges of XCode and Tizen, e.g.).\r\n\r\nThis knowledge and maintenance of dependencies should be pushed to the individual platforms, ideally in some relatively standard dependency.json file that is effectively just the segment of the sdk_info.json for that platform.\r\n\r\nHere's the current sdk_info.json file. This is a good starting point, but there are deficencies I will point out after:\r\n{code:javascript}\r\n{\r\n \"android\":{\r\n \"linux\":{\"requiredAddOns\":[\"addon.+google.+apis.+10\"],\"requiredSDKTools\":\"14\",\"requiredPlatformTools\":\"10\",\"requiredPlatforms\":[\"Android\\\\s*2\\\\.3.*\"],\"sdkURL\":\"http://dl.google.com/android/android-sdk_r21.1-linux.tgz\"},\r\n \"macosx\":{\"requiredAddOns\":[\"addon.+google.+apis.+10\"],\"requiredSDKTools\":\"14\",\"requiredPlatformTools\":\"10\",\"requiredPlatforms\":[\"Android\\\\s*2\\\\.3.*\"],\"sdkURL\":\"http://dl.google.com/android/android-sdk_r21.1-macosx.zip\"},\r\n \"win32\":{\"requiredAddOns\":[\"addon.+google.+apis.+10\"],\"requiredSDKTools\":\"14\",\"requiredPlatformTools\":\"10\",\"requiredPlatforms\":[\"Android\\\\s*2\\\\.3.*\"],\"sdkURL\":\"http://dl.google.com/android/android-sdk_r21.1-windows.zip\", \"jdkURL\":\"http://titanium-studio.s3.amazonaws.com/jdk/jdk-6u25-windows-i586.exe\"}\r\n },\r\n \"ios\":{\r\n \"macosx\":{\"requiredPlatforms\":[\"[5.0, 6.2)\"],\"sdkURL\":\"http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12\"}\r\n },\r\n \"blackberry\":{\r\n \"linux\":{\"requiredPlatforms\":[\"10.0\"],\"sdkURL\":\"http://developer.blackberry.com/native/downloads\",\"simulatorURL\":\"http://developer.blackberry.com/native/downloads\"},\r\n \"macosx\":{\"requiredPlatforms\":[\"10.0\"],\"sdkURL\":\"http://developer.blackberry.com/native/downloads\",\"simulatorURL\":\"http://developer.blackberry.com/native/downloads\"},\r\n \"win32\":{\"requiredPlatforms\":[\"10.0\"],\"sdkURL\":\"http://developer.blackberry.com/native/downloads\",\"simulatorURL\":\"http://developer.blackberry.com/native/downloads\"}\r\n },\r\n \"mobileweb\": {\r\n \"win32\": {\"Firefox\": [\"[10.0, 30.0)\"], \"InternetExplorer\": [\"[9.0, 30.0)\"], \"Chrome\": [\"[10.0, 30.0)\"], \"Safari\": [\"[5.0, 10.0)\"]},\r\n \"macosx\": {\"Firefox\": [\"[10.0, 30.0)\"], \"Chrome\": [\"[10.0, 30.0)\"], \"Safari\": [\"[5.0, 10.0)\"]},\r\n \"linux\": {\"Firefox\": [\"[10.0, 20.0)\"], \"Chrome\": [\"[10.0, 20.0)\"]}\r\n },\r\n \"tizen\":{\r\n \"linux\":{\"requiredPlatforms\":[\"2.1\"],\"sdkURL\":\"https://developer.tizen.org/downloads/sdk\"},\r\n \"macosx\":{\"requiredPlatforms\":[\"2.1\"],\"sdkURL\":\"https://developer.tizen.org/downloads/sdk\"},\r\n \"win32\":{\"requiredPlatforms\":[\"2.1\"],\"sdkURL\":\"https://developer.tizen.org/downloads/sdk\"}\r\n }\r\n}\r\n{code}\r\n\r\nIn particular for Android the regular expressions used are brittle and difficult to reconstruct since they match against the expected installed directory/filenames, while we need to compare against an xml file with the segments broke out into \"fields\". i.e. \"addon-google_apis-google-10\" is the directory on disk, but in xml the \"google_apis\" is the \"name-id\" value, \"google\" is the vendor_id\" value and \"10\" is the api level. Ideally we'd break that out more explicitly: Here's a suggestion for how the android platforms' file would look:\r\n{code:javascript}\r\n\"android\": {\r\n\t\"mobile\": {\r\n\t\t\"addons\": [],\r\n\t\t\"tools\": \">=14\",\r\n\t\t\"platform-tools\": \">=10\",\r\n\t\t\"platforms\": [\"2.3.3\"]\r\n\t}\r\n\t\"module\": {\r\n\t\t\"addons\": [\r\n\t\t\t\"google_apis-google\": {\r\n\t\t\t\t\"apiLevel\": \">=10\"\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"java\": \">=1.6.0_25\",\r\n\t\t\"plugins\": [\r\n\t\t\t\"jdt\": {\r\n\t\t\t\t\"name\": \"Java Development Tools\",\r\n\t\t\t\t\"id\": \"org.eclipse.jdt.feature.group\",\r\n\t\t\t\t\"url\": \"http://download.eclipse.org/releases/kepler\",\r\n\t\t\t\t\"version\": \">= 3.0\"\r\n\t\t\t}\r\n\t\t]\r\n\t}\t\r\n}\r\n{code}\r\n\r\nIn general my suggestions are to use Node/npm semantic versioning strings rather than our haphazard version, range or regex approach. Additionally, explicitly state the addon unique id as a key (here I'm assuming the unique id is a combination of name_id and vendor_id). Lastly, break out the dependencies required by mobile versus module development.\r\n\r\nAs for the URLs we have here, I'm not sure if we should be including them here or not.", "attachment": [], "flagged": false, "summary": "Include platform-specific dependency information underneath Mobile SDK platform subfolder", "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, "closedSprints": [ { "id": 705, "state": "closed", "name": "2016 Sprint 18 Tooling", "startDate": "2016-08-27T00:16:26.485Z", "endDate": "2016-09-10T00:16:00.000Z", "completeDate": "2016-09-13T20:21:37.063Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "260405", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I should note that we've already asked the same question internally in our group a few times regarding how to handle maximum versions. Generally we want to specify some maximum version that we know it should work against, but not limit the user to only that version range. I think it makes sense to have a specific maximum version that is treated as \"soft\" in that the CLI/Studio can warn a user that they're using Titanium on an untested version of the underlying platform but still allow the user to try it out (whereas with a minimum we may make it a \"hard\" requirement and error out).", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-01T14:07:28.000+0000", "updated": "2013-07-01T14:07:28.000+0000" }, { "id": "260408", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I very much like the idea of a \"soft\" maximum. [~ayeung], [~blainhamon] and [~cbarber], thoughts?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-01T14:51:05.000+0000", "updated": "2013-07-01T14:51:05.000+0000" }, { "id": "260409", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "One note about the google addons regex. That's partially because Google _will_ switch between using - and _ in their names. I mean, \"google_apis-google\", \"google_apis_google\", \"google-apis-google\" and \"google-apis_google\". You might ask why? I don't know. But they have.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-01T14:53:22.000+0000", "updated": "2013-07-01T14:53:22.000+0000" }, { "id": "260527", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I've already started adding this to each platform's package.json. I don't have quite as much info, but it would be easy to add and expose in the \"titanium info\" command.\n\nAs an example, check out the *pending* iOS package.json here: https://github.com/cb1kenobi/titanium_mobile/blob/timob-11869/iphone/package.json. Here's the Android version: https://github.com/cb1kenobi/titanium_mobile/blob/timob-11869/android/package.json.\n\nThe platform specific package.json files are the best place to put this info.\n1) the package.json files are platform specific\n2) they are is easy to parse\n3) they are shipped with the SDK\n4) I've already started integrating it in the CLI\n", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-07-01T23:08:03.000+0000", "updated": "2013-07-01T23:08:03.000+0000" }, { "id": "263424", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "http://studio.appcelerator.com/sdk_info.json", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-26T16:39:37.000+0000", "updated": "2013-07-26T16:39:37.000+0000" }, { "id": "394808", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "We've done a decent job putting supported versions in each platform's {{package.json}}. It's been there since about Titanium SDK 3.0.0, so I'm calling this fixed.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-30T17:27:52.000+0000", "updated": "2016-08-30T17:27:52.000+0000" }, { "id": "415879", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-27T17:39:55.000+0000", "updated": "2017-03-27T17:39:55.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }