Repository navigation
0.4.2: which names changed (fs::watcher); the tests are mtest's - #22
Merged
Merged
Conversation
- fs::watcher: names (files and directories, which need not exist yet) and the ones that changed since the last answer, each once. The system's notice says when and where to look -- inotify (Linux) and kqueue (macOS) by the kernel's calls, ReadDirectoryChangesW (Windows) -- and each name's stamp and identity say what changed; an ok image and Emscripten look when asked. A save by a rename over the file is told by its name. #21. - The tests are mtest's (0.5.2): objects and no main; a test that starts copies of itself declares a child. checks/hosted and checks/emscripten include the same files, watch_test among them. - CI builds with mcpp 2026.11.9.1, under which the package being built stands for itself in its tests' graph. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ged (one Windows write told once) ReadDirectoryChangesW told one write as several completed reads, and a notice naming a file reported it again with its state unchanged. The notifier is now a wait; every system answers from the names' stamp, kind and identity. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…resh fails Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.
Summary
fs::watcher(fs: an event-driven file watch (inotify / FSEvents / ReadDirectoryChangesW) for hot reload #21): names — files and directories, which need not exist yet — and the ones that changed since the last answer, each once and as added. The system's notice says when and where to look (inotify on Linux and kqueue on macOS by the kernel's calls,ReadDirectoryChangesWon Windows); each name's stamp and identity say what changed, so every system answers alike and a notice of another name tells nothing. A save by a rename over the file is told by its name. An ok image and Emscripten have no notice: the watcher looks when asked (notified()false).native_handle()is the descriptor an event loop waits upon on Linux and macOS.main; a test that starts copies of itself declares achild.checks/hostedandchecks/emscripteninclude the same files.Versioned 0.4.2: the watcher is an addition, and consumers pinning 0.4.1 (mtest asks for
^0.4.1) take it unchanged.Tests
watch_test: a write told once; a save by rename; a name made and removed; a directory's entries, and another file's change telling nothing; a wait ending when the change comes; notice and handle per system.x86_64-openkal(no notice),checks/hosted(musl over openkal),checks/emscripten(node): all pass. Compiled forx86_64-windows-gnu,aarch64-macos-musl,aarch64-linux-musl.Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com