Skip to content

Update to Swift6, add Documentation#3

Open
pauljohanneskraft wants to merge 2 commits into
mainfrom
swift6
Open

Update to Swift6, add Documentation#3
pauljohanneskraft wants to merge 2 commits into
mainfrom
swift6

Conversation

@pauljohanneskraft
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 28, 2026 12:20
@pauljohanneskraft pauljohanneskraft requested a review from nasirky May 28, 2026 12:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Sendable conformances.
  • 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``.
Comment thread Sources/Checksum.swift
/// 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
Comment thread Sources/CRC64.swift

extension CRC64 {

/// CRC-64/ECMA-182 (DLT-1 tape format, XZ archives).
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.

2 participants