Skip to content

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Oct 8, 2025

Follow up to #24905 which was reverted.

cc @ifreund
cc @gooncreeper

bonus commit: add build.zig option for more conveniently testing std lib

bonus 2: fix Reader.Limited

andrewrk and others added 3 commits October 8, 2025 16:43
handy during development when it is already known that not all tests
will pass.
* File.Writer.seekBy passed wrong offset to setPosAdjustingBuffer.
* File.Writer.sendFile incorrectly used non-logical position.

Related to 1d764c1

Test case provided by:

Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>
Related to 1d764c1

Test case provided by:

Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>
mlugg and others added 2 commits October 8, 2025 17:00
Fix `takeDelimiter` and `takeDelimiterExclusive` tossing too many bytes
(#25132)

Also add/improve test coverage for all delimiter and sentinel methods,
update usages of `takeDelimiterExclusive` to not rely on the fixed bug,
tweak a handful of doc comments, and slightly simplify some logic.

I have not fixed #24950 in this commit because I am a little less
certain about the appropriate solution there.

Resolves: #25132

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
fixes #25196

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
Now it's based on calling fillMore rather than an illegal aliased stream
into the Reader buffer.

This commit also includes a disambiguation block inspired by #25162. If
`StreamTooLong` was added to `RebaseError` then this logic could be
replaced by removing the exit condition from the while loop. That error
code would represent when `buffer` capacity is too small for an
operation, replacing the current use of asserts.
@andrewrk andrewrk changed the title std: fix sendFile functions not accounting for buffer std.Io: Writer and Reader bug fixes related to sendFile, delimiters, and Limited Oct 9, 2025
@andrewrk andrewrk changed the title std.Io: Writer and Reader bug fixes related to sendFile, delimiters, and Limited std.Io: Writer and Reader bug fixes related to sendFile, delimiters, Limited, and seeking Oct 9, 2025
@andrewrk andrewrk enabled auto-merge October 9, 2025 07:46
@andrewrk andrewrk merged commit 529aa9f into master Oct 9, 2025
9 checks passed
@andrewrk andrewrk deleted the sendfile-fixes branch October 9, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants