Fix the five Swift 6.4 compiler warnings (warning-free on both toolchains) - #80
Merged
Merged
Conversation
…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>
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.
Summary
Five warnings the 6.4 toolchain (Xcode 27.0) introduced; none on 6.3:
Sources/SwiftModel/Internal/TestAccess.swift—withExpectedIssueis deprecated inswift-issue-reporting2.x, theIssueReportingidentity 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_withKnownIssuebehind#if compiler(>=6.4)— the drop-in the deprecation message names for preservingwithKnownIssuesoft-failure semantics, and in 2.1.0 literally whatwithExpectedIssueforwards to (@_transparent). The< 6.4identity (xctest-dynamic-overlay 1.x) has onlywithExpectedIssue, so the switch mirrors the manifest's.Tests/SwiftModelSnapshotTests/DebugTests.swift—@MainActoronmodelScopeDebug_initialisesWithDebugOptions(ModelScope.initandbodyare main-actor-isolated SwiftUI).Tests/SwiftModelTests/DualRegistrarTests.swift— unnecessarytryon a non-throwingwithKnownIssuebody.Tests/SwiftModelTests/ModelInitAccessorTests.swift—var→let; the only write is anonmutating set.Verification
swift build --build-tests: zero compiler warnings on Xcode 27 (6.4) and Xcode 26 (6.3.3).🤖 Generated with Claude Code