swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.6k stars 10.37k forks source link

Swift DocC failed to build the documentation with CXX interop #65395

Open SpectralDragon opened 1 year ago

SpectralDragon commented 1 year ago

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

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 ```bash :0: error: fatal error encountered while reading from module 'Foundation'; please submit a bug report (https://swift.org/contributing/#reporting-bugs) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace. Stack dump: 0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/DerivedSources/resource_bundle_accessor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/AdaEngine.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Application/Alert.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Application/AppCreate/AppScene.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Application/AppCreate/ApplicationCreate.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Application/AppCreate/InternalAppScene.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Platforms/Linux/LinuxApplication.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Platforms/Linux/LinuxWindowManager.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Platforms/RuntimePlatform.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/MetalRenderBackend.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/MetalRenderContext.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalFramebuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalIndexBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalRenderPipeline.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalSampler.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalShader.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalUniformBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalUniformBufferSet.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/Metal/Misc/MetalVertexBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Backends/RenderBackend.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/GUIRenderContext.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/Material.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/MaterialStorage.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/ReflectedMaterial/CanvasMaterial.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/ReflectedMaterial/CustomMaterial.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/ReflectedMaterial/MaterialBindings.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Materials/ReflectedMaterial/ReflectedMaterial.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Mesh/Mesh.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Mesh/MeshArray.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Mesh/MeshDescriptor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/Buffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/DrawList.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/Framebuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/IndexBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/RenderMisc.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/RenderPipeline.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/Sampler.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/TextureDescriptor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/UniformBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/UniformBufferSet.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/VertexBuffer.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Misc/VertexDescriptor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderEngine.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderGraph/RenderGraph.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderGraph/RenderGraphContext.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderGraph/RenderGraphExecutor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderGraph/RenderNode.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderGraph/RenderResource.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderItems/DrawPass.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderItems/DrawPassStorage.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderItems/RenderItem.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/RenderView.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Renderer2D.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/Shader.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderCache.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderCompiler.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderIncluder.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderModule.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderResource.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderSource.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderUniformValue.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/ShaderUtils.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Rendering/Shaders/SpirvCompiler.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/BatchTransparent2DItemsSystem.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Components/Circle2DComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Components/SpriteComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Mesh2d/Mesh2DComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Mesh2d/Mesh2DDrawPass.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Mesh2d/Mesh2DPlugin.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/OrthographicCamera.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Sprite/SpriteDrawPass.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Sprite/SpritePlugin.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Sprite/SpriteRenderSystem.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/2D/Text2DComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/3D/Components/ModelComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/3D/Components/SpotlightComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/3D/PerspectiveCamera.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/BoundingComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/CameraComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/RelationshipComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/Transform.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/Utils/RequiredComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/Visibility/VisibilityComponents.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Components/VisibleEntities.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Component/Component+Runtime.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Component/Component.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Component/ScriptComponent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Entity/Entity+ComponentSet.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Entity/Entity.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/Entity/Query.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/System/System+Runtime.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/System/System.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/System/SystemDependency.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/System/SystemsGraph.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/System/SystemsGraphExecutor.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/World/Archetype.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/ECS/World/World.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/Entities/EmptyEntity.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/InputManager/Events/InputEvent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/InputManager/Events/KeyEvent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Scene/InputManager/Events/MouseEvent.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Utils/Time.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Utils/Version.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Utils/Weak/WeakBox.swift /Users/v.prusakov/Developer/AdaEngine/Sources/AdaEngine/Utils/Weak/WeakSet.swift -target arm64-apple-macos11.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -enable-experimental-cxx-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -I /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/PackageFrameworks -F /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -no-color-diagnostics -enable-testing -g -module-cache-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D METAL -D MACOS -D Xcode -serialize-debugging-options -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/v.prusakov/Developer/AdaEngine -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/GeneratedModuleMaps/glslang.modulemap -Xcc -fmodule-map-file=/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/GeneratedModuleMaps/box2d.modulemap -Xcc -fmodule-map-file=/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/GeneratedModuleMaps/SPIRV-Cross.modulemap -Xcc -fmodule-map-file=/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/GeneratedModuleMaps/libpng.modulemap -Xcc -ivfsstatcache -Xcc /Users/v.prusakov/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/macosx13.3-22E245-.sdkstatcache -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/swift-overrides.hmap -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/msdf-atlas-gen/msdfgen -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/msdf-atlas-gen/tinyxml -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/msdf-atlas-gen/freetype/include -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/msdf-atlas-gen/msdf-atlas-gen -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/glslang -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/box2d-swift/Sources/box2d/include -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/Yams/Sources/CYaml/include -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/SourcePackages/checkouts/SPIRV-Cross -Xcc -I/Users/v.prusakov/Developer/AdaEngine/Sources/AdaBox2d -Xcc -I/Users/v.prusakov/Developer/AdaEngine/Sources/SPIRVCompiler -Xcc -I/Users/v.prusakov/Developer/AdaEngine/Sources/libpng/include -Xcc -I/Users/v.prusakov/Developer/AdaEngine/Sources/AtlasFontGenerator -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Products/Debug/include -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/DerivedSources-normal/arm64 -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/DerivedSources/arm64 -Xcc -I/Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG=1 -module-name AdaEngine -disable-clang-spi -target-sdk-version 13.3 -target-sdk-name macosx13.3 -emit-module-doc-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine.swiftdoc -emit-module-source-info-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine.swiftsourceinfo -emit-objc-header-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine-Swift.h -serialize-diagnostics-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine-master-emit-module.dia -emit-dependencies-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine-master-emit-module.d -emit-symbol-graph -emit-symbol-graph-dir /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/symbol-graph/swift/arm64-apple-macos -o /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine.swiftmodule -emit-abi-descriptor-path /Users/v.prusakov/Library/Developer/Xcode/DerivedData/AdaEngine-gqjiszcjtbovcjfscehzebmrobkz/Build/Intermediates.noindex/AdaEngine.build/Debug/AdaEngine.build/Objects-normal/arm64/AdaEngine.abi.json 1. Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100) 2. Compiling with the current language version 3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Non-Diagnostic Mandatory Optimizations, Serialization, Rest of Onone } on SIL for AdaEngine) 4. While running pass #28436 SILModuleTransform "SerializeSILPass". 5. While reading from 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' 6. While finishing conformance for protocol conformance to 'AttributedStringKey' (in module 'Foundation') for type 'AttributeScopes.FoundationAttributes.InlinePresentationIntentAttribute' 7. *** 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 Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 swift-frontend 0x0000000105a83300 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56 1 swift-frontend 0x0000000105a822e4 llvm::sys::RunSignalHandlers() + 112 2 swift-frontend 0x0000000105a83910 SignalHandler(int) + 344 3 libsystem_platform.dylib 0x0000000180df72a4 _sigtramp + 56 4 libsystem_pthread.dylib 0x0000000180dc8cec pthread_kill + 288 5 libsystem_c.dylib 0x0000000180d022c8 abort + 180 6 swift-frontend 0x0000000101694208 swift::ModuleFileSharedCore::outputDiagnosticInfo(llvm::raw_ostream&) const + 0 7 swift-frontend 0x00000001016312b0 swift::ModuleFile::getContext() const + 0 8 swift-frontend 0x0000000101630ec8 swift::ModuleFile::fatal(llvm::Error) const + 44 9 swift-frontend 0x0000000101659c58 swift::ModuleFile::finishNormalConformance(swift::NormalProtocolConformance*, unsigned long long) + 5800 10 swift-frontend 0x00000001021348a8 swift::NormalProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::SubstOptions) const + 76 11 swift-frontend 0x0000000102134298 swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::SubstOptions) const + 376 12 swift-frontend 0x00000001021c42ec getMemberForBaseType(llvm::function_ref, swift::Type, swift::Type, swift::AssociatedTypeDecl*, swift::Identifier, swift::SubstOptions) + 1236 13 swift-frontend 0x00000001021cd310 llvm::Optional llvm::function_ref (swift::TypeBase*)>::callback_fn, llvm::function_ref, swift::SubstOptions)::$_27>(long, swift::TypeBase*) + 2148 14 swift-frontend 0x00000001021c6c30 swift::Type::transformWithPosition(swift::TypePosition, llvm::function_ref (swift::TypeBase*, swift::TypePosition)>) const + 92 15 swift-frontend 0x00000001021c46c0 substType(swift::Type, llvm::function_ref, llvm::function_ref, swift::SubstOptions) + 288 16 swift-frontend 0x00000001014e4744 swift::Requirement swift::Requirement::subst(swift::SubstitutionMap&) const + 92 17 swift-frontend 0x00000001015d2f58 swift::SynthesizedExtensionAnalyzer::Implementation::isApplicable(swift::ExtensionDecl*, bool, swift::ExtensionDecl*, swift::NormalProtocolConformance*)::'lambda'(swift::SubstitutionMap, swift::ExtensionDecl*, llvm::ArrayRef)::operator()(swift::SubstitutionMap, swift::ExtensionDecl*, llvm::ArrayRef) const + 856 18 swift-frontend 0x00000001015d2628 swift::SynthesizedExtensionAnalyzer::Implementation::isApplicable(swift::ExtensionDecl*, bool, swift::ExtensionDecl*, swift::NormalProtocolConformance*) + 476 19 swift-frontend 0x00000001015cfe84 swift::SynthesizedExtensionAnalyzer::Implementation::collectSynthesizedExtensionInfo(std::__1::vector >&) + 704 20 swift-frontend 0x000000010159b60c swift::symbolgraphgen::SymbolGraph::recordConformanceSynthesizedMemberRelationships(swift::symbolgraphgen::Symbol) + 264 21 swift-frontend 0x000000010159aeb4 swift::symbolgraphgen::SymbolGraph::recordNode(swift::symbolgraphgen::Symbol) + 116 22 swift-frontend 0x00000001015a11fc swift::symbolgraphgen::SymbolGraphASTWalker::walkToDeclPre(swift::Decl*, swift::CharSourceRange) + 1244 23 swift-frontend 0x00000001015df1dc (anonymous namespace)::SemaAnnotator::walkToDeclPre(swift::Decl*) + 2448 24 swift-frontend 0x0000000101f51dc0 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 240 25 swift-frontend 0x0000000101f59850 (anonymous namespace)::Traversal::visit(swift::Decl*) + 2900 26 swift-frontend 0x0000000101f51de8 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 280 27 swift-frontend 0x00000001015dd7dc swift::SourceEntityWalker::walk(swift::Decl*) + 164 28 swift-frontend 0x000000010159f904 swift::symbolgraphgen::emitSymbolGraphForModule(swift::ModuleDecl*, swift::symbolgraphgen::SymbolGraphOptions const&) + 904 29 swift-frontend 0x0000000100b37b8c swift::serialize(llvm::PointerUnion, swift::SerializationOptions const&, swift::symbolgraphgen::SymbolGraphOptions const&, swift::SILModule const*, swift::fine_grained_dependencies::SourceFileDepGraph const*) + 732 30 swift-frontend 0x0000000100977880 bool llvm::function_ref::callback_fn >, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*)::$_25::operator()() const::'lambda'(swift::fine_grained_dependencies::SourceFileDepGraph&&)>(long, swift::fine_grained_dependencies::SourceFileDepGraph&&) + 40 31 swift-frontend 0x00000001020a54c4 swift::fine_grained_dependencies::withReferenceDependencies(llvm::PointerUnion, swift::DependencyTracker const&, llvm::StringRef, bool, llvm::function_ref) + 152 32 swift-frontend 0x00000001009777f4 std::__1::__function::__func >, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*)::$_25, std::__1::allocator >, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*)::$_25>, void ()>::operator()() + 260 33 swift-frontend 0x0000000101472914 SerializeSILPass::run() + 76 34 swift-frontend 0x00000001013254a0 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 15312 35 swift-frontend 0x0000000101346a04 swift::SimpleRequest (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56 36 swift-frontend 0x000000010132cdd4 llvm::Expected swift::Evaluator::getResultUncached(swift::ExecuteSILPipelineRequest const&) + 484 37 swift-frontend 0x000000010132f8dc swift::runSILPassesForOnone(swift::SILModule&) + 156 38 swift-frontend 0x0000000100b0dc04 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 512 39 swift-frontend 0x000000010097151c performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr >, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1040 40 swift-frontend 0x0000000100974ab8 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 3288 41 swift-frontend 0x0000000100972944 swift::performFrontend(llvm::ArrayRef, char const*, void*, swift::FrontendObserver*) + 4308 42 swift-frontend 0x000000010093768c swift::mainEntry(int, char const**) + 4116 43 dyld 0x0000000180a9fe50 start + 2544 Command SwiftEmitModule failed with a nonzero exit code ```

I 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

  1. Download SPM package from repository: https://github.com/AdaEngine/AdaEngine
  2. Run next command in terminal swift package --disable-sandbox plugin preview-documentation --target AdaEngine --verbose or build documentation using Xcode tools

Swift-DocC Version Information

1.2.0 DocC SPM Plugin

Swift Compiler Version Information

swift-driver version: 1.75.2 swift-driver version: 1.75.2 swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Target: arm64-apple-macosx13.0
ethan-kusters commented 1 year ago

This looks like a bug in the compiler's symbolgraphgen tool. CC: @QuietMisdreavus

QuietMisdreavus commented 1 year ago

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