Repository navigation
Upgrade to Swift 6.4 and adopt Swift 7 upcoming features - #10
Merged
Merged
Conversation
Bump swift-tools-version to 6.4 (Xcode 27) and move CI to a runner with it. Enable ExistentialAny, InternalImportsByDefault, MemberImportVisibility, InferIsolatedConformances and NonisolatedNonsendingByDefault on both targets. With imports internal by default, the CTantivy C module no longer appears in the public interface; files exposing Foundation types use `public import`. SearchCollection drops @unchecked: it only stores a Sendable `let`, so the conformance can be checked. Also fix two warnings the 6.4 compiler surfaced: a dead `nil` comparison on a non-optional in the more_like_this writer, and a needless `try` in a test. Stop cargo stripping build-time proc-macros in release: on macOS 27 dyld rejects the stripped dylibs ("mis-aligned LINKEDIT string pool"), failing scripts/build-host.sh with "can't find crate". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
GitHub's macos-26 image only carries Xcode 26.x, so setup-xcode could not satisfy '27' and the job failed before building anything. Xcode 27 is available on a separate preview image selected with the `xcode-27` label. That image ships a single Xcode that is already the default, so the setup-xcode step is dropped rather than retargeted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What changed
Swift 6.4
swift-tools-version6.2 → 6.4; README requirements updated.macos-15/ Xcode 26 tomacos-26/ Xcode 27.Swift 7 upcoming features, enabled on both targets in
Package.swift:InternalImportsByDefault: imports are internal unless marked, soCTantivyno longer leaks into the public interface (checked in the emitted.swiftinterface). The 8 files that exposeURL/Data/Datepublicly now usepublic import Foundation.ExistentialAny: 29 sites spelledany CodingKey/any Decoder/ etc., almost all inSearchHitDecoder.swift.MemberImportVisibility,InferIsolatedConformances,NonisolatedNonsendingByDefault: no code changes needed.Small fixes
SearchCollectionis now checkedSendableinstead of@unchecked. It only storeslet index: Index.Query.swift: removed a dead$0 == nilcomparison on a non-optionalUInt64, which 6.4 warns about. No behavior change.trywith nothing that could throw.Rust build on macOS 27
rust/Cargo.tomlsets[profile.release.build-override] strip = false. Cargo strips build-time proc-macro dylibs in release by default, and on macOS 27 dyld refuses to load the stripped files ("mis-aligned LINKEDIT string pool").scripts/build-host.shthen fails withcan't find crate for serde_derive. The setting only applies to build-time helpers, so the shipped static library is unchanged.Reviewer notes
macos-26image has Xcode 27 yet. If the "Select Xcode" step fails, the runner or thexcode-versionneeds adjusting.Span-based MessagePack reader:Array.spanneeds macOS 26, and storing aRawSpanin a cursor needs experimental lifetime features.~SendableonIndexWriter: it doesn't stop a client from adding a retroactive@unchecked Sendable, so it would only be documentation.unsafemarkers across the FFI layer. Possible follow-up.Testing
swift test: 345 tests in 32 suites pass with zero warnings, both against the released 0.7.0 xcframework and in host mode against a locally builtlibtantivy_ffi.a.cargo build --releaseinto a fresh target dir succeeds with the Cargo.toml change alone, no environment workaround.🤖 Generated with Claude Code