Modernization#4
Open
pauljohanneskraft wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
A sweeping modernization pass: the package floor moves to Swift 5.9 with platform declarations and strict-concurrency / existential-any upcoming features, every source file gets DocC-style header documentation, a Sendable.swift central conformance file is added (mostly @unchecked), checksum verification gains an EnvironmentValues.skipChecksumVerification escape hatch in ChecksumProperty, the README is rewritten, a DocC catalog and .spi.yml are introduced, and a CI workflow is added.
Changes:
- Package: Swift 5.9 tools, platforms, upcoming-feature settings; CI on macOS 14 + Ubuntu with a Swift version matrix; new
.spi.yml. - Concurrency: blanket
Sendableconformances for containers, formats, properties, conversions, environment, and supporting types (mostly@unchecked). - Functional:
ChecksumPropertynow honorsskipChecksumVerificationon all four read/read-write paths; bare-checksum builder expressions still verify unconditionally.
Reviewed changes
Copilot reviewed 56 out of 58 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Package.swift | Swift 5.9 tools, platforms, strict concurrency / existential-any. |
| .github/workflows/ci.yml | New macOS + Linux CI with Swift 5.9 / 5.10 matrix (macOS matrix label is decorative). |
| .spi.yml | Swift Package Index DocC build config. |
| .gitignore | Ignore .swiftpm/, keep .build/, ignore *.doccarchive/. |
| .swiftpm/.../contents.xcworkspacedata | Removed (now gitignored). |
| README.md | Full rewrite: install, concepts, weather-station example, requirements. |
| NOTES.md | New ideas log (feature drafts, out of scope for this PR). |
| Sources/DataKit/DataKit.docc/DataKit.md | New DocC overview + Topics index. |
| Sources/DataKit/Sendable.swift | Central @unchecked Sendable conformances. |
| Sources/DataKit/Property/Checksum.swift | Respect skipChecksumVerification on all 4 read paths; doc comments. |
| Sources/DataKit/Environment/SkipChecksumVerification.swift | Docs only. |
| Sources/DataKit/Environment/Environment+Endianness.swift | Endianness: Sendable, docs. |
| Sources/DataKit/Environment/Environment+Suffix.swift | Suffix: Sendable, docs. |
| Sources/DataKit/Environment/EnvironmentValues.swift | Docs only. |
| Sources/DataKit/Readable/ReadContainer.swift | LengthExceededError: Sendable, docs. |
| Sources/DataKit/Readable/ReadContext.swift | Nested error structs gain @unchecked Sendable; docs. |
| Sources/DataKit/Readable/Readable.swift, ReadableProperty.swift | Docs only. |
| Sources/DataKit/Writable/*.swift | Docs only. |
| Sources/DataKit/ReadWritable/*.swift | Docs only. |
| Sources/DataKit/Builder/*.swift | Docs only. |
| Sources/DataKit/Property/.swift (Property, Convert, Custom, Using, Scope, OnRead, OnWrite, Environment, EnvironmentProperty, KeyPath, Property+) | Docs only. |
| Sources/DataKit/Conversions/*.swift | Docs; PrefixCountArray/DynamicCountArray gain conditional Sendable. |
| Sources/DataKit/Values/*.swift | Docs only. |
| Sources/DataKit/Error.swift | ConversionError / UnexpectedValueError @unchecked Sendable; docs. |
| Sources/DataKit/Exports.swift | Header replaced with one-line file comment. |
Files not reviewed (1)
- .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [](https://swift.org/package-manager) | ||
| [](https://swift.org) | ||
| [](LICENSE) | ||
| [](https://swiftpackageindex.com/QuickBirdEng/DataKit/documentation) |
Comment on lines
+8
to
+11
| /// primitives or with a ``Convert`` + ``Conversion``. The `read` closure is not annotated | ||
| /// `throws` in its signature, but it is invoked inside a throwing context — call sites can | ||
| /// throw via `try` inside the closure body using `try!`/`try?` patterns or by lifting the | ||
| /// logic into a helper that throws. |
| } | ||
| } | ||
| That's everything: one `format` declaration drives both directions. Key paths in | ||
| `format` and `init(from:)` must match — see the [reading footgun](#-heads-up-keypath-mismatch-is-a-runtime-error) |
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.