Skip to content

[SymbolGraph] don't filter out all implicit decls #41141

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

Resolves rdar://86294494

When generating a symbol graph with minimum-access-level set to internal, implicitly-generated initializers are not included in the symbol graph, despite being available at that access level. This PR removes the filter in SymbolGraphGen that removes all implicit decls; most of them are being filtered in SourceEntityWalker anyway, so removing this check is harmless for the purposes of the symbol graph.

@QuietMisdreavus
Copy link
Contributor Author

I'm posting this as a draft until i can get a test case written. In the meantime, i'm going to build a toolchain for manual testing:

@swift-ci Please build toolchain macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Feb 2, 2022

macOS Toolchain
Download Toolchain
Git Sha - 31a81b50df743ec4d4d6bf0a6f15bae9f2b3685d

Install command
tar -zxf swift-PR-41141-1332-osx.tar.gz --directory ~/

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/symgraph-synth-init branch from 31a81b5 to 52cf515 Compare February 2, 2022 16:31
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please smoke test

@QuietMisdreavus QuietMisdreavus marked this pull request as ready for review February 2, 2022 16:32
@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/symgraph-synth-init branch from 52cf515 to 08fe7c2 Compare February 2, 2022 19:57
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please smoke test

@QuietMisdreavus QuietMisdreavus changed the title [SymbolGraph] wip: don't filter out all implicit decls [SymbolGraph] don't filter out all implicit decls Feb 2, 2022
@QuietMisdreavus QuietMisdreavus merged commit f0c96b1 into main Feb 3, 2022
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/symgraph-synth-init branch February 3, 2022 23:25
QuietMisdreavus added a commit that referenced this pull request Mar 23, 2022
currently, we only create synthesied USRs for symbols that appear in an
extension block. this can fail to catch implicitly-inherited symbols in
other situations. now that we emit implicit constructor decls
(see #41141), this can create situations where different symbols get the
same USR. this commit ensures that these implicit constructors are given
synthesized USRs, so that they don't clash with their upstream symbol.

rdar://90401347
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