swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.33k stars 280 forks source link

sourcekitd silently fails #1812

Open award999 opened 3 weeks ago

award999 commented 3 weeks ago

Swift version

swiftlang-6.0.3.1.4

Platform

macOS 15

Editor

VS Code

Description

When there is an SDK mismatch, sourcekitd silently fails

Steps to Reproduce

  1. Have a tasks.json entry that points to an SDK from one Xcode installation
  2. Build that task
  3. Configure the SDK in settings to points to an SDK from a different Xcode installation
  4. Reload the window
  5. Next time sourcekit-lsp starts, no IntelliSense is available
  6. Open the output channel and should see an error like this
    2024-11-05 13:32:44.195827-0500 0x47bb1    Error       0x0                  29814  0    sourcekit-lsp: [org.swift.sourcekit-lsp:request-26] Received sourcekitd response:
    error response (Request Failed): Loading the standard library failed

Logging

No response

award999 commented 3 weeks ago

observed as https://github.com/swiftlang/vscode-swift/issues/1201 against vscode-swift

ahoppen commented 3 weeks ago

Synced to Apple’s issue tracker as rdar://139514623

ahoppen commented 3 weeks ago

To be clear, SourceKit does not crash here, it just fails. But the end result looks similar to the user.

award999 commented 2 weeks ago

@ahoppen ya thought I saw a crash in the log but you're right