Skip to content

Build Runner: Implement File System Watching on Windows #20598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrewrk opened this issue Jul 13, 2024 · 0 comments · Fixed by #20667
Closed

Build Runner: Implement File System Watching on Windows #20598

andrewrk opened this issue Jul 13, 2024 · 0 comments · Fixed by #20667
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jul 13, 2024

Extracted from #20580.

Most of the file system watching mechanism is abstracted across operating systems, however, the parts that deal with receiving events from file system changes require OS-specific implementations.

else => @compileError("unimplemented"),

This issue is for the Windows implementation.

Probably the first thing to try will be using the FindFirstChangeNotificationW API. This should fit nicely into the existing abstraction because the Linux implementation is also based on processing events for directories.

WaitForMultipleObjects is famously limited to only 64 objects. I think that an initial version having this limitation would be fine, but then more advanced techniques will be needed to overcome this limitation, such as https://devblogs.microsoft.com/oldnewthing/20220406-00/?p=106434

Related:

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. zig build system std.Build, the build runner, `zig build` subcommand, package management labels Jul 13, 2024
@andrewrk andrewrk added this to the 0.14.0 milestone Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant