Skip to content
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

Merged
merged 15 commits into from
Dec 16, 2023

Conversation

tarrinneal
Copy link
Contributor

fixes flutter/flutter#140045
replaces #5663 as no longer needed.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@stuartmorgan stuartmorgan left a 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.

@@ -1,3 +1,7 @@
## 15.0.2

* Prevents optional and non-positional parameters in flutterApis.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Flutter APIs.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@schultek
Copy link

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.

@stuartmorgan
Copy link
Contributor

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.

@schultek
Copy link

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.

@stuartmorgan
Copy link
Contributor

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.

@tarrinneal
Copy link
Contributor Author

LGTM, but isn't this only a partial fix for that issue? It says that Dart test code for Host APIs is also incorrect.

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.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit.

@@ -1,3 +1,7 @@
## 15.0.2

* Prevents optional and non-positional parameters in flutterApis.
Copy link
Contributor

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.

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2023
@auto-submit auto-submit bot merged commit d7dee79 into flutter:main Dec 16, 2023
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 18, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 18, 2023
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
CoderDake pushed a commit to CoderDake/flutter that referenced this pull request Dec 28, 2023
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
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: pigeon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pigeon] Fix named arguments in methods.
3 participants