Commit graph

34458 commits

Author SHA1 Message Date
Andrew Kelley
165cd87c12 std.Io.Reader: don't set end to zero
because it may be used as a ring buffer
2025-07-31 22:10:11 -07:00
Andrew Kelley
111305678c std: match readVec fn prototype exactly
this is not necessary according to zig language, but works around a flaw
in the C backend
2025-07-31 22:10:11 -07:00
Andrew Kelley
ae67c26cab disable failing incremental test cases due to dwarf linker logic
tracked by #24634
2025-07-31 22:10:11 -07:00
Andrew Kelley
c49c90a42a fetch: update API usage 2025-07-31 22:10:11 -07:00
Andrew Kelley
4c04835a08 std.compress.zstd.Decompress: implement discard and readVec 2025-07-31 22:10:11 -07:00
Andrew Kelley
84e4343b0c fix test failures by adding readVec 2025-07-31 22:10:11 -07:00
Andrew Kelley
afe9f3a9ec std.compress.flate.Decompress: implement readVec and discard 2025-07-31 22:10:11 -07:00
Andrew Kelley
81af4f3efc link: update some dwarf code to non deprecated API 2025-07-31 22:10:11 -07:00
Andrew Kelley
3fff84a4a4 compiler: fix unit test compile errors
sorry, zip file creation has regressed because std lib no longer has a
deflate compression implementation
2025-07-31 22:10:11 -07:00
Andrew Kelley
6bcced31a0 fix 32-bit compilation 2025-07-31 22:10:11 -07:00
Andrew Kelley
42b10f08cc std.compress.flate.Decompress: delete bad unit tests
if I remove the last input byte from "don't read past deflate stream's
end" (on master branch), the test fails with error.EndOfStream. what,
then, is it supposed to be testing?
2025-07-31 22:10:11 -07:00
Andrew Kelley
5f790464b0 std.compress.flate.Decompress: hashing is out of scope
This API provides the data; applications can verify their own checksums.
2025-07-31 22:10:11 -07:00
Andrew Kelley
f3a38e30fa std.Io: delete SeekableStream
Alternative is to use File.Reader and File.Writer directly.
2025-07-31 22:10:11 -07:00
Andrew Kelley
4741a16d9a putting stuff back does not require mutation 2025-07-31 22:10:11 -07:00
Andrew Kelley
05ce1f99a6 compiler: update to new flate API 2025-07-31 22:10:11 -07:00
Andrew Kelley
2569f4ff85 simplify tossBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
5bc63794cc fix takeBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
63f496c4f9 make takeBits deal with integers only 2025-07-31 22:10:11 -07:00
Andrew Kelley
c00fb86db6 fix peekBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
8ab91a6fe9 error.EndOfStream disambiguation 2025-07-31 22:10:11 -07:00
Andrew Kelley
f644f40702 implement tossBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
2d8d0dd9b0 std.compress.flate.Decompress: unfuck the test suite 2025-07-31 22:10:11 -07:00
Andrew Kelley
c684b21b4f simplify test cases 2025-07-31 22:10:11 -07:00
Andrew Kelley
ac4fbb427b std.compress.flate.Decompress: don't compute checksums
These have no business being in-bound; simply provide the expected
values to user code for maximum flexibility.
2025-07-31 22:10:11 -07:00
Andrew Kelley
5f571f53d6 refactor gzip test cases
zig newbies love using for loops in unit tests
2025-07-31 22:10:11 -07:00
Andrew Kelley
e73ca2444e std.compress.flate.Decompress: implement peekBitsEnding and writeMatch 2025-07-31 22:10:11 -07:00
Andrew Kelley
7bf91d705c fix bit read not at eof 2025-07-31 22:10:11 -07:00
Andrew Kelley
73e5594c78 std.compress.flate.Decompress: fix bit read at eof 2025-07-31 22:10:11 -07:00
Andrew Kelley
9c8cb777d4 std.compress.flate.Decompress: implement more bit reading 2025-07-31 22:10:11 -07:00
Andrew Kelley
6509fa1cf3 std.compress.flate.Decompress: passing basic test case 2025-07-31 22:10:11 -07:00
Andrew Kelley
88ca750209 std.compress.flate.Decompress: add rebase impl 2025-07-31 22:10:11 -07:00
Andrew Kelley
fa410cc234 std.Io: delete BitReader 2025-07-31 22:10:11 -07:00
Andrew Kelley
1b43551190 std.Io: remove BitWriter 2025-07-31 22:10:11 -07:00
Andrew Kelley
824c157e0c std.compress.flate: finish reorganizing 2025-07-31 22:10:11 -07:00
Andrew Kelley
73c98ca0e6 simplify std.hash.Adler32 2025-07-31 22:10:11 -07:00
Andrew Kelley
a4f05a4588 delete flate implementation 2025-07-31 22:10:11 -07:00
Andrew Kelley
83513ade35 std.compress: rework flate to new I/O API 2025-07-31 22:10:11 -07:00
Chinmay Dalal
a2d21d6327 enable pwd.h functions for other OSes
also add the layout of `struct passwd` for DragonflyBSD
and FreeBSD:
 - c267aac007/include/pwd.h (L112)
 - https://cgit.freebsd.org/src/tree/include/pwd.h?id=d66f9c86fa3fd8d8f0a56ea96b03ca11f2fac1fb#n114
