Open SpectralDragon opened 1 year ago
This looks like a bug in the compiler's symbolgraphgen
tool. CC: @QuietMisdreavus
This seems deeper than SymbolGraphGen, since the failure in Xcode was reported in deserializing the Foundation module:
*** DESERIALIZATION FAILURE ***
*** If any module named here was modified in the SDK, please delete the ***
*** new swiftmodule files from the SDK and keep only swiftinterfaces. ***
module 'Foundation', builder version '5.8(5.8)/Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)', built from swiftinterface, resilient, loaded from '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/13.3/Foundation.swiftmodule/arm64e-apple-macos.swiftmodule'
could not deserialize extension: top-level value not found (InlinePresentationIntent)
Cross-reference to module 'Foundation'
... InlinePresentationIntent
cc @artemcm since you're in the code-owners file for the module serialization code
Description
I encountered a bug when the DocC compiler tried to build my SPM package I received the following error:
fatal error encountered while reading from module 'Foundation'
.In my opinion, there might be an issue with
Foundation
and the.unsafeFlags(["-enable-experimental-cxx-interop"])
line in my Package.swift file. My DocC worked perfectly before I enabled this new cxx-interop flag.Checklist
main
branch of this package.Expected Behavior
DocC will finished with success and create local server with documentations.
Actual behavior
When I builded with Xcode DocC I received the following output:
Xcode Output
```bashI also attempted to build my documentation from the terminal using the command below and received the following error message:
Terminal Output
```bash Building for debugging... Build complete! (0.64s) symbol graph options: 'SymbolGraphOptions(minimumAccessLevel: PackagePlugin.PackageManager.SymbolGraphOptions.AccessLevel.public, includeSynthesized: true, includeSPI: false, emitExtensionBlocks: false)' Building for debugging... Build complete! (0.26s) target symbol graph directory path: '/Users/v.prusakov/Developer/AdaEngine/.build/arm64-apple-macosx/extracted-symbols/adaengine/AdaEngine' snippet extractor provided, attempting to generate snippet symbol graph no snippet symbol graphs generated error: 'AdaEngine' does not contain any documentable symbols or a DocC catalog and will not produce documentation ```Steps To Reproduce
swift package --disable-sandbox plugin preview-documentation --target AdaEngine --verbose
or build documentation using Xcode toolsSwift-DocC Version Information
1.2.0 DocC SPM Plugin
Swift Compiler Version Information