ITADN

Swift 6.2 / Xcode 26 compatibility: swift-syntax upper bound excludes 620.x

#277Openmjcaboose001 创建于 2026-03-15
bug
M
mjcaboose001commented
### Description The current Package.swift constrains swift-syntax to "600.0.0"..<"603.0.0", which excludes Swift 6.2 (620.x) shipped with Xcode 26. This causes Swift macro compilation to fail with "malformed response" errors on Xcode 26.2 and 26.3. The fix is a one-line change to expand the upper bound: swift // current .package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"603.0.0") // suggested .package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"621.0.0") This affects downstream consumers including sqlite-data and immich-app/immich whose iOS app uses sqlite-data. The same fix is needed in sqlite-data's Package.swift once swift-structured-queries ships a new release. Environment: Xcode 26.2 and 26.3 Swift 6.2 (620.x) swift-structured-queries 0.31.0 sqlite-data 1.6.0 ### Checklist - [x] I have determined whether this bug is also reproducible in a vanilla SwiftUI project. - [x] If possible, I've reproduced the issue using the `main` branch of this package. - [x] This issue hasn't been addressed in an [existing GitHub issue](https://github.com/pointfreeco/swift-structured-queries/issues) or [discussion](https://github.com/pointfreeco/swift-structured-queries/discussions). ### Expected behavior Adding swift-structured-queries as a dependency and building a project with Swift macros should succeed on Xcode 26 / Swift 6.2. ### Actual behavior Building fails with Swift compiler errors: Swift Compiler Error: External macro implementation type 'StructuredQueriesMacros.TableMacro' could not be found; '...StructuredQueriesMacros' produced malformed response This affects all macro types including TableMacro, ColumnMacro, SelectionMacro, etc. The root cause is that Package.swift constrains swift-syntax to "600.0.0"..<"603.0.0", which excludes Swift 6.2 (620.x). Swift macro plugins must be built with a swift-syntax version matching the host compiler, so the macro binary produces a malformed response when run under Swift 6.2. ### Reproducing project No standalone project needed. The issue is directly visible in Package.swift: swift.package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"603.0.0") The upper bound needs to be extended to include 620.x. Suggested fix: swift.package(url: "https://github.com/swiftlang/swift-syntax", "600.0.0"..<"621.0.0") ### Structured Queries version information 0.31.0 ### Destination operating system iOS ### Xcode version information 26.2 (17C52) and 26.3 (17C529) ### Swift Compiler version information ```shell Swift 6.2 (swiftlang-6.2.0 / Xcode 26) ```
0 条评论