Repository navigation
Commit 39533da
authored
[go_router_builder] Allow
Widens the `build` constraint to `">=3.0.0 <6.0.0"` so apps can use `build_runner` 2.17.1, which requires `build` 5.
`build` 5.0.0 republishes the retracted 4.1.0 as a major version. Its only breaking change is the new `BuildStep.librarySourceSink` member, which breaks packages that implement `BuildStep`. `go_router_builder` only receives a `BuildStep` in `GoRouterGenerator.generate` and does not implement it, so no code changes are needed.
This also removes the `TODO(piinks): Pin version once new stable rolls.` above the constraint. It was added in flutter#10078 because the Flutter stable of the time pinned a `test` version that could not resolve `build` 4, so the range had to include `build` 3; the plan was to switch to `^4.0.0` once a newer stable shipped. The range is now meant to span `build` 4 and 5, and pinning to `^5.0.0` would force `build_runner` 2.17.1 and `analyzer` 14.3 on every user, so the TODO no longer applies. Happy to restore it if you'd rather keep it.
Tested locally on Flutter 3.47.8 (Dart 3.13.7), which resolves `build` 5.0.0, `build_test` 3.5.23, `build_runner` 2.17.1, `source_gen` 4.3.1 and `analyzer` 14.6.0:
- `custom-test --packages=go_router_builder` (the `tool/run_tests.dart` builder golden tests): all 56 pass.
- `dart-test --packages=go_router_builder --platform=vm`: all pass (10 in the package, 19 in the example). On stable the example still resolves `build` 4.0.11 and `build_runner` 2.16.1, because the `test_api` pinned by `flutter_test` caps `analyzer` below 14.
- `analyze --packages=go_router_builder`: no issues. `analyze --downgrade` resolves `build` 4.0.4 and also reports no issues.
Test exemption: this is a manual dependency roll that only widens a constraint. The existing builder tests cover generation with `build` 5 resolved.
Fixes flutter/flutter#194542
## Pre-Review Checklist
**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.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.build 5 (flutter#13455)1 parent c81561e commit 39533da
2 files changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
0 commit comments