swiftlang / vscode-swift

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

Use `workspace/tests` and `document/tests` requests to list tests inside a project #693

Closed ahoppen closed 4 months ago

ahoppen commented 6 months ago

https://github.com/apple/sourcekit-lsp/issues/611 introduced the workspace/tests and document/tests methods to lists all tests within a workspace or document. The VS Code extension should be using them to list the available tests.

adam-fowler commented 6 months ago

Awesome I missed that went in.

adam-fowler commented 6 months ago

Does this request need a built project?

ahoppen commented 6 months ago

Yes, it does. It reads the index to find the tests

adam-fowler commented 5 months ago

@ahoppen Do these return SymbolInformation always, or can they return DocumentSymbols?

ahoppen commented 5 months ago

It currently always returns SymbolInformation and I don’t see any reason for us to change that in the foreseeable future.

adam-fowler commented 5 months ago

Ok that's cool. The client always has the option of both.

By the way I have something up and running. I'll be posting a PR in the next day or so.

plemarquand commented 4 months ago

I'm in the process of looking at these and integrating them in to the Test Explorer.

adam-fowler commented 4 months ago

@plemarquand Please review #761 and #762 for more details about both requests. It was easier to break them out into separate issues. I going to close this in favour of the two new issues.