-
Notifications
You must be signed in to change notification settings - Fork 128
Lower some symbols to SPI. #548
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,6 @@ | |
| // See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
| // | ||
|
|
||
| @_spi(ForToolsIntegrationOnly) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm worried about this change -- making the This is a known limitation of this The existing solution was to wrap this entire extension in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Protocol conformances are always as visible as the type/protocol in question. See here: https://developer.apple.com/documentation/testing/test/case#relationships If we don't want the conformance to be public, we'll have to remove it outright.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behold: func idForTestCase(_ testCase: Test.Case) -> some Hashable {
func thunk(_ x: some Identifiable) -> some Hashable {
x.id
}
return thunk(testCase)
}Contrived, but the point is the IDs are publicly accessible already.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, due to opaque types, this is valid even when everything's SPI and you haven't imported it: let x = Test.Case.current!.id
let y = Test.Case.current!.id
#expect(x == y)So yeah, we need to pick a side of the fence to be on here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, let's just remove the Identifiable conformance
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @briancroom Thoughts? |
||
| extension Test.Case: Identifiable { | ||
| /// The ID of a test case. | ||
| /// | ||
|
|
@@ -21,8 +20,10 @@ extension Test.Case: Identifiable { | |
| /// | ||
| /// The value of this property is `nil` if _any_ of the associated test | ||
| /// case's arguments has a `nil` ID. | ||
| @_spi(ForToolsIntegrationOnly) | ||
| public var argumentIDs: [Argument.ID]? | ||
|
|
||
| @_spi(ForToolsIntegrationOnly) | ||
| public init(argumentIDs: [Argument.ID]?) { | ||
| self.argumentIDs = argumentIDs | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.