Extensions Across Libraries Exposed via @_exported import
s with Extension Block Symbols Enabled Produces Invalid Archive
#422
Labels
bug
Something isn't working
Description
Having
Lib1
depending onLib2
, and a third targetMain
reexportingLib1
andLib2
, and inLib1
having the extensions defined to the types declared inLib2
, the variables defined in these extensions, are shown on the root level of the doc archive.E.g. this code produces a top level symbol
func foo()
in the documentation archive.Checklist
main
branch of this package.Expected Behavior
The expected behavior depends on the discussion around #331. If we decide to implement #331, and do not emit symbols from
@_exported import
s entirely, we of course would expect the extensions across the re-exported libraries to disappear as well.If we reject #331 in favor of the current behavior, the expected behavior would be for the symbols resulting from these cross-re-export extensions to be presented as part of the re-exporting target (
Main
in the example`). These extensions would not be considered extensions to external types, as the types, as well as the extensions, are all re-exported by the same target. That is, there would be no Extended Module sections under which the extension-based symbols are listed. The expected structure of the archive would be as follows:Actual behavior
Currently, the structure generated for the example above is as follows:
Steps To Reproduce
-emit-extension-block-symbols
:swift build --target Main -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs -Xswiftc -omit-extension-block-symbols -Xswiftc -emit-extension-block-symbols
docc
. Make sure you use an up to date version (main
branch).Swift-DocC Version Information
b9d9ada
Swift Compiler Version Information
The text was updated successfully, but these errors were encountered: