{ "id": "82046", "key": "TIMOB-5888", "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": [ { "id": "12085", "description": "Mobile @ HQ", "name": "Sprint 2011-45", "archived": true, "released": true, "releaseDate": "2011-11-14" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-15T15:54:22.000+0000", "created": "2011-10-27T12:53:23.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "stage" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-04T00:17:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "The build system attempts to scan the user's application code for all Ti.includes, then will serialize the contents of those includes into the compiled titanium.js.\r\n\r\nThe problem is when you try to include a file that is dynamically defined:\r\n\r\n{code}\r\nTi.include(path + \"somefile.js\");\r\n{code}\r\n\r\nThe problem takes place in the expand_ti_includes() function of compiler.py. It's important that the function analyzes the filename and determine if it's a valid filename and that the file exists. If it isn't or doesn't exist, don't error, just return. If it does exist, then add it to self.ti_includes[src].\r\n\r\nYou'll have to test this by building a dummy app and creating a dynamic include, then building the mobile web app. You will need to run builder.py from the command line to see any errors.\r\n\r\nYou can open the compiled titanium.js file to confirm the includes have been found and inlined properly at the bottom like this:\r\n\r\n{code}\r\nTi._5.setLoadedScripts({\"shibby.js\": \"Ti.API.log(\\\"hi!\\\");\"});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: Build system does not support dynamic filenames in Ti.includes", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "171593", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This mechanism needs to also work with require() calls.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2011-11-05T11:46:17.000+0000", "updated": "2011-11-05T11:46:17.000+0000" }, { "id": "172357", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/673", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-11T12:23:13.000+0000", "updated": "2011-11-11T12:23:13.000+0000" }, { "id": "172749", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated pull request: https://github.com/appcelerator/titanium_mobile/pull/703 (I accidentally closed the previous pull request while working on TIMOB-6018)", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-15T11:37:01.000+0000", "updated": "2011-11-15T11:37:01.000+0000" }, { "id": "409228", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to MobileWeb no longer being supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-04T00:17:39.000+0000", "updated": "2017-03-04T00:17:39.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }