Skip to content

@_exported import takes long time in Xcode 26.4.1 #1577

Description

@yo1995

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

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

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

  1. macOS 26.5.1 (25F80), Xcode 26.4.1, MacBook Pro with Apple M3 Pro
  2. Create a Swift package and add one line of import @_exported import Foundation to the main swift file
  3. Xcode > Product > Build Documentation
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctly

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions