-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[pigeon] fix int bug #7725
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
[pigeon] fix int bug #7725
Conversation
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.
Did you audit the other generators to make sure none of them have this same bug in the other direction (for calling a FlutterApi
with an int, and no custom types anywhere)?
Yeah, the change to handling ints is only a dart change so the logic doesn't exist in the other generators |
class _PigeonCodec extends StandardMessageCodec {
const _PigeonCodec();
@override
void writeValue(WriteBuffer buffer, Object? value) {
if (value is int) {
buffer.putUint8(4);
buffer.putInt64(value); // Unnecessary duplication of receiver. Try using a cascade to avoid the duplication
} else {
super.writeValue(buffer, value);
}
}
buffer..putUint8(4)
..putInt64(value);
|
This PR has already landed, and cannot be updated. The place to report issues with code that has already landed is the issue tracker.
That depends on your project's analysis settings; Dart has many optional analysis options, some of which are contradictory. We do not (and cannot, due to the contradictory settings) guarantee that all Pigeon-generated code will pass every possible set of analysis options.
You can put arbitrary text in the |
You're right, it seems that I have missed that the cascade_invocations is not part of the recommended nor the core lints provided by So an issue specific to a project and not part of this repo. Thank you for clarifying. |
flutter/packages@0321757...27c9853 2024-09-28 tarrinneal@gmail.com [pigeon] fix int bug (flutter/packages#7725) 2024-09-28 echo.ellet@gmail.com [pigeon] update deprecated command in README of the example (flutter/packages#7709) 2024-09-27 84049068+dhiaCodes@users.noreply.github.com [google_maps_flutter] Fix incorrect comment: Change "marker" to "polyline" (flutter/packages#7664) 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
flutter/packages@0321757...27c9853 2024-09-28 tarrinneal@gmail.com [pigeon] fix int bug (flutter/packages#7725) 2024-09-28 echo.ellet@gmail.com [pigeon] update deprecated command in README of the example (flutter/packages#7709) 2024-09-27 84049068+dhiaCodes@users.noreply.github.com [google_maps_flutter] Fix incorrect comment: Change "marker" to "polyline" (flutter/packages#7664) 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
fixes flutter/flutter#155512