{ "id": "170812", "key": "DAEMON-222", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [ { "id": "19959", "description": "", "name": "Appc Daemon 1.1.0", "archived": false, "released": true, "releaseDate": "2018-04-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-12T07:24:39.000+0000", "created": "2018-01-17T15:16:31.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "18407", "description": "", "name": "Appc Daemon 1.0.0", "archived": false, "released": true, "releaseDate": "2017-12-05" }, { "id": "20044", "description": "", "name": "Appc Daemon 1.0.1", "archived": false, "released": true, "releaseDate": "2017-12-15" } ], "issuelinks": [ { "id": "56318", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171112", "key": "DAEMON-236", "fields": { "summary": "appcd-plugin: Support wildecard ignore patterns for external plugin auto-reloading", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2018-02-15T06:26:38.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": "15614", "name": "appcd-plugin" } ], "description": "h5.Description\r\n\r\nDeveloping a plugin on Windows is a major pain due to the fswatcher we set up on a plugins directory, for example here is an example of where over a 13 second timespan my plugin would have been reloaded if not for a hack I added to prevent it, in my opinion we should only be reloading a plugin if the conf or dist folders have changed, but I can understand reasons for reloading otherwise. \r\n\r\n{code}\r\n2018-01-17T14:35:19.986Z appcd:core:status CPU: ↓2.5% Heap: ↓36.35 MB / 42.75 MB RSS: ↓63.69 MB Uptime: 0.99m\r\n2018-01-17T14:35:21.631Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:21.634Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:21.679Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:21.682Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:21.827Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n2018-01-17T14:35:21.888Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n2018-01-17T14:35:21.991Z appcd:core:status CPU: ↓2.4% Heap: ↑36.62 MB / 42.75 MB RSS: ↑63.93 MB Uptime: 1.02m\r\n2018-01-17T14:35:23.993Z appcd:core:status CPU: ↓2.3% Heap: ↑36.78 MB / 42.75 MB RSS: ↑64.09 MB Uptime: 1.06m\r\n2018-01-17T14:35:25.998Z appcd:core:status CPU: 2.3% Heap: ↑36.95 MB / 42.75 MB RSS: ↑64.25 MB Uptime: 1.09m\r\n2018-01-17T14:35:26.926Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:26.928Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:26.973Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:26.975Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:27.162Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n2018-01-17T14:35:27.225Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n2018-01-17T14:35:28.001Z appcd:core:status CPU: ↓2.2% Heap: ↓36.30 MB / 42.75 MB RSS: ↓63.60 MB Uptime: 1.12m\r\n2018-01-17T14:35:30.003Z appcd:core:status CPU: ↓2.1% Heap: ↑36.47 MB / 42.75 MB RSS: ↑63.77 MB Uptime: 1.16m\r\n2018-01-17T14:35:32.007Z appcd:core:status CPU: 2.1% Heap: ↑36.65 MB / 42.75 MB RSS: ↑63.95 MB Uptime: 1.19m\r\n2018-01-17T14:35:32.227Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:32.229Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:32.274Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\n2018-01-17T14:35:32.275Z appcd:fswatcher Notifying 1 watcher: C:\\Users\\ewan\\Documents\\git\\appcd-plugin-windows → .git\r\nit changed\r\n{ action: 'change',\r\n filename: '.git',\r\n file: 'C:\\\\Users\\\\ewan\\\\Documents\\\\git\\\\appcd-plugin-windows\\\\.git' }\r\nignore\r\n2018-01-17T14:35:32.491Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n2018-01-17T14:35:32.542Z appcd:fswatcher FS Event: [change] C:\\Users\\ewan\\Documents\\git\\appc-daemon → .git\r\n{code}\r\n\r\nA plugin developer should be able to maintain a list of files/folders to be ignored (and we should have a default set of files/folder to ignore), before reloading the plugin we should inspect this and determine whether we should reload or not.\r\n\r\nI guess this would be achieved by an ignore field we maybe add to the appcd section of the package.json, or it could be the inverse and a user would only declare exactly what they want to trigger a reload\r\n\r\n{code: title=example of ignore}\r\n{\r\n appcd: {\r\n ignore: [ '.git/', 'cache/', 'src/' ]\r\n }\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Plugin: Allow a plugin to register paths to be ignored", "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, "closedSprints": [ { "id": 996, "state": "closed", "name": "2018 Sprint 03 Tooling", "startDate": "2018-01-28T16:24:33.898Z", "endDate": "2018-02-11T16:24:00.000Z", "completeDate": "2018-02-12T04:23:35.987Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "433829", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cbarber] Unit tests for this one are a bit of a PITA on Windows due to how the filesystem events work, for example writing a file in a directory causes two events, the add event comes first but the actual event that makes it to the debounced [onFileSystemChange|https://github.com/appcelerator/appc-daemon/blob/2372162d170abdc5bb1bc95d19150557bfd1c65f/packages/appcd-plugin/src/external-plugin.js#L371-L382] function is actually the change event of the directory, should we be normalizing events in appcd-fswatcher to try and handle these platform differences?\r\n\r\nUpdate: I guess this is partly down to me mis-understanding debounce, from what I understand now it makes sense for the function to be called with the change event, which seems to make me think we do need to normalize these events in fswatcher\r\n\r\n{code}\r\n{ action: 'add',\r\n filename: 'ignoredFile.txt',\r\n file: 'C:\\\\Users\\\\ewan\\\\AppData\\\\Local\\\\Temp\\\\appcd-plugin-test-13708KYVeCDndfVZS\\\\0dlxs2\\\\ignoredFile.txt' }\r\n{ action: 'change',\r\n filename: '0dlxs2',\r\n file: 'C:\\\\Users\\\\ewan\\\\AppData\\\\Local\\\\Temp\\\\appcd-plugin-test-13708KYVeCDndfVZS\\\\0dlxs2' }\r\n2018-01-30T13:30:03.055Z appcd:plugin:path File system change, re-detecting scheme\r\n2018-01-30T13:30:03.058Z appcd:plugin:path Detected no scheme change (PluginScheme)\r\n{ action: 'change',\r\n filename: '0dlxs2',\r\n file: 'C:\\\\Users\\\\ewan\\\\AppData\\\\Local\\\\Temp\\\\appcd-plugin-test-13708KYVeCDndfVZS\\\\0dlxs2' }\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-01-30T13:32:43.000+0000", "updated": "2018-01-30T17:21:54.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }