[TIMOB-7001] IOS pure js module - build.py fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-25T10:14:27.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2012-01, Release 2.0.0, Release 1.8.1, Sprint 2012-06 |
Components | iOS |
Labels | module_module, qe-ios031912, qe-testadded |
Reporter | Hilko Lantinga |
Assignee | Stephen Tramer |
Created | 2011-12-25T09:30:20.000+0000 |
Updated | 2012-03-28T14:36:04.000+0000 |
Description
I've seen people have troubles on Lion with the SDK in ~/Library, so I've checked it on Snow Leopard as well (SDK in /Library). Same problem.
Problem is very easy to reproduce:
1) titanium create --platform=iphone --type=module --dir=~/Documents/ --name=test --id=com.test
2) cd ~/Documents/test
3) ./build.py
->
BUILD SUCCEEDED
4) create ~/Documents/test/assets/com.test.js
5) ./build.py
->
Traceback (most recent call last):
File "./build.py", line 196, in
compile_js(manifest,config)
File "./build.py", line 77, in compile_js
metadata = Compiler.make_function_from_file(path,js_file)
TypeError: make_function_from_file() takes exactly 4 arguments (3 given)
After doing some more testing it does work with setting TITANIUM_SDK_VERSION = 1.7.5 in titanium.xconfig. All newer versions fail (1.8.0.1 and 1.9.0.vxxxxx).
This is an issue when building with 1.8.0.1 that I resolved as part of another set of bugs... going to link the tickets together.
Closing issue Tested with Ti Studio 1.0.8.201201101928 Ti Mob SDK 1.9.0.v20120111233134 OSX Lion Expected behavior of module being built successfully following provided steps is shown
Reopening and closing this issue to update label and Fix Version field.
updated labels
Reopening issue Tested with Ti Studio build 2.0.0.201203211914 Ti Mob SDK 2.0.0.v20120321231752 hash r1527faa2 OSX Lion 10.7.3 Used the same test steps in the ticket and received the following error (before/after updating titanium.xcconfig) Traceback (most recent call last): File "./build.py", line 9, in
*NOTE*: For testing with OS X 10.7 you will also need to edit the
titanium.xcconfig
file to point to the correct SDK install (use ~/Library instead of /Library)Tested with 10.7.3 and 10.6.8 systems. Noticed the change in the titanium.xcconfig that added the "~". While building on Lion works as expected, building on 10.6.8 fails with: Traceback (most recent call last): File "./build.py", line 217, in
This is a testing failure. The SDK is not *always* located at
/Library
or~/Library
, it's located where the SDK is installed (these are just the default locations). For some machines this will be a nonstandard location, which may include some QE test machines. A more accurate description of how to modify thetitanium.xcconfig
is: > *TITANIUM_SDK_VERSION MUST POINT TO THE VERSION THE MODULE IS INTENDED TO BE BUILT WITH* > *TITANIUM_SDK MUST POINT TO THE LOCATION OF THE INSTALLED SDK* (This is usually the Ti Studio->Preferences->Titanium Studio->Titanium->Titanium SDK Home value provides the base path, the remainder is expected to always bemobilesdk/osx/$(TITANIUM_SDK_VERSION)
) Ingo, myself, and all functional test reviewers have all confirmed the fix at various SDK install paths. While leaving these instructions I tested by installing at a nonstandard location/opt
and configuring thetitanium.xcconfig
as above.Also be aware that Ingo has filed ticket TIMOB-8288 to add automatic SDK detection to module creation.
Verified fixed with SDK 2.0.0.v20120328000206. Checked 10.6.8 and 10.7.3 and both could create and build with no change to the titanium.xcconfig path.