Skip to content

InlineArray, streaming file reads, typed throws, Swift 6.4 CI - #6

Merged
RISCfuture merged 5 commits into
mainfrom
swift-6.4/modernization
Sep 15, 2026
Merged

RISCfuture merged 5 commits into
mainfrom
swift-6.4/modernization

Conversation

@RISCfuture

Copy link
Copy Markdown
Owner
  • InlineArray<16, UInt8> for the fixed 16-byte currencyDatePattern.
  • from(filePath:) no longer slurps the whole file via Data(contentsOf:); it uses the chunked reader.
  • Typed throws across the parser surface and both async line readers.
  • Removes force-unwraps in Cycle.
  • Adds Swift 6.4 CI legs and three tests.

UTF8Span is not used here — DOF decodes ISO Latin-1, not UTF-8.


🤖 Generated with Claude Code

https://claude.ai/code/session_01EbZbx5D2gGeXT8UxuiKEdq

@RISCfuture
RISCfuture force-pushed the swift-6.4/modernization branch 3 times, most recently from 424a5b0 to 3ed85d5 Compare September 15, 2026 03:11
RISCfuture and others added 4 commits September 14, 2026 20:37
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
RISCfuture force-pushed the swift-6.4/modernization branch from 3ed85d5 to eb3b586 Compare September 15, 2026 03:37
`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
@RISCfuture
RISCfuture merged commit a7e86e3 into main Sep 15, 2026
8 checks passed
@RISCfuture
RISCfuture deleted the swift-6.4/modernization branch September 15, 2026 03:38
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.

1 participant