Skip to content

[Xcode 27] flutter/packages "Swift format" repo check fails (swift-format moves @preconcurrency @testable import) #194268

Open

Description

@okorohelijah

"Swift format" in Mac_arm64 macos_repo_checks fails when the bots run Xcode 27.

https://ci.chromium.org/b/8668494649107525137 (staging.shadow run of the Xcode 27 CI experiment, flutter/packages#13158, sdk_version: 27a266a)

The step runs xcrun swift-format -i over every Swift file and then diffs. With the swift-format bundled in Xcode 27, exactly one file comes out different:

diff --git a/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.swift b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.swift
@@ -4,9 +4,10 @@
 import AVFoundation
 import Testing
-@preconcurrency @testable import video_player_avfoundation
 import video_player_avfoundation_objc

+@preconcurrency @testable import video_player_avfoundation
+
 #if os(iOS)
   import Flutter
 #else

The new formatter moves the attributed import (@preconcurrency @testable import …) out of the sorted import block into its own group. The current Xcode 26.2 (17c52) formatter leaves it in place, so the file is correctly formatted today and will stop being correctly formatted the moment the bots move to Xcode 27.

Options:

  • reorder that one import in VideoPlayerTests.swift so both formatter versions accept it (needs checking that Xcode 26.2's swift-format doesn't move it back), or
  • land the reformat together with the Xcode 27 roll.

Related: #194019 (the other Xcode 27 failures in the same experiment runs).

Activity

  1. added
    platform-iosiOS applications specifically
    packageflutter/packages repository. See also p: labels.
    P2Important issues not at the top of the work list
    team-iosOwned by iOS platform team
    on Oct 13, 2026
  2. added
    P1High-priority issues at the top of the work list
    triaged-iosTriaged by iOS platform team
    and removed
    P2Important issues not at the top of the work list
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions