swift-testing: If LSP is disabled, swift-testing tests do not work
It appears swift-testing tests are not flagged as swift-testing until they are found via the workspace/tests or textDocument/tests LSP requests. We need another way to catch this. While disabling SourceKit-LSP is a special situation, it could occur in situations where LSP is particularly slow in large projects.
Swift-testing is more complex than XCTests so Paul said he would be hesitant to parse this. Some ideas:
- Update setting description, warning if they disable sourcekit-lsp, they lose this functionality
- Update warning notification message that shows up to kill the LSP
- Provide warning in testing view (if we can still show XCTests at same time)
I can take a look at this. Agree that there should at least be some indication that things won't work as expected if sourcekit-lsp is disabled. Thinking of using a combination of the options mentioned by @award999 above.
For the setting description, perhaps a message like:
Disabling SourceKit-LSP will turn off features like code completion, error diagnostics and jump-to-definition. Certain features like swift-testing tests may not work correctly.
And something similar for the message that comes up to turn off the language server.
You have disabled the Swift language server (SourceKit-LSP), but it is still running. Would you like to stop it now? This will turn off code completion, error diagnostics and jump-to-definition. Certain features like swift-testing tests may not work correctly.
And a warning in the testing view along the lines of:
The Swift language server (SourceKit-LSP) is disabled, swift-testing tests may not be detected correctly.
Looks like the extra warnings are done, marking as Done