{ "id": "166027", "key": "TIMOB-24404", "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": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-12-14T19:46:02.000+0000", "created": "2017-02-15T00:05:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-03-14T18:16:26.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "One of the users of the [RxJS|https://github.com/ReactiveX/rxjs] library reported that Appcelarator doesn't define `global.global = global` like node.js does.\r\n\r\nSince node.js doesn't have an official spec, I can't link to this behavior (it's also not documented best I can tell) but it was almost certainly borrowed from the fact that in browsers `window.window = window`--[that's spec'd here|https://html.spec.whatwg.org/multipage/browsers.html#the-window-object].\r\n\r\nSince appcelerator says it has [full node.js support|http://docs.appcelerator.com/platform/latest/#!/guide/Node.js_Support] minus some documented caveats, we were wondering if it would be easy and acceptable to also have `global.global = global`?\r\n\r\nNote that RxJS not the only library using `global.global == global` checks. There are [many|https://www.npmjs.com/package/window-or-global]. It's mostly done to confirm we're not accidentally using a variable that happens to be named `global` but isn't really what we're looking for.\r\n\r\nSeparately, we're going to discuss whether we could relax this check--but I think appcelerator would benefit from defining it regardless, cause others rely on it.\r\n\r\nRxJS issue: https://github.com/ReactiveX/rxjs/issues/2366", "attachment": [], "flagged": false, "summary": "Titanium projects specify \"global.global != global\" different", "creator": { "name": "jphelps", "key": "jphelps", "displayName": "Jay Phelps", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jphelps", "key": "jphelps", "displayName": "Jay Phelps", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 978, "state": "closed", "name": "2017 Sprint 25 SDK", "startDate": "2017-12-03T23:22:15.144Z", "endDate": "2017-12-17T23:22:00.000Z", "completeDate": "2017-12-18T22:32:02.770Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "429535", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9552", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-25T00:00:20.000+0000", "updated": "2017-10-25T00:00:20.000+0000" }, { "id": "431130", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Folded this into my PR here: https://github.com/appcelerator/titanium_mobile/pull/9512\r\n\r\nThis PR cherry-picks Jan's iOS implementation and adds the Android implementation and a test for it. I've contacted [~kiguchi] on Teams to see if he can do the same for Windows.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-11-21T20:47:56.000+0000", "updated": "2017-11-21T20:47:56.000+0000" }, { "id": "432170", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I merged the iOS half of this. There's a couple commits in my PR to do the same for Android. I'll see if I can cherry-pick and merge those without having to wait for the transpile PR.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-12-14T17:54:34.000+0000", "updated": "2017-12-14T17:54:34.000+0000" }, { "id": "432171", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "cherry-picked to it's own PR for android: https://github.com/appcelerator/titanium_mobile/pull/9689", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-12-14T18:00:09.000+0000", "updated": "2017-12-14T18:00:09.000+0000" }, { "id": "432180", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged android PR as well. Windows was already good on this one.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-12-14T19:46:02.000+0000", "updated": "2017-12-14T19:46:02.000+0000" }, { "id": "435598", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.1.0.v20180308150545 & 7.2.0.v20180313125304.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.12\r\nAppc CLI: 7.0.2\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 — Android 6.0.1\r\n⇨ google Nexus 6P — Android 8.0.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-14T18:16:20.000+0000", "updated": "2018-03-14T18:16:20.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }