Skip to content

chore: bump Swift to 6.2 and SwiftFormat to 0.60.1#152

Merged
bok- merged 8 commits intomainfrom
chore/bump-swift-6.2
Apr 8, 2026
Merged

chore: bump Swift to 6.2 and SwiftFormat to 0.60.1#152
bok- merged 8 commits intomainfrom
chore/bump-swift-6.2

Conversation

@bok-
Copy link
Copy Markdown
Contributor

@bok- bok- commented Apr 8, 2026

Summary

  • Bumps the project's Swift tools version to 6.2 (Package.swift, Examples/Package.swift, .swift-version) and reformats sources to match the Swift 6.2 formatter output
  • Drops Swift 6.1 from the Linux test matrix — 6.2 is now the minimum
  • Bumps SwiftFormat to from: "0.60.1" and applies the formatting fixes that new version requires (new rules: swiftTestingTestCaseNames, redundantThrows, redundantSendable, simplifyGenericConstraints, plus tightened docComments / indent / trailingSpace handling)
  • Checks Package.resolved into source control so CI and local resolve identical dependency versions — previously it was gitignored, which meant CI was picking up new SwiftFormat releases the moment they shipped

Why the SwiftFormat + Package.resolved change

CI lint started failing on this branch with ~200 errors that didn't reproduce locally. Root cause: /Package.resolved was in .gitignore, so local stayed pinned at SwiftFormat 0.58.1 while CI resolved 0.60.1 fresh on every run and enforced its new rules. Pinning via Package.resolved prevents this class of drift for all dev dependencies going forward.

Test plan

  • swift test passes locally (174/174) under Xcode 26.3 (Swift 6.2)
  • make lint passes locally under Xcode 26.3
  • Linux test matrix (6.2, 6.3) green on CI
  • macOS / iOS / tvOS / watchOS / visionOS test workflows green on CI
  • Lint workflow green on CI

Rob Amos and others added 8 commits April 8, 2026 20:47
Swift 6.2 is the new minimum after the tools version bump.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Package.resolved is gitignored, so CI was resolving the latest
SwiftFormat matching `from: "0.54.1"` (0.60.1) while local kept the
previously pinned 0.58.1. That newer version introduced additional
rules (swiftTestingTestCaseNames, simplifyGenericConstraints,
redundantThrows, redundantSendable, stricter docComments / indent /
trailingSpace handling) which caused CI lint to fail.

Raise the minimum to 0.60.1 so local and CI converge, and apply the
resulting formatting fixes across Sources/ and Tests/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin SwiftFormat (and the other dev dependencies) at a known version
so CI and local builds agree. Without this, CI was resolving the
latest SwiftFormat matching `from:` on every run, which silently
introduced new lint rules the moment a new release shipped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bok- bok- changed the title chore: bump Swift version to 6.2 chore: bump Swift to 6.2 and SwiftFormat to 0.60.1 Apr 8, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@bok- bok- enabled auto-merge April 8, 2026 11:29
@bok- bok- merged commit 44dd7c7 into main Apr 8, 2026
37 checks passed
@bok- bok- deleted the chore/bump-swift-6.2 branch April 8, 2026 11:38
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