Change a l public declarations to the `package` access level, accept for:
- The `LanguageServerProtocol` module
- The `BuildServerProtocol` module
- `InProcessClient.InProcessSourceKitLSPClient`
- `LanguageServerProtocolJSONRPC` (I would like to create a more ergonomic API for this like `InProcessSourceKitLSPClient` in the future, but for now, we’ll leave it public)
Unfortunately, our pattern of marking functions as `@_spi(Testing) public` no longer works with the `package` access level because declarations at the `package` access level cannot be marked as SPI. I have decided to just mark these functions as `package`. Alternatives would be:
- Add an underscore to these functions, like we did for functions exposed for testing before the introduction of `SPI`
- Use `@testable` import in the test targets and mark the methods as `internal`
Resolves#1315
rdar://128295618
Merge the XCTests and swift-testing tests defined in extensions into
their parent TestItems.
This is done as another pass after the TestScanner visitors have walked
the tree.
Fixes#1218
Test specified with anonymous arguments would produce an id with extra
whitespace, i.e: `funcWithArgument(_ x: Int)` would produce a TestItem
id of `funcWithArgument(_ :)`
This patch trims this extra whitespace to produce IDs that are
consistent with Swift's function ids, i.e: `funcWithArgument(_:)`
Add a `components` property to MemberAccessExprSyntax that provides all
the base names and the member's name as an array. When resolving
swift-testing Tags check if they start with Tag or Testing.Tag and drop
that from the name.
Add a `components` property to MemberAccessExprSyntax that provides all
the base names and the member's name as an array. When resolving
swift-testing Tags check if they start with Tag or Testing.Tag and drop
that from the name.
This workspace-wide syntactic test index is used for two purposes:
- It is used for XCTests instead of the semantic index for files that have on-disk or in-memory modifications to files
- It is uses for swift-testing tests, which are only discovered syntactically.
rdar://119191037
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.