apple/swift

Documentation Symbol Graph Generation failing on macOS

Opened this issue · 2 comments

In Vapor we have a number of

@_documentation(visibility: internal) @_exported import

due to legacy reasons. In Xcode 15 and Xcode 15.1 Beta 1 this is causing documentation build errors due to missing symbols. See below for the error log.

Steps to reproduce

  1. git clone https://github.com/vapor/vapor
  2. cd vapor
  3. open Package.swift
  4. Product -> Build Documentation
Showing All Messages
CompileDocumentation /Users/timc/Developer/Vapor/vapor/Sources/Vapor/Docs.docc (in target 'Vapor' from project 'vapor')
    cd /Users/timc/Developer/Vapor/vapor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/docc convert --index --fallback-display-name Vapor --fallback-bundle-identifier Vapor --fallback-bundle-version 0 --output-dir /Users/timc/Library/Developer/Xcode/DerivedData/vapor-cqdzzgjeepmotwbyafffavrhgufz/Build/Products/Debug/Vapor.doccarchive --ide-console-output --diagnostics-file /Users/timc/Library/Developer/Xcode/DerivedData/vapor-cqdzzgjeepmotwbyafffavrhgufz/Build/Intermediates.noindex/vapor.build/Debug/Vapor.build/Vapor-diagnostics.json /Users/timc/Developer/Vapor/vapor/Sources/Vapor/Docs.docc --additional-symbol-graph-dir /Users/timc/Library/Developer/Xcode/DerivedData/vapor-cqdzzgjeepmotwbyafffavrhgufz/Build/Intermediates.noindex/vapor.build/Debug/Vapor.build/symbol-graph

error: Symbol with identifier 's:10Foundation24FloatingPointFormatStyleV7PercentV' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO11IntDivisionV' couldn't be found
error: Symbol with identifier 's:10Foundation4DateV18ISO8601FormatStyleV' couldn't be found
error: Symbol with identifier 's:10Foundation15AttributeScopesO0A10AttributesV011MeasurementB0V' couldn't be found
error: Symbol with identifier 's:10Foundation8CalendarV10IdentifierO' couldn't be found
error: Symbol with identifier 's:10Foundation6LocaleV' couldn't be found
error: Symbol with identifier 's:10Foundation15AttributeScopesO0A10AttributesV04LinkB0O' couldn't be found
error: Symbol with identifier 's:10Foundation20IntegerParseStrategyV' couldn't be found
error: Symbol with identifier 's:10Foundation19PropertyListDecoderC' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO15SequenceMaximumV' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO15SequenceMaximumV' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO11IntDivisionV' couldn't be found
error: Symbol with identifier 's:10Foundation4DataV11DeallocatorO' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO8NotEqualV' couldn't be found
error: Symbol with identifier 's:10Foundation6LocaleV6ScriptV' couldn't be found
error: Symbol with identifier 'c:@SA@NSDecimal' couldn't be found
error: Symbol with identifier 's:10Foundation4DateV15AttributedStyleV' couldn't be found
error: Symbol with identifier 's:10Foundation8CalendarV9ComponentO' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO6FilterV' couldn't be found
error: Symbol with identifier 's:10Foundation20PredicateExpressionsO34DictionaryKeyDefaultValueSubscriptV' couldn't be found
error: Symbol with identifier 's:12MultipartKit0A4PartV' couldn't be found
error: Symbol with identifier 's:10Foundation15AttributeScopesO0A10AttributesV019PersonNameComponentB0O0G0O' couldn't be found
...

Note: The errors disappear if the @_documentation(visibility: internal) attribute is removed; the issue appears to be the result of the combination of that attribute with @_exported.