Ludovic Courtès writes: > Hi Pierre! > > guix-commits@gnu.org skribis: > >> commit ecfc54403e2a1934b4f6e84ddad429b7970091fa >> Author: Pierre Neidhardt >> Date: Tue May 7 18:40:40 2019 +0200 >> >> guix: Simplify and robustify lzread!. > ^ > Should be lzlib. Oops! I must confess that I never really understood the whole logic behind GNU-style commit message :p >> * guix/lzlib.scm (lzread!): Do it. >> >> Previously lzread! would fail if COUNT was bigger >> than (lz-decompress-write-size). This is possible if a previous call to >> lzread! didn't empty the LZ_decompress input buffer (e.g. BV was too small to >> fit all the data). > > Could you add a test for this corner case? It’s corner cases like that > that can spoil the whole experience, so it feels safer to add tests as > soon as we encounter them. :-) I would have, but I don't know how. The problem is that I don't control the chunk size passed to the read! callback of the custom port. That's all up to Guile's implementation of custom ports. In practice, it seems that the BV is always big enough so the potential issue can never arise. But the new code is better on all aspects. Cheers! -- Pierre Neidhardt https://ambrevar.xyz/