2025-08-01 04:34:45 +02:00
Andrew Kelley
0294e91451 std.Io.Reader: fix readVec at end 2025-07-31 19:26:12 -07:00
Jackson Wambolt
264bd7053e Sema: remove incorrect requireRuntimeBlock calls
Part of #22353

Resolves: #24273
Co-Authored-By: Matthew Lugg <mlugg@mlugg.co.uk>
2025-07-31 22:28:46 +01:00
mlugg
ac1e73e249 std.enums: fix EnumIndexer branch quota
It's quite silly to have this override which nonetheless makes
assumptions about the input type. Encode the actual complexity of the
sort.

Also, simplify the sorting logic, and fix a bug (grab min and max
*after* the sort, not *before*!)
2025-07-31 22:10:22 +01:00
Matthew Lugg
04d7b491b4
Merge pull request #24632 from mlugg/lossy-int-to-float-coercion
Sema: compile error on lossy int to float coercion
2025-07-31 21:49:37 +01:00
Alex Rønne Petersen
1804251dfb
glibc: update headers to 2.42 2025-07-31 22:02:37 +02:00
Alex Rønne Petersen
cdd6e9ee3a
glibc: update abilists file to 2.42 2025-07-31 21:47:02 +02:00
Andrew Kelley
982c387753
Merge pull request #24633 from linusg/more-serenity-fixes
std: A few more fixes for serenity
2025-07-31 09:56:26 -07:00
Andrew Kelley
627a292a11 fetch: remove calls to fsync
fsync blocks until the contents have been actually written to disk,
which would be useful if we didn't want to report success until having
achieved durability. But the OS will ensure coherency; i.e. if one
process writes stuff without calling fsync, then another process reads
that stuff, the writes will be seen even if they didn't get flushed to
disk yet.

Since this code deals with ephemeral cache data, it's not worth trying
to achieve this kind of durability guarantee. This is consistent with
all the other tooling on the system.

Certainly, if we wanted to change our stance on this, it would not be
something that affects only the git fetching logic.
2025-07-31 08:59:56 -07:00
mikastiv
1a15fbe960 Sema: add note suggesting dropping try on non error-unions 2025-07-31 16:55:17 +01:00
Alex Rønne Petersen
03facba496
std.Target: require libc for Android API levels prior to 29
Emulated TLS depends on libc pthread functions.

Closes #24589.
2025-07-31 17:08:25 +02:00
dweiller
19fc5f4fb2 Sema: disallow slicing many-item pointer with different sentinel
This change prevents adding or changing the sentinel in the type of a
many-item pointer via the slicing syntax `ptr[a.. :S]`.
2025-07-31 12:02:19 +01:00
mlugg
64bf8bb146
std: stop relying on precision-losing coercions 2025-07-31 10:57:04 +01:00