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

Running the devenv remote over SSH #71

Closed asbe closed 4 years ago

asbe commented 4 years ago

Hi, for obvious reasons I'm currently not localized as close to my GPU-servers as I'd like, and I'm currently trying to set up the devenv over Remote:SSH to use with Swift for Tensorflow. I believe I've set the paths correctly, so I'm a bit confused about the error message I'm being thrown. Any ideas? I'm currently trying to use the languageserver bundled with the Swift for Tensorflow (sourcekit-lsp). I'd be very grateful for any hints that can get me up and running.

[Error - 7:03:06 PM] Starting client failed
Error: spawn ENOTDIR
    at ChildProcess.spawn (internal/child_process.js:394:11)
    at Object.spawn (child_process.js:535:9)
    at /home/asbe/.vscode-server/extensions/vknabel.vscode-swift-development-environment-2.10.0/node_modules/vscode-languageclient/lib/main.js:354:40

EDIT: after setting swift.languageServerPath correctly in the remote .vsconfig/settings, I came to the next error message missing dependent swift tool, please configure correct "swift.path.swift_driver_bin" which leaves me slightly more confused.

vknabel commented 4 years ago

Hi @asbe!

Good catch! There was an error in the documentation. You can remove swift.languageServerPath from your settings! Instead use the following config.

{
  "sourcekit-lsp.serverPath": "absolute path to the sourcekit-lsp executable",
  "sde.languageServerMode": "sourcekit-lsp",
  // optionally
  "sourcekit-lsp.toolchainPath": "absolute path to your swift 4 tensorflow toolchain",
}

Let me know if this helped you!

asbe commented 4 years ago

Having the following config seems to work (almost - now I believe the issues are with the code I'm loading - random file from "swift-models") - I get completion and floating bubbles.

I had to set toolchainPath to the folder containing the local installation of Swift (i.e., ./usr/bin/...) - slightly confusing.

{
    "sde.languageServerMode": "sourcekit-lsp",
    "sourcekit-lsp.toolchainPath": "/home/asbe/projects/swiftexperiments/"
  }

EDIT: can confirm it works as expected. This issue can be closed now.