Skip to content

Swift 6 compilation performance regression #75107

Open
@NachoSoto

Description

@NachoSoto

Description

The following code now takes over 200ms to type-check (this wasn't an issue with Xcode 16 beta 2):

Expression took 226ms to type-check (limit: 200ms)

Reproduction

@MainActor
public enum Haptics {
  private static let engine: CHHapticEngine? = try? CHHapticEngine()
}

Expected behavior

Type-checks in reasonable time.

Environment

swift-driver version: 1.111.2 Apple Swift version 6.0 (swiftlang-6.0.0.5.15 clang-1600.0.22.6)
Target: arm64-apple-macosx14.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.performancetype checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions