Skip to content

Fix the five Swift 6.4 compiler warnings (warning-free on both toolchains) - #80

Merged
mansbernhardt merged 1 commit into
mainfrom
fix/swift-6.4-warnings
Sep 15, 2026
Merged

mansbernhardt merged 1 commit into
mainfrom
fix/swift-6.4-warnings

Conversation

@mansbernhardt

Copy link
Copy Markdown
Collaborator

Summary

Five warnings the 6.4 toolchain (Xcode 27.0) introduced; none on 6.3:

  • Sources/SwiftModel/Internal/TestAccess.swiftwithExpectedIssue is deprecated in swift-issue-reporting 2.x, the IssueReporting identity the manifest selects on 6.4+ (Pick the IssueReporting package identity by toolchain; declare the ConcurrencyExtras dependency #77). The soft "skipped assertion" failure now calls _withKnownIssue behind #if compiler(>=6.4) — the drop-in the deprecation message names for preserving withKnownIssue soft-failure semantics, and in 2.1.0 literally what withExpectedIssue forwards to (@_transparent). The < 6.4 identity (xctest-dynamic-overlay 1.x) has only withExpectedIssue, so the switch mirrors the manifest's.
  • Tests/SwiftModelSnapshotTests/DebugTests.swift@MainActor on modelScopeDebug_initialisesWithDebugOptions (ModelScope.init and body are main-actor-isolated SwiftUI).
  • Tests/SwiftModelTests/DualRegistrarTests.swift — unnecessary try on a non-throwing withKnownIssue body.
  • Tests/SwiftModelTests/ModelInitAccessorTests.swiftvarlet; the only write is a nonmutating set.

Verification

  • Clean swift build --build-tests: zero compiler warnings on Xcode 27 (6.4) and Xcode 26 (6.3.3).
  • Full suite: 869/869 on both toolchains.

🤖 Generated with Claude Code

…ains)

- TestAccess: `withExpectedIssue` is deprecated in swift-issue-reporting 2.x
  (the IssueReporting identity on 6.4+); call `_withKnownIssue` there behind
  `#if compiler(>=6.4)`, keeping `withExpectedIssue` for the < 6.4 identity.
  Semantics unchanged: 2.1.0's `withExpectedIssue` is a transparent forward
  to `_withKnownIssue`.
- DebugTests: `@MainActor` on the ModelScope test (isolated init/body).
- DualRegistrarTests: drop an unnecessary `try`.
- ModelInitAccessorTests: `var` → `let` (the write is a nonmutating set).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mansbernhardt
mansbernhardt merged commit ffb4f32 into main Sep 15, 2026
7 checks passed
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