swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
709 stars 47 forks source link

Use `textDocument/tests` LSP request to augment test list on active document save #762

Closed adam-fowler closed 2 months ago

adam-fowler commented 2 months ago

When a swift file is saved, make textDocument/tests LSP request and use the response to augment the test list generated from workspace/tests.

Currently we are using a middleware to parse symbols from document symbols responses. This can be disabled for Swift 6 once the above is implemented. This is the code setting it up https://github.com/swift-server/vscode-swift/blob/dfba3243e6cb97faa45037d11478e2714d4d5e17/src/TestExplorer/TestExplorer.ts#L127-L133

plemarquand commented 2 months ago

I can take a look at this.

plemarquand commented 2 months ago

Closed by #767