I've been trying to set up Swift development with VS Code, and to do that I've been following this tutorial: Swift Development with Visual Studio Code — On Linux!, however after going through with it I got a problem saying that it can't start SourceKit Language Server. It also said it couldn't start the server using command sourcekit-lsp.
Still not solved, I get the following when executing swift build -Xcxx -I/home/nikko/swift/swift-5.2.4-RELEASE-ubuntu20.04/usr/lib/swift
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-tools-support-core/Sources/TSCclibc/process.c:9:12: warning: implicit declaration of function 'posix_spawn_file_actions_addchdir_np' is invalid in C99 [-Wimplicit-function-declaration]
return posix_spawn_file_actions_addchdir_np(file_actions, path);
^
1 warning generated.
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
/home/nikko/Downloads/sourcekit-lsp/.build/checkouts/swift-driver/Sources/SwiftDriver/Utilities/Triple.swift:1637:3: error: unknown attribute '_spi'
@_spi(Testing) public var isMacCatalyst: Bool {
^
[44/52] Compiling SwiftDriver DriverExecutor.swift
(It stops at 44/52 by the way. Each time it doesn't finish)
And the weird thing is, I can't find anything useful about this '_spi' in google (except that it might mean Serial Peripheral Interface).
@_spi
is a Swift 5.3 feature; linux standard distribution of swift is 5.2.x. I've been guided to try the nightly 5.3 build. – Stan Sep 01 '20 at 18:56