Skip to content
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

introduce file system watching features to the zig build system #20580

Merged
merged 38 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift click to select a range
908c2c9
std.Build.Cache.Path: add eql method
andrewrk Jul 5, 2024
d2bec8f
delete dead CLI usage code from main.zig
andrewrk Jul 5, 2024
6e025fc
build system: add --watch flag and report source file in InstallFile
andrewrk Jul 5, 2024
26d506c
std.Build: remove the "push installed file" mechanism
andrewrk Jul 5, 2024
6c64090
std.os.linux: fanotify_init, fanotify_mark, name_to_handle_at
andrewrk Jul 9, 2024
deea362
std.Build.Cache.Path: add `subPathOpt` and `TableAdapter`
andrewrk Jul 9, 2024
bbd90a5
build runner: implement --watch (work-in-progress)
andrewrk Jul 9, 2024
c5a4177
std.os.linux: add AT.HANDLE_FID
andrewrk Jul 10, 2024
5ee3971
proof-of-concept --watch implementation based on fanotify
andrewrk Jul 10, 2024
6f89824
build system: make debounce interval CLI-configurable
andrewrk Jul 10, 2024
001ff7b
std.Build.Watch: make dirty steps invalidate each other
andrewrk Jul 10, 2024
e6b6a72
build runner: fix build summary painting over CLI progress
andrewrk Jul 10, 2024
e712ca5
std.os.linux: type safety for fanotify metadata event mask field
andrewrk Jul 10, 2024
956f1eb
std.Build.Watch: gracefully handle fanotify queue overflow
andrewrk Jul 10, 2024
0cc492a
make more build steps integrate with the watch system
andrewrk Jul 10, 2024
d1c14f2
std.Build.Step.WriteFile: extract UpdateSourceFiles
andrewrk Jul 10, 2024
dcbb3aa
std.Build.Cache.Path: fix format function for absolute paths
andrewrk Jul 10, 2024
0994e22
build runner: more useful failure handling for fanotify_mark
andrewrk Jul 10, 2024
26bdc83
std.Build.LazyPath: add getPath3; deprecate getPath2 and getPath
andrewrk Jul 10, 2024
7bccef3
std.Build.Watch: introduce special file "." to watch entire dir
andrewrk Jul 10, 2024
2ebf021
build runner: don't pass a dirfd null to fanotify_mark
andrewrk Jul 10, 2024
b6ed833
build runner: ignore ENOENT of fanotify_mark REMOVE
andrewrk Jul 10, 2024
61d2234
std.Build.Watch: add ONDIR to fanotify event mask
andrewrk Jul 10, 2024
5c3fae3
td.Build.Step.InstallDir: leave hint for wrong cached status
andrewrk Jul 10, 2024
f285640
introduce std.Build.Cache.Manifest.addFilePath
andrewrk Jul 10, 2024
a966eee
std.Build.Step.WriteFile: fix handling of directories
andrewrk Jul 10, 2024
6fcb189
std.Build.Step.WriteFile: remove random bytes from cache hash
andrewrk Jul 11, 2024
2e42969
std.Build.Step.Run: integrate with --watch
andrewrk Jul 11, 2024
dad07fb
std.Build.Cache.Path: fix hash impl on windows
andrewrk Jul 11, 2024
768cb7e
objcopy: use the fatal helper method
andrewrk Jul 11, 2024
818f9cb
std.Build.Step.ObjCopy: remove random bytes from cache hash
andrewrk Jul 11, 2024
fd4d366
std.Build.Cache.Path: fix the format method
andrewrk Jul 11, 2024
a3c20df
integrate Compile steps with file watching
andrewrk Jul 11, 2024
5a34e6c
frontend: add file system inputs for incremental cache mode
andrewrk Jul 12, 2024
67e3e49
Compilation: fix rebase conflict
andrewrk Jul 12, 2024
4f9a8b6
update build system unit test
andrewrk Jul 12, 2024
f77b43d
zig build: add a --debug-target CLI flag
andrewrk Jul 12, 2024
5efcc2e
build runner: refactor fs watch logic for OS abstraction
andrewrk Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update build system unit test
need to add another field to initialize now
  • Loading branch information
andrewrk committed Jul 12, 2024
commit 4f9a8b68430b9b44cba78664bd0f60d5c5db5fe3
1 change: 1 addition & 0 deletions lib/std/Build/Step/Options.zig
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 523,7 @@ test Options {
.query = .{},
.result = try std.zig.system.resolveTargetQuery(.{}),
},
.zig_lib_directory = std.Build.Cache.Directory.cwd(),
};

var builder = try std.Build.create(
Expand Down