Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Windows ARM + VSCode Issue: SourceKit Language Server client: couldn't create connection to server #1062

Open
litewrap opened this issue Feb 19, 2024 · 4 comments

Comments

@litewrap
Copy link

Steps to reproduce the behavior:

With Windows 11 ARM (I am using Parallels Desktop on M1 Mac)
Install Swift Windows arm64 build
Go to any Swift PM project
Open VS Code
Message appear: "SourceKit Language Server client: couldn't create connection to server"

Environment

Swift Windows arm64------------------
https://github.com/thebrowsercompany/swift-build/releases/tag/20240213.1

VSCode-----------------------
Version: 1.86.2 (user setup)
Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:40:58.324Z
Electron: 27.2.3
ElectronBuildId: 26908389
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT arm64 10.0.22000

swift-server/vscode-swift#681

@ahoppen
Copy link
Collaborator

ahoppen commented Feb 19, 2024

Tracked in Apple’s issue tracker as rdar://123199036

@ahoppen
Copy link
Collaborator

ahoppen commented Feb 19, 2024

@compnerd Do you have an idea what might be the issue here? Do we maybe build sourcekit-lsp only for x64 and not arm64? That’s the first thing that came to my mind seeing from the description.

@compnerd
Copy link
Collaborator

Sadly I do not. I'd love to get to the bottom of this.

There are ARM64 toolchains (https://github.com/thebrowsercompany/swift-build) that are being built on a schedule. @shahmishal will need to help to get the bootstrap build going to allow us to build on ARM64. There are changes for cross-compiling the toolchain as a developer at apple/swift#71584.

I've observed the same issue on my machine. apple/swift-package-manager#7199 is an attempt to get SPM built with vendored dependencies. With that in place, I think it would be possible to build just the LSP with CMake on Windows allowing for debugging this code. The Swift Syntax dependency prevents us from using SPM to build the LSP even for testing.

@compnerd
Copy link
Collaborator

Hmm, this might be a miscompile in libdispatch, which we have observed manifesting in other cases. Hopefully we can isolate where the miscompile is.

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

No branches or pull requests

3 participants