chore(fs): build kqueue instead of fsevents watcher on iOS (#9950)
### Purpose On iOS, the FSEvents API for watching files (also used on macOS) is not available, but `kqueue` is. This PR ensures `kqueue` support is built on iOS instead of the FSEvents based watcher implementation. Before this PR, you could already use the `kqueue` build option to force its usage. Unfortunately `gomobile`, the tool that I use to build Syncthing for iOS and macOS for Synctrain, does not support setting different build flags for iOS and macOS (unless I build separately for each, which is a bit of a hassle because XCode nonsense). I am assuming there are good reasons to support FSEvents even though `kqueue` is also available on macOS (but I'm not sure why?). I do know FSEvents has been working fine for me on macOS so it seems best to use FSEvents on macOS and kqueue on iOS. Note that this also requires https://github.com/syncthing/notify/pull/4 to be merged in `synchting/notify` (until that is done, this PR will fail to build on iOS due to `notify` still trying to link to `fsevents` stuff when the `kqueue` build flag is not set). ### Testing I compiled both `syncthing/notify` and syncthing with this PR applied, and used that to successfully build the Synctrain iOS app, which after this PR works fine and should follow up file changes a bit quicker. ### Screenshots n/a ### Documentation n/a ## Authorship Your name and email will be added automatically to the AUTHORS file based on the commit metadata. --------- Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
co-authored by
Jakob Borg
parent
87c16c6cf5
commit
28f0cffdb6
@@ -32,7 +32,7 @@ require (
|
||||
github.com/rabbitmq/amqp091-go v1.10.0
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
|
||||
github.com/shirou/gopsutil/v4 v4.25.1
|
||||
github.com/syncthing/notify v0.0.0-20210616190510-c6b7342338d2
|
||||
github.com/syncthing/notify v0.0.0-20250207082249-f0fa8f99c2bc
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
|
||||
github.com/thejerf/suture/v4 v4.0.6
|
||||
github.com/urfave/cli v1.22.16
|
||||
|
||||
Reference in New Issue
Block a user