Skip to content

Conversation

@award999
Copy link
Contributor

@award999 award999 commented Nov 26, 2025

Add a new workspace/playgrounds request that generalizes the SyntacticTestIndex to being a SwiftSyntacticIndex

Fixes: #2372

TODO:

  • add tests

@award999 award999 marked this pull request as ready for review November 28, 2025 17:19
@award999
Copy link
Contributor Author

@swift-ci Please test

@award999
Copy link
Contributor Author

@swift-ci Please test Windows

Apply the following changes:
- Check for the presence of `#Playgrounds` textually before getting the module name in `SwiftPlaygroundsScanner`. This is important because getting the module name requires us to get build settings for the file, which can be expensive. Do the cheaper check first
- Make `syntacticTests` and `syntacticPlaygrounds` closures capture the workspace instead of passing the workspace from the `SwiftSyntacticIndex` back out. I like this better because now we can’t accidentally pass the wrong workspace to a `SwiftSyntacticIndex`, eg. to `buildTargetsChanges`.
- Capture the initialize result in `TestSourceKitLSPClient` instead of using `postInitialization` to capture the result
- Minor cleanup of unnecessary abstractions, likely artifacts of earlier iterations
- Restructure tests so that every test has its own list of source files, allowing for easier local reasoning – turns out some of these tests didn’t even need to open a workspace, just to check the initialize response
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Reviewed the code, applied my suggestions locally and pushed them to your branch so we can get this landed soon. Please take a look if you agree with the changes I made in 612c781.

@ahoppen
Copy link
Member

ahoppen commented Dec 1, 2025

@swift-ci Please test

@award999
Copy link
Contributor Author

award999 commented Dec 2, 2025

@swift-ci Please test

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.

workspace/playgrounds request

2 participants