Skip to content

[5.6][SymbolGraph] consider underscored symbols as private if they're internal #41161

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
Feb 3, 2022

Conversation

QuietMisdreavus
Copy link
Contributor

Cherry-pick of #41156

Explanation: Symbols that begin with an underscore are always treated as internal when generating a symbol graph. However, there are more nuanced semantics for them: Symbols that are already internal or less should be treated as private for the purposes of access level filtering. This PR introduces this logic.

Scope: This change is isolated to SymbolGraphGen, and should only affect symbol graphs which are generated with a -minimum-access-level of internal or less.

Issue: rdar://86294802

Risk: Low. This only affects SymbolGraphGen, and does not affect anything that happens during a regular compilation.

Testing: The lit test SymbolGraph/Symbols/SkipsPublicUnderscore was updated to verify the new logic.

@QuietMisdreavus QuietMisdreavus requested a review from a team February 2, 2022 20:20
@DougGregor
Copy link
Member

@swift-ci please test

@QuietMisdreavus QuietMisdreavus merged commit d74acb7 into release/5.6 Feb 3, 2022
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/5.6/underscore-syms branch February 3, 2022 20:40
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