-
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
[pigeon] Updates README.md
with examples of using @ProxyApi
#8087
base: main
Are you sure you want to change the base?
Conversation
@@ -284,7 +284,7 @@ private class PigeonFlutterApi { | |||
aString aStringArg: String?, completion: @escaping (Result<String, Error>) -> Void | |||
) { | |||
flutterAPI.flutterMethod(aString: aStringArg) { | |||
completion(.success($0)) | |||
completion(.success(try! $0.get())) |
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.
Code didn't compile until I fixed this. I'm assuming our CI doesn't verify the example compiles. Is this unintentional?
I also had to fix the same line for Kotlin.
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.
Just ran into this in my pr as well. Not sure why the examples are getting compiled in ci though
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.
============================================================
|| Running for packages/pigeon [@0:00]
============================================================
Building for: Android
Skipping Android for pigeon/example; not supported.
SKIPPING: No examples found supporting requested platform(s).
O.o
Let me look into what's going on here.
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.
Ah, it's because the actual example is example/app/
, not example/
, but example.pubspec.yaml
exists so the tooling sees that example
is a package.
I'll play with fixing this in a separate PR. I think the pubspec may have only been there for the old excerpt system.
@@ -118,7 +118,7 @@ Future<int> generateTestPigeons( | |||
? null | |||
: '$outputBase/ios/Classes/$pascalCaseName.gen.swift', | |||
swiftErrorClassName: swiftErrorClassName, | |||
swiftIncludeErrorClass: input != 'core_tests', | |||
swiftIncludeErrorClass: input != 'background_platform_channels', |
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.
Fixes a test failure caused by #7849
tldr:
This wasn't caught by CI because core_tests
is checked in and the order of the tests matters.
When I reran the generator and pushed my code, it removed the PigeonError
from core_tests
. Therefore the tests that run before the CI generates the unchecked in files would fail because core_tests
was missing the reference to PigeonError
that was in background_platform_channels
. Therefore the fix was to switch the location of the single PigeonError
to reside in core_tests
instead of background_platform_channels
.
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 also addressed in my current pr. Your solution is smarter than mine :)
README.md
with examples of using @ProxyApi
We should hold off on this until I've had a chance to discuss with folks about overall interop plans. |
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.