Skip to content

Code completion timeouts in SourceKit stress tester after updating CI to Xcode 15.1 #71077

Open
@ahoppen

Description

@ahoppen

After updating CI to Xcode 15.1, quite a few code completions started timing out.

Reducing these tests is always hard but here’s a reduced test case that takes 10s to produce code completion results, based on one of the timeouts.

public struct Section<Content> {
  init(@ViewBuilder content: () -> Content) {}
}

struct ConditionalContent<FalseContent, TrueContent> {}
struct TupleView<T> {}
struct Text {}

@resultBuilder struct ViewBuilder {
  static func buildBlock<Content>(_ content: Content) -> Content { content }
  static func buildBlock<each Content>(_ content: repeat each Content) -> TupleView<(repeat each Content)> { TupleView() }
  static func buildIf<Content>(_ content: Content?) -> Content? { nil }
  static func buildEither<TrueContent, FalseContent>(first: TrueContent) -> ConditionalContent<TrueContent, FalseContent> { ConditionalContent() }
  static func buildEither<TrueContent, FalseContent>(second: FalseContent) -> ConditionalContent<TrueContent, FalseContent> { ConditionalContent() }
}

func test() {
  Section {
    if true {
      Text()
    } else if #^COMPLETE^# {
      Text()
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    code completionArea → source tooling: code completionfound by stress testerFlag: An issue found by the SourceKit stress tester

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions