{ "id": "130509", "key": "TIMOB-16984", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-23T17:18:28.000+0000", "created": "2014-05-15T12:36:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [ { "id": "37699", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "130425", "key": "ALOY-1015", "fields": { "summary": "LiveView: Ti.include statements not supported", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "37955", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "131013", "key": "TIMOB-17040", "fields": { "summary": "iOS: Relative path for Window URL does not work ", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-12T20:22:23.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "The Ti.include method was a solution fit for another time in Titanium's history. That time has long since gone. Too many newbies are using Ti.include as if it is the correct pattern to develop their apps against.\r\n\r\nThe only reason against deprecation is that some older apps still use Ti.include. However using this as a reason only serves to increase the number of apps this will affect.", "attachment": [], "flagged": false, "summary": "TiAPI: Deprecate Ti.include", "creator": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "environment": "All", "comment": { "comments": [ { "id": "305161", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-15T19:37:40.000+0000", "updated": "2014-05-15T19:37:40.000+0000" }, { "id": "305467", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering for further evaluation and prioritization. This ticket was originated based on the community discussion around relevance of Ti.include.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-19T06:51:31.000+0000", "updated": "2014-05-19T06:51:31.000+0000" }, { "id": "305479", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-05-19T09:17:03.000+0000", "updated": "2014-05-19T09:17:03.000+0000" }, { "id": "311484", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bhatfield] does anything else need to be done to show this as \"deprecated\" in Studio warnings?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-28T09:45:21.000+0000", "updated": "2014-06-28T09:45:21.000+0000" }, { "id": "312926", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\"Titanium.include\" shows as deprecated in Studio content assist.\r\n\"Ti.include\" does not show any content assist.\r\n\r\nBoth \"Ti.include\" and \"Titanium.include\" do not show anything in console during build or app run.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-08T23:27:17.000+0000", "updated": "2014-07-08T23:27:17.000+0000" }, { "id": "314571", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on\r\nTitanium SDK: 3.3.0.v20140711123603\r\nAppC Studio: 3.3.0.201407111535\r\n\r\nThe content assist shows deprecated for both Ti.include and Titanium.include.\r\n\r\nHowever, no deprecated message is shown in console when app is build and run on Android or iOS.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-17T05:38:51.000+0000", "updated": "2014-07-17T05:38:51.000+0000" }, { "id": "314646", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Maybe it is too late. But this depreciation really effects the ability to use third party JS libraries. Of course they can be wrapped, but by depreciating an include mechanism it means the \"original\" file needs to be edited. At present I can Ti.include a third party JS library into my own commonJS module and then happily write over the third party library when ever updates are released.\r\n\r\nI am not sure how policing against bad user coding in this one particular instance helps.", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2014-07-17T13:44:05.000+0000", "updated": "2014-07-17T13:44:05.000+0000" }, { "id": "314647", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "BTW I understand the currently problems with Ti.include but fixing those and making it a true include would be better. Maybe something in alloy that acts more like a c-preprocessor would be the way to go", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2014-07-17T13:54:05.000+0000", "updated": "2014-07-17T13:54:05.000+0000" }, { "id": "318248", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Ti.include() should have never existed. If you really, really need similar functionality, then consider a workaround like this:\r\n\r\n{code}\r\nfunction include(file) {\r\n return eval(Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, file).read().text);\r\n}\r\n{code}\r\n\r\nI believe that Ti.include() evaluates scripts globally whereas this workaround should only be scoped to your module unless it is run from the app.js.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-08-12T18:46:30.000+0000", "updated": "2014-08-12T18:46:30.000+0000" }, { "id": "318252", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "Thank you Chris. I completely agree that the included script should not be imported into the global space and this work around does the trick. What I was suggesting was for Ti.include to be fixed to work like this rather than how it did originally", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2014-08-12T18:59:05.000+0000", "updated": "2014-08-12T18:59:05.000+0000" }, { "id": "318273", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ndastur], I was waiting for dev response to your comment. Since this feature was implemented and validated, we were waiting until the end of the cycle to close. I noticed your comment as I was about to do that. I will close this ticket now, but if you feel there would be benefit from an improvement in this area, please write a new improvement or feature ticket. Thanks, your friendly QE team.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-12T20:22:14.000+0000", "updated": "2014-08-12T20:22:14.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }