Skip to content

Commit 39533da

Browse files
authored
[go_router_builder] Allow build 5 (flutter#13455)
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.
1 parent c81561e commit 39533da

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/go_router_builder/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.5.3
2+
3+
* Widens `package:build` dependency constraint to `>=3.0.0 <6.0.0`.
4+
15
## 4.5.2
26

37
- Adopts shared analyzer helpers from `package:source_helper` `^1.4.0`.

‎packages/go_router_builder/pubspec.yaml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: go_router_builder
22
description: >-
33
A builder that supports generated strongly-typed route helpers for
44
package:go_router
5-
version: 4.5.2
5+
version: 4.5.3
66
repository: https://github.com/flutter/packages/tree/main/packages/go_router_builder
77
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router_builder%22
88

@@ -13,8 +13,7 @@ environment:
1313
dependencies:
1414
analyzer: ">=8.2.0 <15.0.0"
1515
async: ^2.8.0
16-
# TODO(piinks): Pin version once new stable rolls.
17-
build: ">=3.0.0 <5.0.0"
16+
build: ">=3.0.0 <6.0.0"
1817
build_config: ^1.0.0
1918
collection: ^1.14.0
2019
meta: ^1.7.0

0 commit comments

Comments
 (0)