Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use polling as a generic fallback #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amesgen
Copy link

@amesgen amesgen commented Jan 25, 2023

Right now, using polling as a fallback if no native watcher is available is only done for BSDs, but I think there is no reason to not simply extend this fallback to all platforms other than Linux, macOS and Windows.

As a motivating example, the WASI target (see the GHC WASM backend) does not provide a native file watching interface. With this patch, fsnotify compiles just fine on that backend, by using the generic polling fallback.

@thomasjm
Copy link
Contributor

As a motivating example, the WASI target (see the upcoming GHC WASM backend does provide a native file watching interface.

You mean it doesn't ?

This seems good to me, we just have to be a careful not to break *BSD since we don't test those in CI.

@thomasjm
Copy link
Contributor

thomasjm commented Nov 5, 2024

This is looking good, just let me know when you're ready for review!

@amesgen
Copy link
Author

amesgen commented Nov 5, 2024

This is looking good, just let me know when you're ready for review!

Thanks, should be ready for review 👍

Also happy to try to set up a CI for WASM if that is desired

@amesgen amesgen force-pushed the generic-polling-fallback branch from c98e8de to f33d5fc Compare November 5, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants