Repository navigation
xz: upstream v0.5.17 catch-up, and UPSTREAM.md - #86
Conversation
closer-claudio
left a comment
There was a problem hiding this comment.
✅ Ready at e1bbb78: upstream v0.5.17's fix ported, lzma.ByteReader retries (0, nil) reads, which io.Reader permits, up to 100 times before returning io.ErrNoProgress, instead of failing xz.NewReader with "no data"; 12/12 checks green including the gate.
🔍 Verified last: diff read at e1bbb78, four files. ReadByte returns the byte on any progress, the reader's error when it has one, and io.ErrNoProgress after the bound, the stdlib's convention for this case; errNoData and the errors import go with the old path. TestReaderZeroNilReads drives xz.NewReader over a reader that returns (0, nil) before every read and checks the round trip; TestByteReaderNoProgress checks the bound. The CHANGELOG entry credits upstream. Upstream's other five commits were not re-read here; the body says they need nothing. Body in #217's shape.
4fb9a58 to
099d054
Compare
io.Reader allows Read to return (0, nil) and asks callers to retry; breader.ReadByte turned it into "breader.ReadByte: no data". The lzma Reader never saw it (a plain input already sits behind bufio, which retries), but the xz block header and index read through lzma.ByteReader directly, so xz.NewReader on a reader that stutters (0, nil) failed outright. ReadByte now retries up to 100 times and then returns io.ErrNoProgress, the same bound bufio uses. Ported from upstream v0.5.17, "fix: retry (0, nil) reads in breader.ReadByte", ulikunitz@591e09e with the regression test moved to the xz level, where the fork's path still failed; a second test pins the io.ErrNoProgress bound. Upstream's other commits since the fork point are already here (internal/term's fallback, v0.5.16) or are its own release bookkeeping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
One file, the same in every forkcloser fork, answers what this fork was taken from and what of upstream it carries: the fork point, the upstream head the last review reached, and each upstream commit since the fork point in exactly one of two tables, incorporated (with the commit here) or not (with the reason). The next review starts after the "Reviewed through" commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: closer-claudio <claudio@farcloser.world>
099d054 to
9aeb1da
Compare
closer-claudio
left a comment
There was a problem hiding this comment.
✅ Ready at 9aeb1da: the reviewed port (now 4c88e4f, same code, its message naming upstream by commit URL as limen#240 asks) plus UPSTREAM.md, which records the fork point, the reviewed-through commit, and every upstream commit since in exactly one table; 12/12 checks green including the gate.
🔍 Verified last: ulikunitz/xz's history after b371040 is exactly the six commits listed (82b346c, ba40d80, 024f909, 591e09e, f5969eb, 6ead826), each in one table, and 6ead826 is upstream's head; the header now says which date is the commit's and which the review's. The port of 591e09e, 4c88e4f, carries the code reviewed at e1bbb78, and UPSTREAM.md's Here link follows it. Body in #217's shape.
🎯 Why: the pre-release upstream catch-up @apostasie asked for. Upstream ulikunitz/xz has six commits the fork lacks (v0.5.16, v0.5.17); one is a fix the fork needs.
🛠️ What:
lzma.ByteReader'sReadByteretries(0, nil)reads, up to 100, then returnsio.ErrNoProgress; a regression test at the xz level, a bound test inlzma, and a CHANGELOG entry.UPSTREAM.mdrecords the fork point and where each upstream commit since then went, in the format every forkcloser fork now uses.🧪 How:
TestReaderZeroNilReads(xz.NewReaderover a reader returning(0, nil)before every read) fails on main with the old error and passes with the fix;TestByteReaderNoProgressfails on main and passes. The lzma-level form of upstream's test passes on main too (the fork already puts plain input behindbufio), so the test lives where the fork failed.just lint(every lane but links) andjust testgreen locally. U: links (sandbox).b371040, per GitHub's compare ofmainagainstulikunitz:master, each sit in exactly one table, and theHerelinks resolve. Green locally as above.📝 Upstream's other five commits need nothing here.
internal/term's non-terminal fallback is already in the fork (its narrower build tags are the fork's). The rest is upstream's own release bookkeeping: version strings, relnotes and TODO.md.