Skip to content

Bump swift-syntax upper bound to allow 603.x#401

Open
BenjaminPrieur wants to merge 1 commit into
figma:mainfrom
BenjaminPrieur:bump-swift-syntax-603
Open

Bump swift-syntax upper bound to allow 603.x#401
BenjaminPrieur wants to merge 1 commit into
figma:mainfrom
BenjaminPrieur:bump-swift-syntax-603

Conversation

@BenjaminPrieur

Copy link
Copy Markdown

Why

The Swift package caps swift-syntax at "510.0.3" ..< "603.0.0" (Package.swift), which resolves to a maximum of 602.x.

SwiftPM resolves every dependency to a single version that satisfies the intersection of all constraints in the dependency graph. So when a project depends on both Code Connect and swift-syntax directly (or via another package), Code Connect's < 603.0.0 ceiling forces the entire graph down to 602.x — even on a Swift 6.3 toolchain, whose matching swift-syntax release is 603.x. In practice this silently downgrades swift-syntax in the consuming project, which can break code that relies on 603-only API or simply causes an unwanted version regression.

swift-syntax follows the toolchain: 600 → Swift 6.0, 601 → 6.1, … 603 → 6.3. There's no reason for Code Connect to exclude the release that matches the current toolchain.

What

Raise the upper bound to 604.0.0 so 603.x is allowed:

-.package(url: "https://github.com/swiftlang/swift-syntax", "510.0.3"..<"603.0.0"),
+.package(url: "https://github.com/swiftlang/swift-syntax", "510.0.3"..<"604.0.0"),

The wide lower bound is kept, so older toolchains stay supported — this only stops capping below 603.

Verification

Built and tested against the newly-resolved swift-syntax 603.0.1 on Swift 6.3.2:

  • swift build — clean (only two pre-existing is/as cast deprecation warnings, unrelated to this change)
  • swift test14/14 tests pass (CodeConnectParserTest, CodeConnectTemplateWriterTest, CodeConnectUploaderTest)
The dependency was capped at "510.0.3"..<"603.0.0", resolving to a max
of 602.x. This forces consumers that also depend on swift-syntax down to
602.x, even on Swift 6.3 toolchains. Raise the upper bound to 604.0.0 so
603.x (the Swift 6.3-matching release) is allowed. Builds clean and all
14 tests pass against swift-syntax 603.0.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant