Skip to content

[SourceKit] Don't report the ObjC runtime name without @objc(Name) #29857

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

nathawes
Copy link
Contributor

We used to compute the mangled name in other cases, but document structure is a syntactic request and can't guarantee that the class/protocol we're getting the mangled name of is valid in any way so it often breaks assumptions in the mangler and causes it to crash. It's not clear if the runtime_name is actually being used anymore, so this change restricts reporting it to just the cases where we don't need to mangle, eliminating this class of crashes.

rdar://problem/40956377

We used to compute the mangled name in other cases, but document structure is
a syntactic request and can't guarantee that the class/protocol we're getting
the mangled name of is valid in any way so it often breaks assumptions in the
mangler and causes it to crash. It's not clear if the runtime_name is actually
being used anymore, so this change restricts reporting it to just the cases
where we don't need to mangle.

rdar://problem/40956377
@nathawes
Copy link
Contributor Author

@swift-ci please test

@nathawes
Copy link
Contributor Author

@jpsim do you know of any tools that rely on key.runtime_name from sourcekitd's structure data?

@nathawes nathawes requested a review from akyrtzi February 14, 2020 20:09
@nathawes nathawes merged commit 0516c3b into swiftlang:master Feb 17, 2020
@jpsim
Copy link
Contributor

jpsim commented Feb 18, 2020

Not as far as I'm aware, thanks for checking.

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