Restore configurability to filesystem watchers…#1572
Open
savetheclocktower wants to merge 2 commits into
Open
Conversation
…and add `@parcel/watcher` as an option. The existing `nsfw` watcher is kept as the default, but is moved into a worker process to match the approach used by `@parcel/worker`. Having the file-watcher in a separate process offers some upsides, including: * Not having to import a library into the renderer with a native add-on * Being able to use hypothetical file-watching libraries that do not explicitly support Electron, including ESM-only libraries * Greater control of event reporting — i.e., batching even when the watcher implementation does not support it natively
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…and add
@parcel/watcheras an option.This is #1299 with a cleaner commit history and a few minor changes.
The existing
nsfwwatcher is kept as the default, but is moved into a worker process to match the approach used by@parcel/worker.Having the file-watcher in a separate process offers some upsides, including:
This file-watcher implementation preserves all the theoretical ability to respect
core.ignoredNames, but does not actually flip it on (since that would break backward-compatibility). I could not bear to rip it out. This is the direction in which we should be moving anyway, eventually.The upside here is that, when a user reports difficulties with file-watching, we've got a built-in second implementation that we can suggest. (”Switch
core.fileSystemWatcherto the@parcel/watcheroption and see if that helps.“) Eventually we envision that@parcel/watcherwill be the new default, just as it is in VS Code.