Description
Build Documentation (CompileDocumentation) hangs for @_exported import when the imported library is big with many symbols, such as @_exported import Foundation or @_exported import SwiftUI. They are still running after 10 minutes, and takes 1100% CPU while running.
It doesn't hang when the library isn't big, such as @_exported import Combine that takes 8 seconds to finish.
This problem is not reproducible on Xcode 27 beta.
Checklist
Expected Behavior
Xcode > Product > Build Documentation should only take a little bit of time to complete
Actual behavior
It hangs more than 10 minutes to build documentation.
Steps To Reproduce
- macOS 26.5.1 (25F80), Xcode 26.4.1, MacBook Pro with Apple M3 Pro
- Create a Swift package and add one line of import
@_exported import Foundation to the main swift file
- Xcode > Product > Build Documentation
- The docc process takes 1100% CPU and the build process hangs
Swift-DocC Version Information
The DocC comes with Xcode 26.4.1
Swift Compiler Version Information
swift-driver version: 1.148.6 Apple Swift version 6.3.1 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
Target: arm64-apple-macosx26.0
Description
Build Documentation (
CompileDocumentation) hangs for@_exported importwhen the imported library is big with many symbols, such as@_exported import Foundationor@_exported import SwiftUI. They are still running after 10 minutes, and takes 1100% CPU while running.It doesn't hang when the library isn't big, such as
@_exported import Combinethat takes 8 seconds to finish.This problem is not reproducible on Xcode 27 beta.
Checklist
mainbranch of this package.Expected Behavior
Xcode > Product > Build Documentation should only take a little bit of time to complete
Actual behavior
It hangs more than 10 minutes to build documentation.
Steps To Reproduce
@_exported import Foundationto the main swift fileSwift-DocC Version Information
The DocC comes with Xcode 26.4.1
Swift Compiler Version Information