Closed adamwych closed 4 months ago
I can reproduce. Sourcekit and swiftc are reporting different diagnostic ranges so the cleanup is not happening. I'll see what we can do. @adamwych thanks for the report, you can run Swift: Clear Diagnostics Collection
command to remove this case
Actually realized it was SwiftPM not SourceKit returning the wrong line. Opened https://github.com/apple/swift-package-manager/issues/7688
Verified with db0b840
Describe the bug VSCode displays (old, cached?) errors if
textDocument/hover
command does not report any issues.To Reproduce
let package = Package( name: "Foo", platforms: [ .macOS(.v13) ] )
[Trace - 1:43:15 PM] Sending request 'textDocument/hover - (123)'. Params: { "textDocument": { "uri": "<< path to project >>/Package.swift" }, "position": { "line": 7, "character": 6 } }
[Trace - 1:43:15 PM] Received response 'textDocument/hover - (123)' in 23ms. No result returned.