{ "id": "110325", "key": "TIMOB-12888", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-02-27T17:12:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:32.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "Using the \"parentModule\" kroll annotation in an Android module allows it to create a namespace hierarchy (e.g. mymodule.database.sql). However, depending on the names that are used for these 'namespaces' the build will fail for the module. This is becoming more important as we create more complex module structures.\r\n\r\nThe error is because the bootstrap.py build script does not always obtain the correct moduleClassName. It needs to get the top-level module classname, but it does this by assuming that entry '0' of the 'keys' hashmap is the module class name (line 376 of bootstrap.py). Since 'keys' is a hashmap (ie. unordered) it is indeterminate what the first entry will be. If entry \"0\" does not happen to be the class name for the top level module then the build will fail. Depending on the names used for the various module names, it is *possible* that entry \"0\" of the map will be the class name for the module, but not likely when multiple parentModule annotations are used.\r\n\r\nThis can be reproduced with a simple module that uses one level of parentModule referencing.\r\n\r\nTo reproduce:\r\n1. Unzip the attached `nsgood.zip` file\r\n2. Build the module (ie. `ant`) -- should build successfully\r\n3. Run the example application (ie. `ant run`). Label should display the value \"999\" that it retrieved from the nested namespace module.\r\n4. Unzip the attached `nsbad.zip` file\r\n5. Build the module -- should fail the build since it thinks the top-level className is 'ti.ns.z.ZModule' instead of 'ti.ns.NSModule'\r\n\r\nNote that the only difference between these two modules is the name of the 2nd level module namespace. In the 'good' version it is \"AModule\" while in the 'bad' version it is \"ZModule\".\r\n", "attachment": [ { "id": "35791", "filename": "nsbad.zip", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-27T18:00:41.000+0000", "size": 12190, "mimeType": "application/zip" }, { "id": "35790", "filename": "nsgood.zip", "author": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-27T18:00:41.000+0000", "size": 11937, "mimeType": "application/zip" } ], "flagged": false, "summary": "Use of parentModule annotation in module fails (Android Modules)", "creator": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jenglish", "key": "jenglish", "displayName": "Jeff English", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK 3.0.0.GA", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }