-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[google_sign_in] Update Pigeon for non-nullable generics #7785
[google_sign_in] Update Pigeon for non-nullable generics #7785
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. 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. |
test-exempt: code refactor with no semantic change |
This is ready for review now; the PR description has been updated to explain the Android changes. |
* handles converting any FlutterErrors (or other {@code Throwable}s in case any non- FlutterError | ||
* exceptions slip through) thrown by the new code paths into {@code error} callbacks. | ||
*/ | ||
private abstract static class ErrorConvertingMethodChannelVoidResult |
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.
This is a duplicate of the class below, but adjusted to implement VoidResult
.
@@ -720,32 +744,35 @@ private void finishWithUserData(Messages.UserData data) { | |||
} | |||
|
|||
private void finishWithError(String errorCode, String errorMessage) { | |||
Messages.Result<?> result; |
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.
This had to be restructured because voidResult
is no longer assignable to Result<T>
.
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.
Lgtm! Thanks for the detailed explanation :)
flutter/packages@05bf1d4...bb00d34 2024-10-07 stuartmorgan@google.com [google_sign_in] Update Pigeon for non-nullable generics (flutter/packages#7785) 2024-10-07 stuartmorgan@google.com [path_provider] Update Android Pigeon for non-nullable generics (flutter/packages#7783) 2024-10-07 victoreronmosele@gmail.com [rfw] Increase tolerance for material widget tests (flutter/packages#7148) 2024-10-05 stuartmorgan@google.com [various] Update Java compatibility version to 11 (flutter/packages#7795) 2024-10-04 stuartmorgan@google.com [video_player] Update Pigeon for non-nullable generics (flutter/packages#7790) 2024-10-04 tobias@leafnode.se [go_router] Added missing implementation for the routerNeglect parameter in GoRouter (flutter/packages#7752) 2024-10-04 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_platform_interface] Convert `BitmapDescriptor` to typesafe subclasses (flutter/packages#7699) 2024-10-04 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_platform_interface] Convert `PatternItem` and `Cap` to typesafe structures. (flutter/packages#7703) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Updates the Pigeon definition to uses non-nullable generics now that it's possible.
In practice for this plugin it's currently a no-op: the only affected collection is passed from Dart to native, on the Dart side the source was already a
List<String>
, and on the native side we are using languages without nullability support in generics (Java and Obj-C). However, to do this now eliminates tech debt, and will avoid problems if/when the native side switches to Kotlin/Swift.The Android implementation required some non-trivial changes to adapt to an earlier Pigeon change that we hadn't picked up yet, which was the change from
Result<Void>
(which turned out to be incompatible with Kotlin) to the separateVoidResult
class.Part of flutter/flutter#155891
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.