-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove flutter api named and optional parameters #5689
Remove flutter api named and optional parameters #5689
Conversation
This reverts commit 6f85a29.
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, but isn't this only a partial fix for that issue? It says that Dart test code for Host APIs is also incorrect.
packages/pigeon/CHANGELOG.md
Outdated
@@ -1,3 +1,7 @@ | |||
## 15.0.2 | |||
|
|||
* Prevents optional and non-positional parameters in flutterApis. |
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.
Nit: Flutter APIs.
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 didn't get changed.
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.
change must have gotten lost when I merged branches, I definitely changed it.
Yeah it was generating incorrect code for the host api tests (which internally use the flutter api code) so I thought when fixing the bug its not much more to support flutter api in general. |
Meaningfully supporting named and optional parameters in Flutter APIs would require supporting those things in all of the native generators, since that's where they are called from, and it would be a substantial amount of work to define what that would even mean in each language. |
Its obvs your choice, but I thought it could just be named on dart side and treated as normal positionals on native side. From my tests that seemed to work. |
It's not that it doesn't work, it's that it doesn't really accomplish anything. The value of optional and named parameters is to callers, not within the implementation, and Pigeon clients never call Flutter API Dart code from Dart. |
So right you are. Sorry @schultek for wrongfully closing your pr. I've pulled your changes in to this one to make sure you get credit. |
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 with nit.
packages/pigeon/CHANGELOG.md
Outdated
@@ -1,3 +1,7 @@ | |||
## 15.0.2 | |||
|
|||
* Prevents optional and non-positional parameters in flutterApis. |
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 didn't get changed.
flutter/packages@3f2e16b...d7dee79 2023-12-16 [email protected] Remove flutter api named and optional parameters (flutter/packages#5689) 2023-12-15 [email protected] Manual roll Flutter (stable) from b0366e0 to 2e9cb0a (4 revisions) (flutter/packages#5692) 2023-12-15 [email protected] [extension_google_sign_in_as_googleapis_auth] Adopt code excerpts in � (flutter/packages#5496) 2023-12-15 [email protected] Roll Flutter from a51e33a to 2407f69 (30 revisions) (flutter/packages#5691) 2023-12-15 [email protected] [google_sign_in_ios] Move pigeon as a dev dependency (flutter/packages#5685) 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 [email protected],[email protected] 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@3f2e16b...d7dee79 2023-12-16 [email protected] Remove flutter api named and optional parameters (flutter/packages#5689) 2023-12-15 [email protected] Manual roll Flutter (stable) from b0366e0 to 2e9cb0a (4 revisions) (flutter/packages#5692) 2023-12-15 [email protected] [extension_google_sign_in_as_googleapis_auth] Adopt code excerpts in � (flutter/packages#5496) 2023-12-15 [email protected] Roll Flutter from a51e33a to 2407f69 (30 revisions) (flutter/packages#5691) 2023-12-15 [email protected] [google_sign_in_ios] Move pigeon as a dev dependency (flutter/packages#5685) 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 [email protected],[email protected] 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#140045 replaces flutter#5663 as no longer needed.
fixes flutter/flutter#140045
replaces #5663 as no longer needed.
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.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.