Hello, I'm the author and maintainer of the one of the SourceKit-LSP clients out there. I recently got a report about some incorrect behavior of SourceKit-LSP from Xcode 12 Beta and a Swift 5.3 project. Basically, the steps to reproduce are:
- Create a basic Swift 5.3 SPM project with Xcode.
- Configure the client to point to SourceKit-LSP from the Xcode 12 Beta toolchain.
With that configuration, Swift modules are not compiled correctly by SourceKit-LSP and there's a lot of code completion problems, including incorrect diagnostics.
Debugging further, the server returns this message to the client:
[Trace - 11:29:57 PM] Received notification 'window/logMessage'.
Params: {
"message": "package at '/Users/dmartin/Desktop/FooBar' is using Swift tools version 5.3.0 but the installed version is 5.2.0",
"type": 4
}
Workarounds that work:
- Use a Swift 5.2 package.
- Use SourceKit-LSP from a recent 5.3 snapshot from Swift.org
Is it expected that SourceKit-LSP from Xcode 12 Beta does not work correctly with Swift 5.3 projects?
Thanks.