Skip to content

[SymbolGraphGen] don't emit both requirementOf and optionalRequirementOf for the same relationship #76983

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
Oct 18, 2024

Conversation

QuietMisdreavus
Copy link
Contributor

Resolves rdar://83519993

This PR changes the relationship emitting logic in SymbolGraphGen so that optional protocol requirements don't generate both a requirementOf and optionalRequirementOf relationship. This confuses tools like Swift-DocC, which render these relationships as both optional and required, even though the former should override it. To prevent this confusion, we can formalize the notion that optionalRequirementOf relationships imply a requirementOf relationship, and only emit the former when it's necessary.

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test macOS

Copy link
Contributor

@daniel-grumberg daniel-grumberg left a comment

Choose a reason for hiding this comment

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

:shipit:

@QuietMisdreavus QuietMisdreavus merged commit 2f184f7 into main Oct 18, 2024
5 checks passed
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/optional-requirement branch October 18, 2024 22:48
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