Add binary file streams, Nix release packages, and bounded release checks - #501
Merged
Merged
Conversation
This was referenced Sep 25, 2026
lukewilliamboswell
marked this pull request as ready for review
September 27, 2026 09:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applications need bounded binary file reads and a reproducible way to consume the released platform with Nix. The previous 0.23.0 release attempt also stalled for almost six hours inside
roc bump. This PR adds binary reads and lazy chunk streams, publishes Nix package outputs for a pinned release, and prevents API-comparison hangs from blocking warning-mode releases.Fixes #117.
Binary files
read_up_to!(max_bytes)permits short reads; an empty result means EOF for positive requests. Zero performs no I/O.read_exactly!(count)reportsFileUnexpectedEOFon truncation. Failure may consume bytes and does not restore the cursor.position!()andseek!(Start(U64) | Current(I64) | End(I64))report the logical buffered position; aliases share the cursor.chunks(max_bytes)rejects zero and returns a lazy builtinStream(Try(List(U8), [FileErr(IOErr)])). Errors yield one error item followed by termination. Terminal continuations retain no reader, and retained byte lists survive later reads/seeks.The Stream.custom dependency (roc-lang/roc#11691) is resolved by nightly-2026-09-26-d6267b4. All workflows and the Nix devshell pin that compiler, with matching merged roc-overlay metadata in flake.lock. The binary example is enabled with empty, short binary, multi-chunk, missing-argument, and missing-file cases.
Nix release packages
nix build ./.#platformfetch and unpack the published release pinned innix/release.json;.#bundleprovides its original archive. These package outputs do not rebuild the checkout's hosts.nix/README.mdprovides a tested downstream flake example.Release reliability
warnmode, and fails inrequiremode.InternalHttp.TransportErralias in 0.22.2. September 26 finishes this comparison with an extraction error; it no longer hangs in the reproduced case. This PR mitigates the release stall, not the upstream alias-extraction bug.nightly-tagis actually honored.Validation
With nightly-2026-09-26-d6267b4 on x86_64 Linux:
nix flake checkbuilt and ran the consumer; the documented downstream flake also built and ran. All four supported systems passed flake evaluation.Supported-target and Nix CI are running for the updated head; they remain the merge gate.