Closed arrowd closed 1 year ago
I have exactly the same issue on NetBSD 9.3.
Ah yes, I see the problem. There's no native file watcher on BSD so it's trying to treat the polling file watcher as native. Will put out a patch soon.
FreeBSD has a libinotify-kqueue
library, which implements Linux inotify
interface using FreeBSD native kqueue
. It might have sense to use it for fsnotify
?
Oh that's cool, I was thinking we'd have to do a kqueue
module. Although that might still be a good idea since it would help on Mac too. But in the short term we'll just have this library go back to using polling on BSD.
My efforts to get a FreeBSD VM with a Haskell toolchain aren't going so well, could one of you try doing stack build
with the latest code on master
?
[6 of 7] Compiling System.FSNotify
/usr/home/arr/projects/hfsnotify/src/System/FSNotify.hs:94:22: error:
Not in scope: type variable ‘error’
|
94 | type NativeManager = error "No native file watcher is available on this system. Please use WatchModePoll instead."
| ^^^^^
/usr/home/arr/projects/hfsnotify/src/System/FSNotify.hs:94:28: error:
Illegal type: ‘"No native file watcher is available on this system. Please use WatchModePoll instead."’
Perhaps you intended to use DataKinds
|
94 | type NativeManager = error "No native file watcher is available on this system. Please use WatchModePoll instead."
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Completed 116 action(s).
My efforts to get a FreeBSD VM with a Haskell toolchain aren't going so well
FreeBSD VM can be easily obtained using Vagrant, and to get Haskell just run pkg install hs-stack
.
Aha, that works -- thanks!
This is not strictly required to fix the bug but could you tell me how to increase the resolution of the console for a FreeBSD Virtualbox guest :)? I had started with an image from here before you mentioned Vagrant. I tried several Google suggestions but it's still like 80 chars.
It might be not that easy if the image you downloaded doesn't use UEFI, which is probably the case. It might be faster to get an SSH server:
echo PermitRootLogin yes >> /etc/ssh/sshd_config
echo PasswordAuthentication yes >> /etc/ssh/sshd_config
echo PermitEmptyPasswords yes >> /etc/ssh/sshd_config
sysrc sshd_enable=yes
service sshd start
Thanks! This should be good to go on master
now. Would someone like to try it out before I push to Hackage?
Not FreeBSD, but I've just done a cabal build on master on NetBSD 9.3. No problems with the build. Thanks for fixing this!
Uploaded to Hackage as 0.4.0.1
.
Yep, also builds on FreeBSD. Thanks for fixing this!