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
Anton Serov
d83b95cbf4
fixed .fixed flush recursion
2025-07-11 05:17:31 +02:00
Isaac Freund
f551c7c581
link.Elf: check files in archives for ELF magic
...
Apparently raw LLVM IR Bitcode files ("Bitstreams") may appear in
archives with LTO enabled. I observed this in the wild on
Chimera Linux.
I'm not yet sure if it's in scope for Zig to support these special
archives, but we should at least give a correct error message.
2025-07-11 04:57:54 +02:00
Andrew Kelley
e255415498
std: add some missing doc comments
2025-07-10 16:52:29 -07:00
Andrew Kelley
88e50b30c3
std.debug.print: provide a small buffer
2025-07-10 16:52:29 -07:00
Andrew Kelley
bd5745ddf2
std.log.defaultLog: provide a small buffer
2025-07-10 16:52:29 -07:00
Andrew Kelley
5360968e03
std: rename io to Io in preparation
...
This commit is non-breaking.
std.io is deprecated in favor of std.Io, in preparation for that
namespace becoming an interface.
2025-07-11 01:16:27 +02:00
Andrew Kelley
43fba5ea83
Merge pull request #24387 from ziglang/std.log.default_level
...
std.log: adjust default level for ReleaseSmall to include info + bonus cleanup
2025-07-10 14:56:33 +02:00
Andrew Kelley
1a998886c8
Merge pull request #24329 from ziglang/writergate
...
Deprecates all existing std.io readers and writers in favor of the newly
provided std.io.Reader and std.io.Writer which are non-generic and have the
buffer above the vtable - in other words the buffer is in the interface, not
the implementation. This means that although Reader and Writer are no longer
generic, they are still transparent to optimization; all of the interface
functions have a concrete hot path operating on the buffer, and only make
vtable calls when the buffer is full.
2025-07-10 12:04:27 +02:00
triallax
5b4b033236
build runner: fix --verbose-llvm-bc= not properly accepting value
...
closes #21001
2025-07-10 11:04:29 +02:00
Andrew Kelley
40d74e4287
std: refactor to use Alignment.of
2025-07-09 23:07:18 -07:00
Andrew Kelley
36cf22c55c
std.log: adjust default level for ReleaseSmall to include info
...
it was kind of wild to not do this before. sorry!
2025-07-09 23:03:35 -07:00
Alex Rønne Petersen
820f1a23a5
std: Disable std.zon parse float on dynamic x86-linux-musl
...
https://github.com/ziglang/zig/issues/23922#issuecomment-3054296672
2025-07-10 06:52:01 +02:00
Andrew Kelley
10d6db5d7d
std.io.Writer: remove some unimplemented functions
...
YAGNI
2025-07-09 20:01:15 -07:00
Andrew Kelley
aa1bdb43e0
std.io.Writer.writeStructEndian: fix packed structs
2025-07-09 20:01:15 -07:00
Andrew Kelley
dce08d9a57
std.Build.Cache: remove debugging remnants
...
oops!
2025-07-09 20:01:15 -07:00
Andrew Kelley
55bced9563
std.fs.File.Writer: fix splat alias bug
...
same deal as previous commit
2025-07-09 20:01:15 -07:00
Andrew Kelley
9e52febeeb
std.io.Writer.writeSplatHeader: fix splat alias bug
...
pointer comparison cannot be used since the buffers may alias
2025-07-09 18:29:10 -07:00
Andrew Kelley
09cdcf67e1
std.io.Writer.writeSplat: simplify and fix
2025-07-09 17:52:36 -07:00
Andrew Kelley
ab84dcc824
std.io.Reader: make vtable contract more consistent
2025-07-09 17:30:05 -07:00
Andrew Kelley
c072cf2bb8
std.io.Reader.peekDelimiterInclusive: simplify and fix
2025-07-09 17:18:23 -07:00
Andrew Kelley
93ac76594a
std: fmt.format to io.Writer.print
...
allows reverting format -> deprecatedFormat, plus I think this is a
nicer place for the function.
2025-07-09 15:31:02 -07:00
Andrew Kelley
4d93545ded
chicken out and allow ascii string alignment
2025-07-09 15:17:07 -07:00
Andrew Kelley
2468766a89
std: forbid alignment formatting options sometimes
2025-07-09 15:07:45 -07:00
Andrew Kelley
51a9a6aab6
std: replace formatInteger with formatNumber
2025-07-09 14:54:54 -07:00
Andrew Kelley
5bc95a6fa2
wasi.c: fix pread/pwrite
...
When stream is NULL it means reads should read 0 bytes and writes should
fake success with no side effects.
2025-07-09 10:47:36 -07:00
Andrew Kelley
5c6679922d
CBE: avoid depending on std.io.Writer.count
2025-07-09 09:32:07 -07:00
Andrew Kelley
bc2cf0c173
eliminate all uses of std.io.Writer.count except for CBE
2025-07-09 09:32:07 -07:00
Alex Rønne Petersen
7c709f920b
ci: Update to QEMU 10.0.2
2025-07-09 11:06:13 +02:00
Andrew Kelley
d345a10054
std.os.freebsd.copy_file_range: add missing error.Unexpected
2025-07-08 16:53:02 -07:00
Andrew Kelley
81b0c99915
std.zig.system.linux: update API usage
2025-07-08 15:15:21 -07:00
Andrew Kelley
c1c49a7d1c
C backend: fix bitcasting regression
2025-07-08 15:15:08 -07:00
Andrew Kelley
1dcb20d27e
std.fmt: refactor to remove cacheString
...
when this kind of trick is needed, do it inline
2025-07-08 11:07:23 -07:00
Andrew Kelley
fc335a3a48
update format strings in os/windows/test.zig
2025-07-08 08:46:31 -07:00
Andrew Kelley
83c4000319
std: revert big int test to master branch
...
oops, it depends on usize
2025-07-08 08:36:04 -07:00
Andrew Kelley
db021c4fd1
CI: disable self-hosted riscv64
...
it's missing some critical features like `@fieldParentPtr` and `@memmove`
2025-07-08 08:28:20 -07:00
Andrew Kelley
5955ba4f53
std.fs.File.Writer: implement positional writing for Windows
2025-07-07 23:09:14 -07:00
Jacob Young
720cd43fc1
cbe: fix code header being omitted from the output
2025-07-07 22:43:53 -07:00
Andrew Kelley
043079d765
std.io.Writer.VectorWrapper: fix vtable not being a unique addr
2025-07-07 22:43:53 -07:00
Andrew Kelley
a983f5b90f
wasm backend: memcpy and memmove are the same
...
both lower to memory.fill operation, which are allowed to overlap
2025-07-07 22:43:53 -07:00
Andrew Kelley
c7b4b17ba2
fix test case expected float value
...
it's better now
2025-07-07 22:43:53 -07:00
Andrew Kelley
911cd2611f
Sema: fix unintentional extra @compileLog newline
2025-07-07 22:43:53 -07:00
Andrew Kelley
26659c862f
update compiler unit tests to new API
2025-07-07 22:43:53 -07:00
Andrew Kelley
b0395531d3
update autodocs and langref to new API
2025-07-07 22:43:53 -07:00
Andrew Kelley
d8e26275f2
update standalone and incremental tests to new API
2025-07-07 22:43:53 -07:00
Andrew Kelley
c873c2eed9
fix aro translate-c building from source
2025-07-07 22:43:53 -07:00
Andrew Kelley
e97a0ffb60
std.Build.Step.CheckObject: mostly revert to master branch
...
the updated code to use new std.io API is crashing
2025-07-07 22:43:53 -07:00
Andrew Kelley
f2ad3bcc1c
fix 32-bit compilation
2025-07-07 22:43:53 -07:00
Andrew Kelley
b077e2979c
std.io.Reader: fix peekByte
2025-07-07 22:43:53 -07:00
Andrew Kelley
a7387f0047
fix std.io.Writer.VectorWrapper mechanism
...
previous implementation erroneously attempted to detect whether vector
API was used via the buffer pointer. This implementation has an explicit
flag.
2025-07-07 22:43:53 -07:00