Skip to content

Add script for bumping the Dart SDK#187800

Draft
Piinks wants to merge 10 commits into
flutter:masterfrom
Piinks:bump-script-and-docs
Draft

Add script for bumping the Dart SDK#187800
Piinks wants to merge 10 commits into
flutter:masterfrom
Piinks:bump-script-and-docs

Conversation

@Piinks

@Piinks Piinks commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 10, 2026
@github-actions github-actions Bot added team-infra Owned by Infrastructure team d: docs/ flutter/flutter/docs, for contributors labels Jun 10, 2026

@navaronbracke navaronbracke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a drive by review while skimming through an interesting addition to dev/tools :)

final String line = lines[i];
final String trimmed = line.trim();

if (trimmed.startsWith('environment:')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know there is stuff in flutter_tools to parse pubspecs as YamlMap's. Could we reuse that here? Or is that a little overkill for the script?

);

expect(exitCode, isNull);
expect(pubspec1.readAsStringSync(), contains(' sdk: ^3.13.0-0\n'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we verify that only the sdk line was updated and that the rest is unchanged?

For example for the first pubspec:

name: flutter
environment:
  sdk: ^3.13.0-0
dependencies:
  meta: any

expect(stderr.toString(), isEmpty);
});

test('ignores pubspec.yaml outside flutterRoot or in dot-directories', () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test technically only verifies the dot directory case and not a pubspec outside of the flutterRoot ?

For example, what about testing with the following in a new test

final File pubspec1 = fileSystem.file('/flutter/packages/flutter/pubspec.yaml');
final File pubspec2 = fileSystem.file('/bar/pubspec.yaml');

@Piinks
Piinks force-pushed the bump-script-and-docs branch from e557576 to 73b0a6f Compare June 22, 2026 23:26
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 22, 2026
@Piinks Piinks added the CICD Run CI/CD label Jun 22, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 22, 2026
@Piinks Piinks added the CICD Run CI/CD label Jun 22, 2026
…uments, skipping and flagging deviating packages
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 23, 2026
@Piinks Piinks added the CICD Run CI/CD label Jun 23, 2026
gmackall pushed a commit to gmackall/flutter that referenced this pull request Jun 24, 2026
…lutter#188357)

This bumps Dart across the repo to 3.11, with a few exceptions. I am
authoring a skill (tbd) and script
(flutter#187800) to do this in the
future.

After this, I will be moving us to 3.12 to continue to iterate on the
skill and script before proposing to check them in.

There are some places where the Dart version has deviated from the
consistent standard across the repo. I have considered changing these as
out of scope for this PR since they are broken when changed. We should
consider updating them to reflect a uniform version for the repo. They
made for interesting edge cases in the script and skill development. 🙂

- flutter/dev/integration_tests/widget_preview_scaffold/pubspec.
  yaml
- This is on Dart 3.12. It cannot be changed since the source code has
already adopted 3.12 language features
- All of these integration tests have a range set (>=3.5.0-0 <4.0.0),
and resolve to 3.13 in CI:
  - flutter/dev/integration_tests/data_asset_app/pubspec.yaml
  - flutter/dev/integration_tests/data_asset_package/pubspec.yaml
  - flutter/dev/integration_tests/record_use_test_app/pubspec.yaml
  - flutter/dev/integration_tests/record_use_test_package/pubspec.
  yaml
  - flutter/dev/integration_tests/hybrid_android_views/pubspec.
  yaml

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…lutter#188357)

This bumps Dart across the repo to 3.11, with a few exceptions. I am
authoring a skill (tbd) and script
(flutter#187800) to do this in the
future.

After this, I will be moving us to 3.12 to continue to iterate on the
skill and script before proposing to check them in.

There are some places where the Dart version has deviated from the
consistent standard across the repo. I have considered changing these as
out of scope for this PR since they are broken when changed. We should
consider updating them to reflect a uniform version for the repo. They
made for interesting edge cases in the script and skill development. 🙂

- flutter/dev/integration_tests/widget_preview_scaffold/pubspec.
  yaml
- This is on Dart 3.12. It cannot be changed since the source code has
already adopted 3.12 language features
- All of these integration tests have a range set (>=3.5.0-0 <4.0.0),
and resolve to 3.13 in CI:
  - flutter/dev/integration_tests/data_asset_app/pubspec.yaml
  - flutter/dev/integration_tests/data_asset_package/pubspec.yaml
  - flutter/dev/integration_tests/record_use_test_app/pubspec.yaml
  - flutter/dev/integration_tests/record_use_test_package/pubspec.
  yaml
  - flutter/dev/integration_tests/hybrid_android_views/pubspec.
  yaml

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
@Piinks Piinks added c: contributor-productivity Team-specific productivity, code health, technical debt. team-framework Owned by Framework team and removed team-infra Owned by Infrastructure team labels Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. CICD Run CI/CD d: docs/ flutter/flutter/docs, for contributors team-framework Owned by Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants