vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

sourcekit-lsp returns some errors #63

Closed haifengkao closed 4 years ago

haifengkao commented 4 years ago

sourcekit-lsp returns some errors 截圖 2020-03-06 上午12 48 03

Step to reproduce:

  1. install the latest sourcekit-lsp by installing Xcode 11.4 beta https://github.com/apple/sourcekit-lsp/tree/master/Editors
  2. add the following settings to vscode-swift-development-environment Sde: Language Server Mode: sourcekit-lsp Sourcekit-lsp: Server Path: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp Sourcekit-lsp: Toolchain Path /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
  3. create an initial project by mkdir helloworld cd helloworld swift package init
  4. open the project by vscode

IMO, the vscode extension provided by sourcekit-lsp is working perfectly. But it lacks certain features like auto-build when the project is saved. If SDE can continue to support sourcekit-lsp, it will be the best solution at this moment.

vknabel commented 4 years ago

Hi @haifengkao! Thanks for the report. I will definitely have a look on this!

vknabel commented 4 years ago

Good news, @haifengkao! The release 2.9.0 fixes your issue.

The environment variables haven't been passed correctly to sourcekit-lsp.