-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.6][AST] scan @_exported
imports of source files for display decls
#40866
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
[5.6][AST] scan @_exported
imports of source files for display decls
#40866
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
7d055bd
to
97b46c4
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
It looks like there were problems i'd overlooked in the source-compatibility since it had passed for
|
It seems like when a module re-exports two different Clang modules, there are repeat declarations of the implicit items added by the Clang importer: this specific case was failing on |
@swift-ci Please test source compatibility |
@swift-ci please test |
@swift-ci please test source compatibility |
The issue in the previous source-compatibility testing is the same one that is being fixed in #41115. I'm not cherry-picking it onto this branch (yet) since it only affects builds with assertions in it, but it will still be helpful to assist with developing on the branch generally. |
adaa063
to
ca473b1
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
SR-15801 rdar://88299954
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please build toolchain macOS platform |
@swift-ci Please test |
33e3aea
to
827e94f
Compare
@swift-ci Please test |
@swift-ci Please build toolchain macOS platform |
@swift-ci Please test source compatibility |
827e94f
to
79f8b48
Compare
@swift-ci Please test |
@swift-ci Please build toolchain macOS platform |
@swift-ci Please test source compatibility |
@_exported
imports of source files for display decls
macOS Toolchain Install command |
Cherrypick of #40810
Explanation: In
-emit-module
builds, symbols declared in headers were not being emitted in symbol graphs, due to SourceFile-based modules not including decls from the underlying Clang module.Scope: This is a modification of
getDisplayDecls
, but it has been restricted to only affect SymbolGraphGen.Issue: rdar://85230067
Risk: Low. While this is a change to
getDisplayDecls
, the change has been restricted to only occur during SymbolGraphGen, and should not affect regular compilation.Testing: Source compatibility has been tested with this change, and no regressions have occurred. In addition, the following lit tests have been updated or added:
SymbolGraph/ClangImporter/EmitWhileBuilding
has been updated to ensure that Clang-based symbols appear during an-emit-module
build.SymbolGraph/ClangImporter/Submodules
has been added to ensure that re-exporting a Clang submodule does not crash the process, and to ensure that re-exporting multiple Clang modules does not trip the "duplicate decls" assertion added to the recursivegetDisplayDecls
.ModuleInterface/exported-import
has been added to ensure that re-exporting a module does not add those symbols to the generated module interface file.