Alex Rønne Petersen
bbacf42837
std.Io.test: disable flaky Group.concurrent test on linux w/o libc
...
https://codeberg.org/ziglang/zig/issues/30096
2026-01-05 12:52:18 +01:00
Michael Dusan
31a6e83a7c
openbsd: fix Io.Threaded bitrot
2026-01-05 11:28:57 +01:00
Gregory Mullen
29b9e24df7
add tls.ExtensionType.quic_transport_parameters = 57
2026-01-05 11:26:17 +01:00
Andrew Kelley
435cd6f129
Merge pull request 'std.Build: adjust temp files API' ( #30683 ) from std.Build-temp into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30683
2026-01-05 06:02:25 +01:00
Jake Greenfield
8e091047b5
std.Io.Threaded: fix Windows env var mapping
...
Windows environment variables are case-insensitive, so the special Wtf16
comparison needs to be used, or PATH/PATHEXT might be missed.
2026-01-04 23:32:36 -05:00
Andrew Kelley
b4dbe483a7
std.Build: adjust temp files API
...
Remove the RemoveDir step with no replacement. This step had no valid
purpose. Mutating source files? That should be done with
UpdateSourceFiles step. Deleting temporary directories? That required
creating the tmp directories in the configure phase which is broken.
Deleting cached artifacts? That's going to cause problems.
Similarly, remove the `Build.makeTempPath` function. This was used to
create a temporary path in the configure place which, again, is the
wrong place to do it.
Instead, the WriteFile step has been updated with more functionality:
tmp mode: In this mode, the directory will be placed inside "tmp" rather
than "o", and caching will be skipped. During the `make` phase, the step
will always do all the file system operations, and on successful build
completion, the dir will be deleted along with all other tmp
directories. The directory is therefore eligible to be used for
mutations by other steps. `Build.addTempFiles` is introduced to
initialize a WriteFile step with this mode.
mutate mode: The operations will not be performed against a freshly
created directory, but instead act against a temporary directory.
`Build.addMutateFiles` is introduced to initialize a WriteFile step with
this mode.
`Build.tmpPath` is introduced, which is a shortcut for
`Build.addTempFiles` followed by `WriteFile.getDirectory`.
* give Cache a gpa rather than arena because that's what it asks for
2026-01-04 17:23:45 -08:00
Andrew Kelley
e3b7cad81e
std.heap.DebugAllocator: disable already flaky test
...
tracked by #22731
counterpart to ef1ddbe2f0
2026-01-04 07:29:35 -08:00
Andrew Kelley
ef1ddbe2f0
std.heap.DebugAllocator: disable already flaky test
...
tracked by #22731
2026-01-04 00:27:09 -08:00
Andrew Kelley
9eb3b54eb5
std.Io.Threaded: revert making reading fork child status cancelable
...
this caused the build runner to crash sometimes, not sure why yet
2026-01-04 00:27:09 -08:00
Andrew Kelley
854c076ff7
std.Io.Threaded: improve posix spawning
...
* avoid unreachable when the OS does something unexpected
* make waiting for the fork/exec error report cancelable
2026-01-04 00:27:09 -08:00
Andrew Kelley
fa315b1060
std.Io.Threaded: improve posix process creation
...
* cache /dev/null after opening
* make opening /dev/null cancelable
* avoid unreachable even when OS does something unexpected
2026-01-04 00:27:09 -08:00
Andrew Kelley
2c22c3dabf
std.Io.Threaded: make processReplace cancelable
...
In between each attempt to call execve() on a particular file path, it
will check cancelation before trying the next PATH.
2026-01-04 00:27:09 -08:00
Andrew Kelley
08d8b412e9
std.Io.Threaded: more robust windows process creation error handling
2026-01-04 00:27:09 -08:00
Andrew Kelley
f072313e1e
std.Io.Threaded: delete dead comment
...
The problem it talked about is solved now that the direct call to
dirOpenDirWindows makes sense in this context.
2026-01-04 00:27:09 -08:00
Andrew Kelley
0317e95aad
std.posix: delete some mkdir functions
...
These are handled by Io.Dir now. This is part of an effort to eliminate
error.OperationCanceled from the std lib. Also an effort to delete
all std.posix functions.
2026-01-04 00:27:09 -08:00
Andrew Kelley
2b326d27d5
std.Io.Threaded: improve various Windows logic
...
* cache nul handle for child process execution
* make opening the nul file integrate properly with cancelation
* replace all calls to SleepEx to parking_sleep.sleep instead, making
them properly cancelable. These sleeps are workarounds for Windows
kernel bugs. Now you can even cancel while waiting for kernel bug
workarounds!
2026-01-04 00:27:09 -08:00
Andrew Kelley
be977e1934
std.Io.Threaded: integrate with new cancel mechanism
2026-01-04 00:27:09 -08:00
Andrew Kelley
ff67f70cf9
start: tweak default allocator choices
...
On wasm targets, when libc is linked, we have to go through libc.
2026-01-04 00:27:09 -08:00
Andrew Kelley
e23d980e11
std.process.Environ: skip BE createMapWide test coverage
...
it would be good to fix this but master branch doesn't have coverage
either. one thing at a time.
2026-01-04 00:27:09 -08:00
Andrew Kelley
e2c04a4651
fix some windows compilation errors
2026-01-04 00:27:09 -08:00
Andrew Kelley
2fee64ceb0
update init template for new main API
2026-01-04 00:27:09 -08:00
Andrew Kelley
dd7be75f7c
std.process: add missing error.OperationUnsupported
2026-01-04 00:27:09 -08:00
Andrew Kelley
baa49e5929
std.Io.Threaded: implement processReplace
2026-01-04 00:27:09 -08:00
Andrew Kelley
08cc9e8d59
std.Io.Threaded: std.process -> process
2026-01-04 00:27:09 -08:00
Andrew Kelley
b32a38ad27
build: fix file system watching compilation on macOS
2026-01-04 00:27:09 -08:00
Andrew Kelley
1070c2a71a
rename env_map to environ_map
...
For naming consistency with `std.process.Environ.Map`.
2026-01-04 00:27:09 -08:00
Andrew Kelley
f25de4c7a2
fix native path lookup on macOS
2026-01-04 00:27:08 -08:00
Andrew Kelley
c6b75b61b7
std: fix child processes on riscv32-linux
2026-01-04 00:27:08 -08:00
Andrew Kelley
d97e4ca0d1
documentation should be descriptive not prescriptive
2026-01-04 00:27:08 -08:00
Andrew Kelley
e149c0e2aa
std.Build.Step.Run: fix wrong environment passed
2026-01-04 00:27:08 -08:00
Andrew Kelley
af164b3f3c
std.Build.Step.Run: no need to sort the environment
...
since we now use ArrayHashMap, the order is deterministic, and in fact,
observable by applications.
2026-01-04 00:27:08 -08:00
Andrew Kelley
ca5c5ade5f
std.Options: work around not lazy enough compiler
2026-01-04 00:27:08 -08:00
Andrew Kelley
f2cf7b538f
std.Io.Threaded: fix the child process error fd mechanism
2026-01-04 00:27:08 -08:00
Andrew Kelley
0ca83dd9d2
start: fix compilation with -lc on windows
2026-01-04 00:27:08 -08:00
Andrew Kelley
85fe35d246
compiler: fix -Denable-llvm compilation failures
2026-01-04 00:27:08 -08:00
Andrew Kelley
f28802a9c6
zig libc: fix subcommand
...
This branch regressed the child process "run" mechanism because it
didn't pass the correct stdin, stdout, stderr values to process.spawn
Fixed now.
2026-01-04 00:27:08 -08:00
Andrew Kelley
960c512efd
compiler: update std lib API usage
2026-01-04 00:27:08 -08:00
Andrew Kelley
a6f519c20f
std.process.Args: make toSlice require arena allocation
...
this simplifies the implementation, allows specializing it, and allows
deleting the corresponding free function. In practice this is how it is
always used anyway.
2026-01-04 00:27:08 -08:00
Andrew Kelley
1ccc87363a
std: fixes for WASI
2026-01-04 00:27:08 -08:00
Andrew Kelley
50e185b718
start: tweak allocator choice
...
Favor DebugAllocator in Debug mode, even when linking libc. Prevent use
of smp_allocator when single_threaded
2026-01-04 00:27:08 -08:00
Andrew Kelley
0362d9f321
start: make leaks into warnings
...
I think it will be less confusing if memory leak checking doesn't change
the return code of the process.
2026-01-04 00:27:08 -08:00
Andrew Kelley
60447ea97c
std: fix windows compilation errors
2026-01-04 00:27:08 -08:00
Andrew Kelley
08447ca47e
std.fs.path: make relative a pure function
...
Instead of querying the operating system for current working directory
and environment variables, this function now accepts those things as
inputs.
2026-01-04 00:27:08 -08:00
Andrew Kelley
9009ab2495
std.Io.Threaded: make environ init non-optional
...
and argv0 on systems that need it too.
fixes surprising behavior for applications that forget to initialize the
environment field.
2026-01-04 00:27:08 -08:00
Andrew Kelley
de8c4cd64e
compiler: update to new std.process APIs
2026-01-04 00:27:08 -08:00
Andrew Kelley
69d07472a1
std lib tests passing on linux
2026-01-04 00:27:08 -08:00
Andrew Kelley
3e6d6150d9
std.process.Environ: fix compile errors on POSIX
2026-01-04 00:27:08 -08:00
Andrew Kelley
384bfc5f99
std.Progress: go through Io interface for parent IPC mechanism
...
and fix start code
2026-01-04 00:27:08 -08:00
Andrew Kelley
42988fc5f4
std.process.Environ.Block: enhance type safety
2026-01-04 00:27:08 -08:00
Andrew Kelley
b85524d0c8
std.process.Environ: fix contains function
2026-01-04 00:27:08 -08:00