Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11041] MobileWeb: Default to Latest Version of a Module

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-25T21:23:50.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0, Sprint 2012-20 JS, 2012 Sprint 20
ComponentsMobileWeb
Labelsregression
ReporterDawson Toth
AssigneeChris Barber
Created2012-09-21T09:36:42.000+0000
Updated2017-03-09T01:05:35.000+0000

Description

Feature

If two versions of a module are available, and a tiapp.xml doesn't specify a version, the latest version should be chosen.

Current Behavior

Right now the tooling sorts modules alphabetically, so the earliest version of a module will be used rather than the most recent.

Test

Unzip the attached modules.zip in to your /Library/Application\ Support/Titanium/ directory, then:
    <modules>
    	<module>ti.cloud</module>
    </modules>
and
require('ti.cloud').hi();
It will alert the version of the module in use. You can also predict which module will be used based on the output of iphone/builder.py: {quote} [DEBUG] Detecting modules in /Volumes/Code/play/modules [DEBUG] Detecting modules in /Library/Application Support/Titanium/modules [DEBUG] Detected module for commonjs: ti.cloud 2.0 @ /Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.0 [DEBUG] Detected module for commonjs: ti.cloud 2.1 @ /Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.1 [DEBUG] Looking for Titanium Module id: ti.cloud, version: , platform: {quote} The order in which the modules are detected are the order in which they will be used if no version is specified.

Pull Request

https://github.com/appcelerator/titanium_mobile/pull/1650

Comments

  1. Ingo Muschenetz 2012-09-21

    Evidently this no longer works in MobileWeb. We need to fix this in _both_ the Python and Node.JS CLI scripts
  2. Chris Barber 2012-09-21

    This has been fixed in the new CLI. I think I fixed this 6 days ago in this commit: https://github.com/appcelerator/titanium_mobile/commit/6825f7208a0fdf4ee5744634a9446095cef66dda#diff-2. If you could, please check a master CI build to see if this is still happening.
  3. Chris Barber 2012-09-24

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/3035
  4. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source