Skip to content

Dart format changes are breaking CI #187204

Closed

Description

@Piinks

Help us understand the severity of this issue

  • breakage; unable to contribute or trigger builds will no workarounds
  • inconvenient workarounds exist, but significant effort required
  • needed for a Flutter team-wide priority (already agreed upon)
  • nice-to-have; none of the above

What do you need help with

Recent changes to dart_style have impacted our CI with many PRs blocked on formatting.

Not all of these changes we language versioned. Originally we thought it might be coming from the recent bump to Dart 3.13 (#186957), but they were not only behind that language version.

Looking into options to resolve, typically a formatting change requires closing the tree to reformat the whole repo.

Chatting with the infra team now, will update on these options:

  1. Revert [pubspec] Bump Dart SDK constraint to ^3.13.0 #186957, plan for tree closure, reformat, re-open.
    • Revert will not fully fix this
  2. Plan for tree closure, reformat, re-open
    • PRs are blocked in the meantime
  3. Disable formatting check, plan for tree closure, reformat, re-open

Activity

  1. self-assigned this
    on May 27, 2026
  2. munificent commented on May 27, 2026

    @munificent
    Contributor

    Providing some context for anyone following along. At least one of the failures is caused by this change to the formatter. I didn't make this change language-versioned because:

    1. It was fixing a bug. An optimization was falsely kicking in and forcing some lists to split that didn't need to. The output was never intended to look like this.

    2. I thought that very little code in the wild was affected by the fix. If I recall, I ran the change on a big random corpus of code and didn't see much effect. That's about what I expected for a bug that had been there for some time.

    It turns out that 2 might have been wrong. At least some Flutter test code does seem to encounter this bug. :(

    We could roll back the formatter change, but I think we shouldn't. The change really is fixing a bug where the formatter produces output that is unnecessarily split and was never intended to look like that. I could change the fix so that it only applies to language version 3.13 or higher but... it's a bug. It was wrong in older language versions too. And, realistically, it would probably take longer for my to make that change and roll it into the Dart SDK and into Flutter than it would to disable the format check and reformat Flutter. And, ultimately, I believe the new formatting style is better.

    I'm sorry for the unexpected breakage.

  3. added
    P2Important issues not at the top of the work list
    on Jun 8, 2026
  4. jtmcdole commented on Jun 8, 2026

    @jtmcdole
    Member

    Is this still "team-infra" or should it be something else?

  5. Piinks commented on Jun 8, 2026

    @Piinks
    ContributorAuthor

    We can put it on team-framework if you'd prefer. We can manage scheduling a tree closure to reformat and re-enable when we are ready I that SGT-you. :)

  6. munificent commented on Jun 9, 2026

    @munificent
    Contributor

    I've been busy fixing another urgent formatter issue, but I believe that's mostly wrapped up now. I have two more style changes out for review (dart-lang/dart_style#1848, dart-lang/dart_style#1849). I need to double-check, but I believe those are the last style changes I'll try to make for Dart 3.13. Once those land, I'll roll them into the Dart SDK repo (along with a few other style changes that have previously landed).

    When that roll has percolated through google3 and into Flutter, that should be all the style changes for a while. That will be a good time to reformat and then re-enable the CI check. I'll let you know when that's ready. Thanks for dealing with the churn!

  7. muhammadkamel commented on Jun 12, 2026

    @muhammadkamel
    Contributor

    Another related issue with the Testing sidebar is discussed here:

    dart-lang/dart_style#1840 (comment)

  8. munificent commented on Jun 25, 2026

    @munificent
    Contributor

    Update: The formatter style changes for Dart 3.13 have landed in the Dart SDK repo now. I don't know how long it takes for that to roll into the Flutter repos, but once those repos are using the latest Dart (i.e. anything after 1f44570e8d3bd1370abaf2c91b746cf94934c454), then it should be safe to re-format the Flutter repos and re-enable the CI. Thank you for your patience!

  9. Piinks commented on Jun 25, 2026

    @Piinks
    ContributorAuthor

    Awesome! Thanks @munificent!

  10. github-actions commented on Sep 26, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-infraOwned by Infrastructure teamtriaged-infraTriaged by Infrastructure team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions