Skip to content

FSEvents backend for tup monitor#531

Open
LoganDark wants to merge 6 commits into
gittup:masterfrom
LoganDark:fsevents-monitor
Open

FSEvents backend for tup monitor#531
LoganDark wants to merge 6 commits into
gittup:masterfrom
LoganDark:fsevents-monitor

Conversation

@LoganDark
Copy link
Copy Markdown

tup monitor currently does not support macOS; add an FSEvents backend.

@LoganDark

This comment was marked as outdated.

@LoganDark LoganDark marked this pull request as draft April 20, 2026 21:40
@LoganDark LoganDark marked this pull request as ready for review April 20, 2026 23:15
Comment thread src/tup/flock/Tupfile Outdated
@gittup
Copy link
Copy Markdown
Owner

gittup commented May 9, 2026

Overall this looks really good! I'm glad you split out the common stuff into its own file. Do the test cases pass on your machine? When I run it on my mac, the tests that use the monitor fail with things like:

*** create_list:
6
*** Nodes shouldn't have flags set
 *** t7000-move-dir.sh failed

@LoganDark
Copy link
Copy Markdown
Author

I completely neglected the tests -- I'll try to get them all passing on my machine. (will probably affect both my open PRs)

@LoganDark LoganDark marked this pull request as draft May 9, 2026 21:42
@LoganDark
Copy link
Copy Markdown
Author

Now that I've fixed the baseline I can start fixing the monitor-specific tests on top of that baseline.

LoganDark added 3 commits May 12, 2026 07:21
Fixes the autoupdate-on-fail tests t7051 and t7061, and the
synchronization gap that caused the entire t7xxx/t8xxx monitor
suite to fail on macOS. Fixes 56-of-67 originally failing tests
The flag remains useful for the main-loop's event-driven path
but isn't trusted for synchronization. inotify reaches the same
shape by draining its event queue at the yield regardless.
FSEvents doesn't tell us both sides of a rename, so we need to track
inodes in order to be able to tell.
@LoganDark
Copy link
Copy Markdown
Author

LoganDark commented May 12, 2026

FSEvents doesn't provide before/after for renames, only "a rename happened somewhere". I tried to help the rename tests by tracking inodes in the tup db. I'm not sure that's the best solution but it seems to work. Re-running the test suite now to make sure.

I think kqueue may be an option if FSEvents is too difficult, but if most of the tests are passing with this I think it may be fine.

@LoganDark
Copy link
Copy Markdown
Author

Summary of failed tests:
 *** t3083-extra-outputs-bang3.sh failed
 *** t5103-python-sh.sh failed
 *** t8005-variant2.sh failed
 *** t8063-move-variant-dir-monitor.sh failed

(I installed ccache)

That's all the failures with both this and #530. I think that should be acceptable? t8063 might be a tough one, I'll investigate.

@LoganDark LoganDark marked this pull request as ready for review May 12, 2026 16:57
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