mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Vfs::commit_event calls StdBackend::unwatch for every removed path, but only the roots passed to watch() are watched. unwatch forwarded every path to notify anyway, and notify's FSEvents backend handles an unwatch by tearing down and restarting its event stream; whatever changed during the restart was never reported. Deleting files while others change (a git checkout, a branch switch) therefore dropped events, and the served tree went stale without any error. Only call the watcher's unwatch for paths that are actually watched. The new test deletes 100 files (calling unwatch on each, as commit_event does) while creating 100 others: before this change macOS reported 1 of the 100 creations, now all 100. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE.txt | ||
| README.md | ||
| README.tpl | ||
memofs
Implementation of a virtual filesystem with a configurable backend and file watching.
memofs is currently an unstable minimum viable library. Its primary consumer is Rojo, a build system for Roblox.
Current Features
- API similar to
std::fs - Configurable backends
StdBackend, which usesstd::fsand thenotifycrateNoopBackend, which always throws errorsInMemoryFs, a simple in-memory filesystem useful for testing
Future Features
- Hash-based hierarchical memoization keys (hence the name)
- Configurable caching (write-through, write-around, write-back)
License
memofs is available under the terms of the MIT license. See LICENSE.txt or https://opensource.org/licenses/MIT for more details.