You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f88712e
Browse filesBrowse the repository at this point in the historyBrowse files
description: Do not trigger automatically; only run when a user runs /bump-dart. Bump the minimum Dart SDK version constraint across the flutter/flutter repository, update dependency checksums, and run verification.
4
+
---
5
+
6
+
# Bumping the Dart SDK Version Constraint
7
+
8
+
## Important Rules
9
+
10
+
1.**Never Update Dependencies to 'any':** The skill must **never** change or update any dependency version constraint to `any` in order to resolve version conflicts.
11
+
2.**Pause and Ask on Issues:** If you run into any issues executing the task (e.g., version resolution failures, checksum mismatches, test failures, or analyzer errors), **do not** attempt to fix them by modifying other dependencies. Pause immediately, report the exact error details, and ask the user for instructions.
12
+
3.**Handle Language Feature Version Discrepancies:** If static analysis fails because a package uses language features from a newer SDK version than the requested target (e.g., `private-named-parameters` in `widget_preview_scaffold` requiring `3.12.0`), ask the user if that specific package should be targeted at the higher SDK version while the rest of the repository remains at the requested target.
13
+
14
+
## Step-by-Step Workflow
15
+
16
+
Follow these steps carefully to perform the bump, resolve dependencies, and verify the changes.
17
+
18
+
### Step 1: Pre-flight Checks
19
+
1.**Verify target version suffix:**
20
+
Ensure the version constraint specified by the user includes the `-0` pre-release suffix (e.g., `^3.13.0-0` instead of `^3.13.0`).
21
+
***Why:** Standard caret constraints like `^3.13.0` exclude pre-release versions of that major/minor release. Since active development and CI run on pre-releases, omitting the `-0` suffix will cause package resolution to fail. If the user provided a version without `-0`, append it or ask the user for confirmation.
22
+
2.**Ensure SDK is already rolled:**
23
+
The target Dart SDK version must already have rolled into the repository (e.g. the local Dart SDK from the Engine stamp is at least that version). Otherwise, package resolution and analysis will fail.
24
+
25
+
### Step 2: Update `pubspec.yaml` Files
26
+
Run the repository's Dart tool script to update matching `pubspec.yaml` files cross-platform:
* The script only updates packages whose current SDK constraint matches `<OLD_VERSION_CONSTRAINT>`. If it encounters packages with deviating constraints (e.g. higher SDK versions like `^3.12.0` or custom ranges), it leaves them untouched and prints a message flagging them to the user.
34
+
35
+
### Step 3: Update Dependency Checksums and Hashes
36
+
Flutter enforces dependency integrity via checksums. Run the `update-packages` tool to re-solve the package workspace, generate updated `pubspec.lock` files, and update the checksums:
Verify the new constraints solve correctly and do not introduce any analyzer errors, warnings, lints (infos), or deprecations.
44
+
45
+
Run static analysis:
46
+
```bash
47
+
flutter analyze --flutter-repo
48
+
```
49
+
* Treat any non-zero exit code from `flutter analyze` as a failure. Do not ignore `info` (lint) or `warning` diagnostics, as the Flutter repository requires all analysis issues to be clean. Pay close attention to newly firing lints or deprecated lint rule warnings.
Always write a detailed report of the bump execution to a file named `bump_results.md` in the workspace root (e.g., `<flutter_root>/bump_results.md`). The file must include:
54
+
- Target SDK version and current Engine SDK version.
55
+
- The exact bump command run.
56
+
- Count/details of updated `pubspec.yaml` files.
57
+
- List of skipped/flagged packages with their constraints.
58
+
- Results of the `update-packages` and static analysis runs (highlighting any failures, warnings, or newly firing lints).
59
+
2.**Handle Failure/Success:**
60
+
- If static analysis fails (even if it only contains `info` or `warning` diagnostics like `prefer_initializing_formals` or `deprecated_lint`), list the failures/warnings in `bump_results.md`, report them to the user, and ask for guidance (or proceed to fix them if instructed).
61
+
- If static analysis passes, point the user to `bump_results.md` in the workspace root, show a summary of modified files (`git status`), and prompt the user to commit the changes and prepare a pull request.
Please ensure that you are following the [Flutter RFC Process](https://github.com/flutter/rfc/blob/main/rfc/000.0002-flutter-rfc-review-process.md)
11
+
and our [Design Documents guide](https://github.com/flutter/flutter/blob/main/docs/contributing/Design-Documents.md)
12
12
when sharing a design document.
13
13
14
14
Please fill out the sections below to the best of your ability.
15
15
- type: input
16
16
id: document_link
17
17
attributes:
18
-
label: Document Link
18
+
label: RFC Pull Request Link
19
19
description: |
20
-
Insert the "https://flutter.dev/go" link for your document here.
21
-
For details on creating a link, see the instructions in
Insert the link to your RFC pull request in flutter/rfc (e.g. "https://github.com/flutter/rfc/pull/...").
and https://github.com/flutter/flutter/blob/main/docs/contributing/Design-Documents.md
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,8 @@ To learn more about code review, see our documentation on Tree Hygiene: https://
18
18
-[ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
19
19
-[ ] I signed the [CLA].
20
20
-[ ] I listed at least one issue that this PR fixes in the description above.
21
-
-[ ] I updated/added relevant documentation (doc comments with `///`).
21
+
-[ ] I updated/added relevant in-code documentation (doc comments with `///`).
22
+
-[ ] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed).
22
23
-[ ] I added new tests to check the change I am making, or this PR is [test-exempt].
23
24
-[ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
24
25
-[ ] All existing and new tests are passing.
@@ -38,6 +39,7 @@ If this change needs to override an active code freeze, provide a comment explai
38
39
[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
0 commit comments