-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[go_router_builder] Bump analyzer dependency to 8.2.0. #10079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[go_router_builder] Bump analyzer dependency to 8.2.0. #10079
Conversation
In an upcoming Dart SDK change (https://dart-review.googlesource.com/c/sdk/+/450970), I intend to add logic to the analyzer for generating a warning if an API marked `@experimental` is used. This will allow experimental analyzer features to be developed without creating a risk of breaking changes downstream. To prepare for this, release `8.2.0` of the analyzer removes several old `@experimental` annotations that were out of date. To avoid breaking trybots, those removals need to roll into flutter before we can land https://dart-review.googlesource.com/c/sdk/+/450970.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the analyzer dependency to version ^8.2.0. The code changes are necessary adaptations for breaking changes introduced in the new version of the analyzer package. This includes handling nullability for element names by adding null assertions (!), and updating API usage from deprecated properties like parameters to formalParameters on FunctionType, and replacing getDisplayString() with displayName where the method signature changed. The changes are correct and directly related to the dependency upgrade.
chunhtai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code LGTM. Can you write c change log entry and bump the version? it seems like this pr warrants a new release.
Sure, I'll be happy to do that. Any idea what to do about the check failures? It looks like there are version solving issues (see https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8702737759630305985/+/u/Run_package_tests/custom_package_tests/stdout). But when I run |
Hey @stuartmorgan-g, @bkonyi suggested that you might be a good person to ask about the version solving issue that's coming up in the checks (see above). Digging a little further, the error I get from the bot says (among other things): But if I look in the pubspec of my checkout of flutter, I see So I presume what is happening is that this is a bot that tests the current version of Assuming I'm right about that, then I guess bumping to analyzer 8.2.0 right now is just not an option. So I will try making an alternative PR that uses |
In an upcoming Dart SDK change (https://dart-review.googlesource.com/c/sdk/+/450970), I intend to add logic to the analyzer for generating a warning if an API marked `@experimental` is used. This will allow experimental analyzer features to be developed without creating a risk of breaking changes downstream. Unfortunately, the `go_router_builder` package uses an old version of the analyzer in which some parts of the API were marked as `@experimental`, even though they were fully supported. So to avoid breaking trybots when the new warning rolls out, I need to add `// ignore` comments to ignore the upcoming warnings. In a future PR, I intend to bump the `go_router_builder` package's analyzer dependency to 8.2.0; in that analyzer version, the erroneous `@experimental` annotations have been removed. Unfortunately, that can't be done yet, since `go_router_builder` still needs to support versions of flutter that pin analyzer to an earlier version. (See flutter#10079, which attempts to bump the analyzer dependency, but breaks trybots).
This comment was marked as off-topic.
This comment was marked as off-topic.
What version of Flutter are you using? It sounds like probably
The bot labeled
That's my reading of the resolver output as well.
Dropping N-1 and N-2 support is an option, but breaking compatibility with |
Gotcha, thanks. I'll close this PR and go with #10082 then. |
In an upcoming Dart SDK change (https://dart-review.googlesource.com/c/sdk/+/450970), I intend to add logic to the analyzer for generating a warning if an API marked `@experimental` is used. This will allow experimental analyzer features to be developed without creating a risk of breaking changes downstream. Unfortunately, the `go_router_builder` package uses an old version of the analyzer in which some parts of the API were marked as `@experimental`, even though they were fully supported. So to avoid breaking trybots when the new warning rolls out, I need to add `// ignore` comments to ignore the upcoming warnings. In a future PR, I intend to bump the `go_router_builder` package's analyzer dependency to 8.2.0; in that analyzer version, the erroneous `@experimental` annotations have been removed. Unfortunately, that can't be done yet, since `go_router_builder` still needs to support versions of flutter that pin analyzer to an earlier version. (See flutter#10079, which attempts to bump the analyzer dependency, but breaks trybots).
…s. (#10082) In an upcoming Dart SDK change (https://dart-review.googlesource.com/c/sdk/+/450970), I intend to add logic to the analyzer for generating a warning if an API marked `@experimental` is used. This will allow experimental analyzer features to be developed without creating a risk of breaking changes downstream. Unfortunately, the `go_router_builder` package uses an old version of the analyzer in which some parts of the API were marked as `@experimental`, even though they were fully supported. So to avoid breaking trybots when the new warning rolls out, I need to add `// ignore` comments to ignore the upcoming warnings. In a future PR, I intend to bump the `go_router_builder` package's analyzer dependency to 8.2.0; in that analyzer version, the erroneous `@experimental` annotations have been removed. Unfortunately, that can't be done yet, since `go_router_builder` still needs to support versions of flutter that pin analyzer to an earlier version. (See #10079, which attempts to bump the analyzer dependency, but breaks trybots).
In an upcoming Dart SDK change
(https://dart-review.googlesource.com/c/sdk/+/450970), I intend to add logic to the analyzer for generating a warning if an API marked
@experimentalis used. This will allow experimental analyzer features to be developed without creating a risk of breaking changes downstream.To prepare for this, release
8.2.0of the analyzer removes several old@experimentalannotations that were out of date. To avoid breaking trybots, those removals need to roll into flutter before we can land https://dart-review.googlesource.com/c/sdk/+/450970.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.
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3