InlineArray, streaming file reads, typed throws, Swift 6.4 CI - #6
Merged
Merged
Conversation
RISCfuture
force-pushed
the
swift-6.4/modernization
branch
3 times, most recently
from
September 15, 2026 03:11
424a5b0 to
3ed85d5
Compare
Adopt typed throws across the parsing surface: `DOF.init(data:)`, `DOF.init(url:)`, the `DOF.from(…)` factories, `DOFByteParser`, and the DOF file line reader's `AsyncIteratorProtocol.Failure` now carry `DOFError`, while `AsyncBytesLineReader` propagates its source sequence's own `Failure` type. Extract the chunked file reader into `FileLineReader` so both `AsyncDOFLineReader` and the new synchronous streaming initializer share one implementation, and route `DOF.from(filePath:)` through it instead of reading the whole file into memory. Match the "CURRENCY DATE = " header marker against an `InlineArray<16, UInt8>`, removing a heap allocation and the crash on input shorter than the marker. Replace the force-unwraps in `Cycle.previous`, `Cycle.next`, and the cycle datum date with a shared failable helper and a precondition. Add Swift 6.4 CI legs alongside the newest leg for each OS already in the matrix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq
Extracting the chunked reader out of the async iterator left `AsyncIterator.bytesRead` forwarding to a reader nothing asks it about; progress reporting reads `FileLineReader.bytesRead` directly. Periphery flags it, failing the strict scan. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq
`main` lowered this package's floor to what its code there requires. The byte-parsing work on this branch uses `InlineArray`, which is macOS 26, so the branch declares the floor its own code needs. Merging this therefore raises the floor. That is the trade the branch asks for and it should be decided on the merge, not worked around in the source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq
Enable `.strictMemorySafety()` (SE-0458) alongside the existing upcoming feature flags and audit every unsafe construct it surfaces, marking each with the `unsafe` expression marker. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq
RISCfuture
force-pushed
the
swift-6.4/modernization
branch
from
September 15, 2026 03:37
3ed85d5 to
eb3b586
Compare
`main` lowered the floor to macOS 15 and the README followed. This branch raises it to 26 for `InlineArray`, so the README has to say so too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq
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.
InlineArray<16, UInt8>for the fixed 16-bytecurrencyDatePattern.from(filePath:)no longer slurps the whole file viaData(contentsOf:); it uses the chunked reader.Cycle.UTF8Spanis not used here — DOF decodes ISO Latin-1, not UTF-8.🤖 Generated with Claude Code
https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq