Skip to content
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

[SymbolGraphGen] add new flag to skip "protocol implementation" symbols #63726

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

QuietMisdreavus
Copy link
Contributor

Resolves rdar://59899968

This PR introduces a new flag to affect SymbolGraphGen, available on the frontend and on swift-symbolgraph-extract: -skip-protocol-implementations. When present, this flag causes SymbolGraphGen to drop symbols that have an "inherited symbol", i.e. that are implementations of protocol requirements or are synthesized copies of protocol extensions. The conformance relationship between the type and the protocol itself remains, so that these relationships can be reconstructed.

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please smoke test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS Platform

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please smoke test

@QuietMisdreavus QuietMisdreavus marked this pull request as ready for review February 18, 2023 00:47
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

Options.OutputDir = OutputDir;
Options.Target = Target;
Options.PrettyPrint = ParsedArgs.hasArg(OPT_pretty_print);
Options.EmitSynthesizedMembers = !ParsedArgs.hasArg(OPT_skip_synthesized_members);
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit on the naming here; the 'protocol implementations' one is exclusive (skip) and this one inclusive (emit).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, i wanted to keep the settings field the same name as the CLI flag, to avoid the boolean inversion that -skip-synthesized-members has when applying into EmitSynthesizedMembers

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS Platform

1 similar comment
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS Platform

@QuietMisdreavus QuietMisdreavus merged commit 164e93e into main Feb 28, 2023
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/skip-proto-impls branch February 28, 2023 17:50
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.

None yet

2 participants