Skip to content

[SymbolGraph] Determine optional requirement by presence of OptionalAttr #39456

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 1 commit into from
Sep 25, 2021

Conversation

bnbarham
Copy link
Contributor

Rather than checking the underlying ObjectiveC decl, use the presence of
OptionalAttr to determine if a requirement is optional instead. This
is already added by the importer when necessary. An added benefit here
is that this also works for optional requirements defined in Swift (ie.
@objc optional ...).

@bnbarham bnbarham requested a review from bitjammer September 25, 2021 01:11
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham force-pushed the sg-optional-requirement branch from 11713d9 to bcde9b3 Compare September 25, 2021 01:34
@bnbarham
Copy link
Contributor Author

Updated with what I had in my comment. Is there a way to sort the JSON output or is CHECK-DAG with the whitespace regex the best we can do there?

@bnbarham
Copy link
Contributor Author

@swift-ci please test

Rather than checking the underlying ObjectiveC decl, use the presence of
`OptionalAttr` to determine if a requirement is optional instead. This
is already added by the importer when necessary. An added benefit here
is that this also works for optional requirements defined in Swift (ie.
`@objc optional ...`).
@bnbarham bnbarham force-pushed the sg-optional-requirement branch from bcde9b3 to 6aa3e0f Compare September 25, 2021 01:51
@bnbarham
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@bitjammer bitjammer left a comment

Choose a reason for hiding this comment

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

LG, thanks!

@bnbarham bnbarham merged commit bd07973 into main Sep 25, 2021
@bnbarham bnbarham deleted the sg-optional-requirement branch September 25, 2021 05:54
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.

2 participants