swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Platform
macOS 14.5
Editor
VS Code
Does the issue reproduce with Swift 6?
Yes
Description
The related information attached to diagnostics reference the wrong file. It references the file the diagnostic occurred and not the file the related information is in.
Steps to Reproduce
In a VS Code project add file Test.swift with the following lines
@available(*, unavailable)
struct Test {}
In a second file Test2.swift reference type Test
func test() {
let t = Test()
}
Notice diagnostic 'Test' is unavailable and then notice that the related information 'Test' has been explicitly marked unavailable here references a location in Test2.swift and not Test.swift
Logging
Here is the related response from the SourceKit-LSP output log
Swift version
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Platform
macOS 14.5
Editor
VS Code
Does the issue reproduce with Swift 6?
Yes
Description
The related information attached to diagnostics reference the wrong file. It references the file the diagnostic occurred and not the file the related information is in.
Steps to Reproduce
Test
'Test' is unavailable
and then notice that the related information'Test' has been explicitly marked unavailable here
references a location in Test2.swift and not Test.swiftLogging
Here is the related response from the SourceKit-LSP output log