Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15899] CLI: Help message when attempting to build with missing SDK is inaccurate

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-01-20T22:24:43.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2014 Sprint 02, 2014 Sprint 02 Core, Release 3.2.3, Release 3.3.0
ComponentsCLI
Labelsqe-testadded
ReporterTony Lukasavage
AssigneeChris Barber
Created2013-12-05T15:43:55.000+0000
Updated2014-03-25T23:11:20.000+0000

Description

problem

When attempting to run ti build against a project for which the sdk-version in the tiapp.xml is not installed, you get this helpful message to guide you to building properly:
[ERROR] Unable to compile project because the 'sdk-version' in the tiapp.xml is not installed

The project's sdk-version is currently set to 3.2.0.v20130624174155, which is not installed.

Update the sdk-version in the tiapp.xml to one of the installed Titaniums SDKs:
    2.1.0
    2.1.0.GA
    3.0.2.GA
    3.1.0.GA
    3.1.1.GA
    3.1.2.GA
    3.1.3.GA
    3.2.0
    3.2.0-old
    3.3.0
or run 'titanium sdk install 3.2.0.v20130624174155' to download and install Titanium SDK 3.2.0.v20130624174155
However, when targeting a CI build for installation, it will indicate that the version does not exist. So when I run titanium sdk install 3.2.0.v20130624174155, I get this output:
[ERROR] Release "3.2.0.v20130624174155" does not exist

Did you forget to specify the branch?

Available Releases:
    3.1.3.GA      2.1.2.GA      1.8.0.1       1.6.0         1.2.0         0.6.0
    3.1.2.GA      2.1.1.GA      1.7.5         1.5.1         1.1.2         0.5.0
    3.1.1.GA      2.1.0.GA      1.7.3         1.5.0         1.1.1         0.4.2
    3.1.0.GA      2.0.2.GA      1.7.2         1.4.2         1.0.0         0.4.1
    3.0.2.GA      2.0.1.GA2     1.7.1         1.4.1.1       0.9.3
    3.0.0.GA      2.0.1.GA      1.7.0         1.4.1         0.7.1
    2.1.4.GA      1.8.2         1.6.2         1.4.0         0.6.2
    2.1.3.GA      1.8.1         1.6.1         1.3.0         0.6.1
If you attempt to specify the install with --branch it will fail with this error, expecting an actual branch name (duh):
[ERROR] Branch "3.2.0.v20130624174155" does not exist

Available Branches:
    master     3_1_X      2_1_X      1_8_X      1_6_X      1_4_X
    3_2_X      3_0_X      2_0_X      1_7_X      1_5_X

expected

The CLI installs the CI version of the SDK that is specified, which it should be able to determine simply by parsing the version of the SDK given. If the CLI can not download and install this directly, instructions for downloading and installing CI builds should be given, rather than the inaccurate output that is given now.

Comments

  1. Chris Barber 2013-12-05

    --branch is not a flag, it's an option. It expects a value, like 3_2_X. If you run titanium sdk install 3.2.0.v20130624174155 --branch 3_2_X you will see that 3.2.0.v20130624174155 no longer exists because the CI server prunes old builds. I believe this is not a bug, that things are working as designed, and that this ticket should be resolved won't fix. However I could slightly improve the user experience by scanning all branches for that build and auto select that branch, so I will not resolve this as won't fix until I discuss with [~ingo]. If the version is too old, then you'll see a similar error to what you see today.
  2. Tony Lukasavage 2013-12-05

    I never said --branch was a flag and stated in my final sentence that I knew it expected a branch name, so there's no confusion there. I don't have an issue with the CLI not being able to pull CI builds automatically, though that would be a nice improvement, and I agree that that aspect is definitely not a bug. My issue is specifically with the fact that the CLI says:
       or run 'titanium sdk install 3.2.0.v20130624174155' to download and install Titanium SDK 3.2.0.v20130624174155
       
    which results in an error when you run it, which to me is the bug. If the CLI is not able to automatically pull the CI build (since that sounds like a bit of work), it would be good if when ti sdk install is called with a CI version that either that message is not shown, or a more accurate message that doesn't result in an error is printed.
  3. Chris Barber 2014-01-08

    Master pull request: https://github.com/appcelerator/titanium/pull/92 3.2.x pull request: https://github.com/appcelerator/titanium/pull/93
  4. Allen Yeung 2014-01-20

    To test: Run 'titanium sdk install ' where sdk_version is a version from the CI page. An example format would be: 3.2.1.v20140117222448
  5. Pragya Rastogi 2014-03-24

    This issue is still reproducible with CLI:3.2.1 using Environment: OSX: 10.9.2 Xcode: 5.1 Appcelerator Studio: 3.2.3.201403190645 SDK: 3.2.3.v20140322210914 acs:1.0.14 alloy:1.3.1 npm:1.3.2 titanium:3.2.1 titanium-code-processor:1.1.0 But this issue is fixed for CLI: 3.3.0, hence not closing this.
  6. Samuel Dowse 2014-03-25

    Verified fixed on: Mac OSX 10.9.2 Appcelerator Studio, build: 3.2.3.201403250634 Titanium SDK, build: 3.2.3.v20140325145222 CLI: 3.2.3-dev Alloy: 1.3.1 Ran Allens test case using the latest available SDK and successfully installed the SDK. Closing.

JSON Source