{ "id": "172687", "key": "DAEMON-268", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [ { "id": "20081", "description": "", "name": "Appc Daemon 2.0.0", "archived": false, "released": true, "releaseDate": "2018-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-14T15:49:13.000+0000", "created": "2018-11-30T17:33:10.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2018-12-14T15:49:13.000+0000", "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" } }, "components": [ { "id": "15050", "name": "appcd-core", "description": "Core daemon logic: config, plugin loader, logging, dispatcher" }, { "id": "15619", "name": "appcd-util" } ], "description": "In Node.js 11, they've removed {{timer_wrap}} which we use in {{appcd-util}} to get the {{Timer}} prototype and detect active timers.\r\n\r\nNode.js 11 has also deprecated {{process.binding()}} (https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V11.md#notable-changes-3), so we won't be able to get {{fs_event_wrap}} to get a ref to the {{FSEvent}} prototype.\r\n\r\nIt's probably also a matter of time before {{process._getActiveHandles()}} is removed too.\r\n\r\nA potential solution is to use [async hooks|https://nodejs.org/api/async_hooks.html] (introduced in Node.js 8.1.0). However, since async hooks must be explicitly enabled, we need to API.\r\n\r\nThis ticket proposes a new class {{HandleWatcher}} that lives in {{appcd-util}}. It would use async hooks as well as {{process._getActiveHandles()}} when either are available. This class would be created by the {{appcd-core}} {{Server}} instance and facilitate the closing of any open handles.\r\n\r\nThe {{appcd-util}} function {{getActiveHandles()}} will likely need to be deprecated.\r\n\r\nNote that since the core process runs as Node.js 10.13.0, we have some time to figure this out.\r\n\r\nAlso, Node.js 11 changed {{setImmediate()}} and caused {{tailgate()}} to not work correctly. Simply need to stop forcing asynchronous execution of the tailgate callback.", "attachment": [], "flagged": false, "summary": "appcd-util: Add support for Node.js 11", "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": "444115", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "https://github.com/appcelerator/appc-daemon/pull/347", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-01T06:01:38.000+0000", "updated": "2018-12-01T06:01:38.000+0000" }, { "id": "444335", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "It's also worth noting this is preventing the AMPLIFY CLI from supporting Node.js 11.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-07T18:35:40.000+0000", "updated": "2018-12-07T18:35:40.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }