-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Extracted from #20580.
The build runner already communicates with its parent process, for example when encountering an unfulfilled lazy dependency, it writes that information to a special file, and then exits, relying on the zig build process to rerun the build runner after fetching those needed dependencies.
Side note: that special file is currently communicated as a temp file, but that could be better done with a pipe instead, similar to how the new std.Progress implementation works.
This issue is to further enhance this relationship to also have the build runner request its own file system inputs from the parent process, so that it can incorporate those when polling on file system changes. When it encounters those files being changed, it would signal to the parent process that it wants to be rerun, and then exit.
As a result, it means that zig build --watch becomes enhanced to also watch the build.zig script itself and any files it depends on, the build runner itself recompiled and rerun in response to any edits.
Related: