Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9148] iOS: commonjs external module compilation broken (build.py -> compile.py in module projects)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-20T09:11:22.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-10 Core
ComponentsiOS
Labelscore, module_build, qe-testadded
ReporterBill Dawson
AssigneeMax Stepanov
Created2012-05-16T09:14:41.000+0000
Updated2012-07-11T13:18:09.000+0000

Description

Broken by commit f9a4f3815ee0 Reproduce: a) Create an iOS module project: titanium create --type=module --name=testmod --id=ti.testmod --platform=iphone --dir=. (I'm assuming there that titanium is aliased to the master branch version of titanium.py -- adjust accordingly if needed.) b) Create a file therein: assets/ti.testmod.js and some code:
exports.hello = function() { return "hello world"; };
c) Run ./build.py. You will see:
Traceback (most recent call last):
  File "./build.py", line 216, in <module>
    compile_js(manifest,config)
  File "./build.py", line 81, in compile_js
    metadata = compiler.make_function_from_file(path,js_file)
AttributeError: 'Compiler' object has no attribute 'make_function_from_file'

Attachments

FileDateSize
ti.testmod.js2012-06-23T16:02:00.000+000053

Comments

  1. Max Stepanov 2012-05-17

    PR pending https://github.com/appcelerator/titanium_mobile/pull/2215
  2. Dustin Hyde 2012-06-23

    Closing as Fixed. SDK: 2.1.0.v20120622174154 Studio: 2.1.0.201206221045 OS: Lion 10.7.4 Xcode: 4.3.2 Devices Tested: iPod 4.3.3, iPad3 5.1.1, iPhone Simulator 5.1 Test Steps 1. Create iOS module. 2. Add attached ti.testmod.js file to /assets/ 3. Build module (either run build.py from command line or package module from studio). Expected Result: Module should build without error.

JSON Source