Skip to content

Implement test discovery for swift-testing tests for the textDocument/tests request #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 28, 2024

This allows us to return swift-testing tests within a single document. It does not look for swift-testing tests workspace-wide (the workspace/tests request), which will be a follow-up PR.

@ahoppen ahoppen force-pushed the ahoppen/swift-testing-discovery branch from 6ff5626 to aae7668 Compare April 4, 2024 18:12
@ahoppen ahoppen force-pushed the ahoppen/swift-testing-discovery branch from aae7668 to ea6ba1d Compare April 15, 2024 21:50
@ahoppen ahoppen marked this pull request as ready for review April 15, 2024 21:52
@ahoppen ahoppen requested a review from benlangmuir as a code owner April 15, 2024 21:52
@ahoppen ahoppen changed the title Implement test discovery for swift-testing tests for the textDocument/tests request 🚥 #1149 Implement test discovery for swift-testing tests for the textDocument/tests request Apr 15, 2024
@ahoppen ahoppen requested a review from bnbarham April 15, 2024 21:52
@ahoppen
Copy link
Member Author

ahoppen commented Apr 15, 2024

@swift-ci Please test

…t/tests` request

This allows us to return swift-testing tests within a single document. It does not look for swift-testing tests workspace-wide (the `workspace/tests` request), which will be a follow-up PR.
@ahoppen ahoppen force-pushed the ahoppen/swift-testing-discovery branch from ea6ba1d to 1770204 Compare April 16, 2024 04:51
@ahoppen
Copy link
Member Author

ahoppen commented Apr 16, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 17, 2024

@swift-ci Please test Windows

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ @grynspan and @stmontgomery for the swift-testing scanning.

return true
}

self.isHidden = traitArguments.lazy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need to scan for .hidden: it's an internal-only trait we use for our test fixtures, not one external developers can use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to not support .hidden, I’ll change it in a follow-up PR to unblock #1175

@@ -15,6 +15,11 @@ import LSPLogging
import LanguageServerProtocol
import SwiftSyntax

public enum TestStyle {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We call this Library in SwiftPM, FWIW. Consistency may be a good thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping that we could maybe upstream this request to the LSP spec, at which point it would become language-agnostic. And at that point, I think it’s better to have a general term like Style instead of Library, which has more implications about build/etc structure.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly about either term. :)

@ahoppen ahoppen merged commit b104d54 into swiftlang:main Apr 18, 2024
3 checks passed
@ahoppen ahoppen deleted the ahoppen/swift-testing-discovery branch April 18, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants