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
Evidently this no longer works in MobileWeb. We need to fix this in _both_ the Python and Node.JS CLI scripts
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.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/3035
Closing ticket as fixed.