-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[SourceKit] Workaround a bug that parameterized protocols without 'any' cannot be mangled #60765
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
Conversation
|
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, but I think @CodaFi should verify this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't quite correct. The reason this isn't handled by appendType is because you should never see a ParameterizedProtocolType that isn't wrapped in an ExistentialType or in an existential metatype type AST.
a673691 to
79b3459
Compare
79b3459 to
d58df38
Compare
|
OK, I’ve decided to use this PR to implement a minimal workaround to avoid the crash on the SourceKit side so the underlying issue can be fixed independently. |
d58df38 to
0aa15a8
Compare
0aa15a8 to
03484b8
Compare
|
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to look through all layers of metatype you can get.
…y' cannot be mangled `typealias` is currently allowed to refer to a protocol without the `any` keyword. This breaks mangling the typealias type into a USR will crash because parameterized protocols are expected to be `any` types. Implement a SourceKit-specific minimal workaround for that problem by not computing USRs for parameterized protocols. rdar://98623438
03484b8 to
c8a7e55
Compare
|
@swift-ci Please smoke test |
typealiasis currently allowed to refer to a protocol without theanykeyword. This breaks mangling the typealias type into a USR will crash because parameterized protocols are expected to beanytypes.Implement a SourceKit-specific minimal workaround for that problem by not computing USRs for parameterized protocols.
rdar://98623438