Commit graph

23 commits

Author SHA1 Message Date
John Benediktsson
74c23a237e
Merge pull request #25763 from mrjbq7/cancelled
rename Cancelled to Canceled
2025-10-30 04:40:13 +00:00
Andrew Kelley
3fb86841cc
Merge pull request #24661 from alichraghi/spv4
spirv: refactor and remove deduplication ISel
2025-08-07 20:55:50 -07:00
Ali Cheraghi
246e1de554
Watch: do not fail when file is removed
before this we would get a crash
2025-08-03 13:16:49 +03:30
mlugg
abf1795337 std.Build.Watch: add macOS implementation based on FSEventStream
Resolves: #21905
2025-08-02 05:13:13 +01:00
Linus Groh
eb37552536 Remove numerous things deprecated during the 0.14 release cycle
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-11 08:17:43 +02:00
Andrew Kelley
0e37ff0d59 std.fmt: breaking API changes
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-07-07 22:43:51 -07:00
Kevin Boulain
640a130651 std.Build.Watch: key fanotify file descriptors by mount id
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-23 06:08:25 +02:00
Elaine Gibson
2cfa0f567d std.Build.Watch: not supported on haiku 2025-06-05 13:45:47 +01:00
Andrew Kelley
f32a5d349d std: eradicate u29 and embrace std.mem.Alignment 2025-04-13 02:20:32 -04:00
Loris Cro
11b49e9002 std.Build.Watch: fix macos implementation
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.
2025-03-15 05:29:54 +00:00
Andrew Kelley
cc671a2d40 std.Build.Watch: implement removing watches for kqueue 2024-10-24 23:31:56 -07:00
Andrew Kelley
8819d8b061 std.Build.Watch: limit to one switch on os tag
DRY
2024-10-24 16:29:02 -07:00
Andrew Kelley
7a46ba73ce implement --watch for kqueue
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-10-24 16:24:56 -07:00
Andrew Kelley
4442288656 std: fix inappropriate use of unreachable in fanotify_init 2024-09-25 16:07:04 -07:00
Jarrod Meyer
9be10ea964 Watch.zig: fixes for windows implementation
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-08-14 13:21:01 -07:00
Jarrod Meyer
2de0e2eca3 Watch.zig: add initial windows implementation 2024-07-27 11:32:43 -04:00
Andrew Kelley
5efcc2e9e7 build runner: refactor fs watch logic for OS abstraction
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-12 14:20:20 -07:00
Andrew Kelley
61d2234743 std.Build.Watch: add ONDIR to fanotify event mask
This makes mkdir/rmdir events show up.
2024-07-12 00:14:08 -07:00
Andrew Kelley
7bccef3e4e std.Build.Watch: introduce special file "." to watch entire dir
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-12 00:14:08 -07:00
Andrew Kelley
956f1ebc70 std.Build.Watch: gracefully handle fanotify queue overflow 2024-07-12 00:14:08 -07:00
Andrew Kelley
001ff7b3b2 std.Build.Watch: make dirty steps invalidate each other
and make failed steps always be invalidated
and make steps that don't need to be reevaluated marked as cached
2024-07-12 00:14:07 -07:00
Andrew Kelley
6f89824c22 build system: make debounce interval CLI-configurable 2024-07-12 00:14:07 -07:00
Andrew Kelley
5ee3971b18 proof-of-concept --watch implementation based on fanotify
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.
2024-07-12 00:14:07 -07:00