[TIMOB-26180] Android: CLI does not provide useful information when a selected buildTools version is not installed
GitHub Issue | n/a |
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-07-28T16:24:32.000+0000 |
Affected Version/s | Release 7.1.1, Release 7.2.0 |
Fix Version/s | Release 7.5.0 |
Components | Android, CLI |
Labels | ux |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2018-07-03T14:58:08.000+0000 |
Updated | 2018-09-05T14:57:04.000+0000 |
Description
Description
In AC-5789, the android.buildTools.selectedVersion
config setting was set to a version that was not installed, this then led to the CLI outputting a confusing error that the version was unsupported/missing required tools. This error could be improved to push an issue stating that the version set in the config is not installed, which can then be asserted in the build process.
Steps to reproduce
Run appc ti config android.buildTools.selectedVersion 22.0.1
Run appc ti info
Actual
Everything looks like that version is installed
Expected
If a selected version is not installed, then we should make it move obvious
Comments
JSON Source
[~eharris], For your info, 7.3.0 will log the supported versions in parenthesis if a tool is missing or too old. Have a look at step 12 in the link below... https://github.com/appcelerator/node-titanium-sdk/pull/28 Although I'm sure there are other areas that can be improved as well.
[~jquick] Yeah I'd seen that while tracking down the users issue, it's much more valuable than the output pre-7.3.0 :) I'm thinking here to split apart the existing code into 3 sections, and adding two new error codes, to provide more detailed output about what the problem is to the user, and possible solutions (if any) - Split the buildTools.supported check from [here](https://github.com/appcelerator/node-titanium-sdk/blob/bb0a93a33fd2999a65950a1fce8955e3b3103c1f/lib/android.js#L465) into a separate check that adds a "Unsupported version" (intentionally avoiding too old) - Edit the missing tools check changing to
if (missing.length && results.sdk.buildTools.supported)
, only listing that we're missing tools if we support the build tools - Rework [this code](https://github.com/appcelerator/node-titanium-sdk/blob/bb0a93a33fd2999a65950a1fce8955e3b3103c1f/lib/android.js#L830-L834) to add a way to determine if a user has told us to use something they've not installed, and then bubble this up through issues as a "selected version not installed" error, with some possible solutions (just install it, how to remove the setting etc.), again this would cause the build to error I'm thinking all of these should cause build failures, but 1 & 3 will need the build process updating to do so. I'll be sure to assign you as reviewer on this when I make the PR so the above might make more sense :)Sounds good. Looking forward to what you come up with. :)
node-titanium-sdk: https://github.com/appcelerator/node-titanium-sdk/pull/39 titanium_mobile: https://github.com/appcelerator/titanium_mobile/pull/10154
*Closing ticket.* Tested using steps provided in the PR [here](https://github.com/appcelerator/node-titanium-sdk/pull/39) The messages are displayed giving more information when build tools are not installed or supported. The fix is present in SDK: {noformat} 7.5.0.v20180904155047 {noformat} *ENV* {noformat} Appc NPM: 4.2.13 Appc CLI: 7.0.6 Ti CLI: 5.1.1 Node: 8.9.4 NPM: 6.3.0 {noformat}