-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SymbolGraphGen] Correctly handle exported imports in swift-symbolgraph-extract #73080
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] Correctly handle exported imports in swift-symbolgraph-extract #73080
Conversation
@swift-ci please test |
@swift-ci please smoke test |
…ymbolgraph-extract
0246506
to
1d749b1
Compare
@swift-ci please smoke test |
@swift-ci please test |
1 similar comment
@swift-ci please test |
lib/AST/Module.cpp
Outdated
if (Recursive) { | ||
ImportCollector importCollector; | ||
this->getDisplayDeclsRecursivelyAndImports(Results, importCollector); | ||
} | ||
// FIXME: Should this do extra access control filtering? | ||
FORWARD(getDisplayDecls, (Results)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this an else branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comment we spotted while walking through the code, could you add a test that verifies that the recursive export-import functionality still works? There's a similar test in SymbolGraph/Module/ThirdOrder.swift
that you can copy to make something similar. We just need to make sure that the innermost module's symbols appear in the outer symbol graph.
…cls for symbol graph generation This change is two fold. Firstly it enables collection of exported imports from non source file units. Additionally this recurses through the exported imports to ensure the transitive set is collected. Fixes swiftlang#59920 rdar://89687175
Ensure recursive calls to `ModuleDecl::getDisplayDecls` does not result in double collection of display decls.
1d749b1
to
f152885
Compare
@swift-ci please smoke test |
@swift-ci please test |
Test is in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test looks great, thanks!
…-sgf-extract [SymbolGraphGen] Correctly handle exported imports in swift-symbolgraph-extract
This sets up the necessary stuff to include symbols from exported imported modules in symbol graphs generated using the
swift-symbolgraph-extract
toolChanges include:
SourceFile
file units for the purpose ofModuleDecl::getDisplayDecl
Resolves #59920
rdar://89687175