Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9294] iOS: Module build warning when commonjs file present

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-12T03:23:43.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-11 Core
ComponentsiOS
Labelscore, module_build, qe-testadded
ReporterBill Dawson
AssigneeReggie Seagraves
Created2012-05-29T10:08:56.000+0000
Updated2012-07-13T16:05:13.000+0000

Description

Fail case / Test case

* In Terminal, execute the following:
python [path_to_mobile_sdk]/titanium.py create --type=module --platform=iphone --name=testmod --id=ti.testmod --dir=.
* After the test module project is created, create a file within it: assets/ti.testmod.js. Inside the file just put a simple exports statement such as:
exports.hello = function() {return "hello from test module";};
* In the module project folder, run python build.py to build the module. During the build process, you should notice a warning similar to this (though build is allowed to continue):
Users/bill/tmp/mods/barker/Classes/TiBarkerModuleAssets.m:29:9: warning: implicit declaration of function 'filterDataInRange' is invalid in C99 [-Wimplicit-function-declaration]
        return filterDataInRange([NSData dataWithBytesNoCopy:data length:sizeof(data) freeWhenDone:NO], ranges[0]);
               ^
In my fix branch, you shouldn't see that warning.

Comments

  1. Bill Dawson 2012-05-29

    PR ready: https://github.com/appcelerator/titanium_mobile/pull/2285
  2. Olga Romero 2012-07-02

    Verified fix with Titanium Studio, build: 2.1.1.201206291424 Titanium SDK: 2.1.0.v20120628121617 Mac OS X Lion 10.7.4
  3. Anshu Mittal 2012-07-12

    Reopening to update labels.

JSON Source