aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Watch.zig
AgeCommit message (Collapse)Author
2025-10-30Merge pull request #25763 from mrjbq7/cancelledJohn Benediktsson
rename Cancelled to Canceled
2025-08-07Merge pull request #24661 from alichraghi/spv4Andrew Kelley
spirv: refactor and remove deduplication ISel
2025-08-03Watch: do not fail when file is removedAli Cheraghi
before this we would get a crash
2025-08-02std.Build.Watch: add macOS implementation based on FSEventStreammlugg
Resolves: #21905
2025-07-11Remove numerous things deprecated during the 0.14 release cycleLinus Groh
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-06-23std.Build.Watch: key fanotify file descriptors by mount idKevin Boulain
Since marks are limited to a single filesystem. Context: https://github.com/ziglang/zig/issues/20670 Original pull request: https://github.com/ziglang/zig/pull/20672 Co-authored-by: Maciej 'vesim' KuliƄski <vesim809@pm.me>
2025-06-05std.Build.Watch: not supported on haikuElaine Gibson
2025-04-13std: eradicate u29 and embrace std.mem.AlignmentAndrew Kelley
2025-03-15std.Build.Watch: fix macos implementationLoris Cro
The code did one useless thing and two wrong things: - ref counting was basically a noop - last_dir_fd was chosen from the wrong index and also under the wrong condition This caused regular crashes on macOS which are now gone.
2024-10-24std.Build.Watch: implement removing watches for kqueueAndrew Kelley
2024-10-24std.Build.Watch: limit to one switch on os tagAndrew Kelley
DRY
2024-10-24implement --watch for kqueueAndrew Kelley
it doesn't detect and remove no longer watched things yet it also isn't aware of any file names reported by kqueue. I'm unsure if that functionality exists.
2024-09-25std: fix inappropriate use of unreachable in fanotify_initAndrew Kelley
2024-08-14Watch.zig: fixes for windows implementationJarrod Meyer
Using --watch I noticed a couple of issues with my initial attempt. 1) The index I used as 'completion key' was not stable over time, when directories are being added/removed the key no longer corresponds with the intended dir. 2) There exists a race condition in which we receive a completion notification for a directory that was removed. My solution is to generate a key value and associate it with each Directory.
2024-07-27Watch.zig: add initial windows implementationJarrod Meyer
2024-07-12build runner: refactor fs watch logic for OS abstractionAndrew Kelley
Makes the build runner compile successfully for non-linux targets; printing an error if you ask for --watch rather than making build scripts fail to compile.
2024-07-12std.Build.Watch: add ONDIR to fanotify event maskAndrew Kelley
This makes mkdir/rmdir events show up.
2024-07-12std.Build.Watch: introduce special file "." to watch entire dirAndrew Kelley
And use it to implement InstallDir Step watch integration. I'm not seeing any events triggered when I run `mkdir` in the watched directory, however, and I have not yet figured out why.
2024-07-12std.Build.Watch: gracefully handle fanotify queue overflowAndrew Kelley
2024-07-12std.Build.Watch: make dirty steps invalidate each otherAndrew Kelley
and make failed steps always be invalidated and make steps that don't need to be reevaluated marked as cached
2024-07-12build system: make debounce interval CLI-configurableAndrew Kelley
2024-07-12proof-of-concept --watch implementation based on fanotifyAndrew Kelley
So far, only implemented for InstallFile steps. Default debounce interval bumped to 50ms. I think it should be configurable. Next I have an idea to simplify the fanotify implementation, but other OS implementations might want to refer back to this commit before I make those changes.