Skip to content

Mark imported @completionHandlerAsync attrs as implicit #37170

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

Merged
merged 4 commits into from
Apr 30, 2021

Conversation

hamishknight
Copy link
Contributor

Marking the attribute user-inaccessible is too extreme, as we still want it to appear in things like code completion and generated interfaces if it was explicitly written by the user. Instead, mark the attribute as implicit when it's added by the Clang Importer, which stops it from being printed in the generated interface.

In addition, fix a typo with the printing of @completionHandlerAsync.

Resolves rdar://76685011.

This is too extreme, as we still want the attribute
to appear in things like code completion and
generated interfaces if it was explicitly written
by the user.

Reverts a2b5f68,
but keeps the test case intact.
Mark imported `@completionHandlerAsync` attrs as
implicit, which avoids printing them in generated
interfaces. And for the sake of completion,
serialize the implicit bit in case it's used
elsewhere in the future.

To make sure we continue to print
`@completionHandlerAsync` attributes explicitly
written by the user in Swift, add a SourceKit
interface test.

Resolves rdar://76685011
Now that @completionHandlerAsync is implicit for
imported decls, we need to enable implicit attrs in
a couple of tests that are testing its presence.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing the typo!

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