Which version of swift syntax should I use with swift tool chain 5.10 and xcode 16.0

Now, I want use swift syntax with my package, my swift package manager version is 5.10, and my xcode is 16.0. Should I use swuft syntax 6.0 or 5.10?

In swift syntax, I just find this

and
Releases of SwiftSyntax are aligned with corresponding language and tooling releases, for example the major version 509 of swift-syntax is aligned with Swift 5.9.

There are two language versions relevant for this question: one is the Swift version you want to be able to parse with the library; the other one is the Swift version that's supposed to compile your project and the library. Both are independent.

SwiftSyntax still specifies 5.9 as its Swift Tool Version so should compile just fine with any compiler >= 5.9, even its latest 602.0.0 version.

To my knowledge, there's only been one "breaking" syntax change related to spaces around attributes recently. But other than that, the 6.2 parser should be able to parse Swift code from older versions just fine.

That said, I'd recommend using the latest SwiftSyntax release, as it also builds with Swift 5.9, should be pretty stable for older version and (depending on your use case) also allows you to deal with newer Swift versions.

ok, thank you!