Skip to content

[pigeon] add flutter api protocol #5181

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

Merged

Conversation

tarrinneal
Copy link
Contributor

@tarrinneal tarrinneal commented Oct 19, 2023

Protocols to make testing with mocks easier.

Fixes flutter/flutter#136811

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.

@tarrinneal tarrinneal changed the title first draft [pigeon] add flutter api protocol Oct 19, 2023
@tarrinneal tarrinneal marked this pull request as ready for review October 19, 2023 10:16
@tarrinneal
Copy link
Contributor Author

tarrinneal commented Oct 19, 2023

I feel the current tests provide coverage for this change, I'm hoping to avoid adding more unit tests. I can add more if you think it's necessary @stuartmorgan. (We are also getting usage on this through #5159)

Nevermind. There may be a better way to handle the unit. I don't love it as is.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g 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 nits!

I was just thinking this would have a Dart unit test of generator output that protocol Foo existed and the class conformed to Foo, but this real-world usage test is definitely better.

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 19, 2023
@auto-submit auto-submit bot merged commit 24654d3 into flutter:main Oct 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 20, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 20, 2023
flutter/packages@09c6b11...be915be

2023-10-20 737941+loic-sharma@users.noreply.github.com [ci] Finalize migration to x64 specific Windows platform (flutter/packages#5174)
2023-10-19 15619084+vashworth@users.noreply.github.com [image_picker_ios] Update UITests for Xcode 15/iOS 17 (flutter/packages#5176)
2023-10-19 stuartmorgan@google.com [ci] Add emulator tests on older Android version (flutter/packages#4616)
2023-10-19 engine-flutter-autoroll@skia.org Roll Flutter from 189196d to c2bd2c1 (11 revisions) (flutter/packages#5183)
2023-10-19 stuartmorgan@google.com [tool] Fix `filter-packages-to` when everything is changed (flutter/packages#5182)
2023-10-19 tarrinneal@gmail.com [pigeon] add flutter api protocol (flutter/packages#5181)

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,rmistry@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
@hellohuanlin
Copy link
Contributor

Nice change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pigeon] Add a protocol for Flutter APIs in the Swift generator
3 participants