Skip to content

0.4.2: which names changed (fs::watcher); the tests are mtest's - #22

Merged
Sunrisepeak merged 3 commits into
mainfrom
os-0.4.2
Nov 9, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
os-0.4.2

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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, ReadDirectoryChangesW on 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.
  • 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.
  • CI builds with mcpp 2026.11.9.1, under which the package being built stands for itself in its tests' graph (mtest uses mcpplibs.os).

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.
  • CI with the released mcpp 2026.11.9.1: every row passes, hosted macOS included (a Mach-O image now links its C library first, so the cases' registration runs after openkal-musl is up).
  • Run locally: native Linux, x86_64-openkal (no notice), checks/hosted (musl over openkal), checks/emscripten (node): all pass. Compiled for x86_64-windows-gnu, aarch64-macos-musl, aarch64-linux-musl.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 3 commits November 9, 2026 13:24
- 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>
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.

1 participant