Update to Swift6, add Documentation#3
Open
pauljohanneskraft wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the CRC Swift package for Swift 6, removes the library’s Foundation dependency, and adds public-facing documentation across the API surface—because apparently even checksums deserve bedside manner.
Changes:
- Bumps the package to Swift tools version 6.0 with explicit platform minimums and adds CI for macOS/Linux.
- Adds DocC-style comments, README usage documentation, and
Sendableconformances. - Removes Foundation from source files and updates hex formatting/tests accordingly.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
Package.swift |
Updates Swift tools version and platform requirements. |
.github/workflows/test.yml |
Adds build/test CI for macOS and Linux. |
.gitignore |
Ignores SwiftPM/Xcode generated files. |
.swiftpm/xcode/xcuserdata/.../xcschememanagement.plist |
Removes committed personal Xcode user state. |
README.md |
Rewrites package documentation and examples. |
Sources/Checksum.swift |
Adds protocol docs and renames internal parameter to bytes. |
Sources/CRC.swift |
Adds API docs and conditional Sendable. |
Sources/CRC+Verify.swift |
Adds verification docs, updates error description, and adds Sendable. |
Sources/CRCCalculator.swift |
Adds streaming calculator docs and conditional Sendable. |
Sources/CRC8.swift |
Adds docs for CRC-8 variants. |
Sources/CRC16.swift |
Adds docs for CRC-16 variants. |
Sources/CRC32.swift |
Adds docs for CRC-32 variants. |
Sources/CRC64.swift |
Adds docs for CRC-64 variants. |
Sources/Hex.swift |
Removes Foundation-backed formatting and keeps hex output via stdlib APIs. |
Tests/CRCTestCase.swift |
Updates verification error string expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// An incremental, streaming CRC computation. | ||
| /// | ||
| /// Use a `CRCCalculator` when the payload arrives in chunks and you want to | ||
| /// avoid buffering it. Feed chunks with ``append(_:)-`` (or one of the |
| /// The in-progress CRC register, before ``CRC/xorOut`` is applied. | ||
| /// | ||
| /// This is the running state the calculator threads through each | ||
| /// ``append(_:)-`` call. For the finalized CRC, read ``finalValue``. |
| /// A type that computes a fixed-width integer checksum from a sequence of bytes. | ||
| /// | ||
| /// ``CRC`` is the only conforming type shipped with this package, but the | ||
| /// protocol exists so that the ``verify(_:for:)-`` extension applies to any |
|
|
||
| extension CRC64 { | ||
|
|
||
| /// CRC-64/ECMA-182 (DLT-1 tape format, XZ archives). |
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.
No description provided.