Skip to content

[sourcekitd] Report entities that are implicitly @objc as @objc in the index request responses for compatibility #22793

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

E.g. Members of an @objcMembers context previous had implicit @objc attributes but now don't (possibly because of the request evaluator changes?). This updates the output of sourcekitd's 'index' request to act as if they still had implicit @objc attributes on them for compatibility.

Resolves rdar://problem/48140265

@nathawes nathawes requested a review from akyrtzi February 21, 2019 23:25
@nathawes
Copy link
Contributor Author

@swift-ci please smoke test

@nathawes nathawes force-pushed the add-implicit-at-objc-attributes-to-index-request-output branch from 8eed065 to 5702681 Compare February 22, 2019 00:53
@nathawes
Copy link
Contributor Author

@swift-ci please smoke test

@nathawes nathawes force-pushed the add-implicit-at-objc-attributes-to-index-request-output branch from 5702681 to ec064e6 Compare February 22, 2019 02:20
@nathawes
Copy link
Contributor Author

@swift-ci please test and merge

@nathawes
Copy link
Contributor Author

@swift-ci test and merge

@nathawes
Copy link
Contributor Author

@swift-ci test OS X

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8eed065e36d8d3ce8070a0830e211c33d93e0ca6

…index request responses for compatibility

Members of an @objcMembers context previous had implicit @objc attributes, but
now don't (possibly because of the request evaluator changes?). This updates the
output of sourcekitd's 'index' request to act as if they still had implicit
@objc attributes on them for compatibility.

Resolves rdar://problem/48140265
@nathawes nathawes force-pushed the add-implicit-at-objc-attributes-to-index-request-output branch from ec064e6 to 7680cc6 Compare February 23, 2019 00:36
@nathawes
Copy link
Contributor Author

@swift-ci test and merge

@nathawes
Copy link
Contributor Author

@Swift-C test

@nathawes
Copy link
Contributor Author

@swift-ci please smoke test Linux

@nathawes nathawes merged commit 9bd3935 into swiftlang:master Feb 26, 2019
@nathawes nathawes deleted the add-implicit-at-objc-attributes-to-index-request-output branch February 26, 2019 00:21
Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

Can sourcekit call isObjC() instead of checking for the presence of the attribute directly? In the future more “implicitly added” attributes will likely go away.

@nathawes
Copy link
Contributor Author

The code change here updates sourcekitd to call isObjc() rather than relying on the attribute being there. It's just the response sourcekitd sends back to its clients that still presents the indexed decl as having the implicit @objc attribute so ObjC-ness doesn't have to be computed on the client side.

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.

4 participants