{ "id": "176258", "key": "TIMOB-28510", "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": "21243", "description": "", "name": "Release 10.0.2", "archived": false, "released": true, "releaseDate": "2021-08-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-08-06T09:08:15.000+0000", "created": "2021-07-22T11:03:20.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regress" ], "versions": [ { "id": "21191", "name": "Release 9.3.2", "archived": false, "released": true, "releaseDate": "2021-02-11" }, { "id": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "issuelinks": [ { "id": "59306", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "175922", "key": "TIMOB-28297", "fields": { "summary": "iOS: swift files doesn't recognize macros defined in defines.h", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2021-08-06T09:08:27.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": [], "description": "h5.Description\r\n\r\n_There are probably other cases that cause this, like comments_\r\n\r\nIf a string starts with {{Ti}} or {{Titanium}} then it will be detected as Titanium API usage and be inserted into the TI_SYMBOL_MACROS definition. This will then cause a compile error like below if the string is not compatible\"\r\n\r\n{code}\r\n[TRACE] error: conditional compilation flags must be valid Swift identifiers (rather than 'ISSUE?')\r\n[TRACE] error: conditional compilation flags must be valid Swift identifiers (rather than 'ISSUE?TOUPPERCASE')\r\n{code}\r\n\r\nI think this fix will have two parts:\r\n\r\n* Firstly, improve the detection of API usage in the babel plugin we use\r\n* Secondly, when mapping the symbols, reject any that do not match the format we expect\r\n\r\n{code:js}\r\nconst win = Ti.UI.createWindow();\r\nwin.add(Ti.UI.createLabel({\r\n text: 'Ti In A String Causes Issues?'.toUpperCase()\r\n}));\r\nwin.open();\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Add the above code to an existing app\r\n2. Build for {{-p ios -T dist-appstore}}\r\n\r\nh5.Actual\r\n\r\nCompile error\r\n\r\nh5.Expected\r\n\r\nNo compile error", "attachment": [], "flagged": false, "summary": "iOS: API detection causes strings starting with Ti or Titanium to be inserted as Ti Symbol Macros", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "comment": { "comments": [ { "id": "458886", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Note: \"Ti In A String Causes Issues?\" isn't an issue, but \"Ti In A String Causes Issues?\".toUpperCase() is\r\n\r\nThis can also be reproduced by building ks-v2 to device", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-07-22T12:36:19.000+0000", "updated": "2021-07-22T13:48:59.000+0000" }, { "id": "458887", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "node-titanium-sdk PR: https://github.com/appcelerator/node-titanium-sdk/pull/451", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-07-22T14:22:58.000+0000", "updated": "2021-07-22T14:22:58.000+0000" }, { "id": "458904", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "titanium_mobile PR: https://github.com/appcelerator/titanium_mobile/pull/12985", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-07-26T08:05:42.000+0000", "updated": "2021-07-26T08:05:42.000+0000" }, { "id": "458963", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Merged to master and 10_0_X", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-08-06T09:08:27.000+0000", "updated": "2021-08-06T09:08:27.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }