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

[pigeon] Swift implementation for ProxyApis #6602

Merged
merged 130 commits into from
Oct 11, 2024

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Apr 23, 2024

Swift portion of flutter/flutter#134777

Pre-launch Checklist

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 please wait for Tarrin's approval on the generator changes.

I did a relatively light review pass here, but the the instance manager looks like I expect from the Obj-C webview_flutter prototype, and the overall structure and the availability annotations make sense to me.

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

Not seeing any real problems here, seems like all of the issues from kotlin have been fixed here already. If the code works, I think it's good to go.

Comment on lines 731 to 736
indent.format(instanceManagerFinalizerDelegateTemplate(generatorOptions));
indent.newln();
indent.format(instanceManagerFinalizerTemplate(generatorOptions));
indent.newln();
indent.format(instanceManagerTemplate(generatorOptions));
indent.newln();
Copy link
Contributor

Choose a reason for hiding this comment

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

might be better to just add the new lines into the templates

return apis.isNotEmpty ? 'available(${apis.join(', ')}, *)' : null;
}

/// Recursively iterates
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it does more than this? Either way, needs a period.

_ = instanceManager.addHostCreatedInstance(object)

let identifier = instanceManager.identifierWithStrongReference(forInstance: object)
XCTAssertNotNil(identifier)
Copy link
Contributor

Choose a reason for hiding this comment

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

optional nit: can use XCTUnwrap to avoid !. When it's nil, instead of crashing, it would mark it as a test failure and continue with other tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the following line to:

XCTAssertEqual(instanceManager.instance(forIdentifier: try XCTUnwrap(identifier)), object)

Is that what you were thinking? The XCTAssertNotNil(identifier) check also fails the test but continues to run other tests.

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 11, 2024
@auto-submit auto-submit bot merged commit 0da80be into flutter:main Oct 11, 2024
76 checks passed
@bparrishMines bparrishMines deleted the pigeon_wrapper_swift branch October 11, 2024 19:34
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 14, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 14, 2024
flutter/packages@67401e1...1e670f2

2024-10-14 stuartmorgan@google.com [image_picker] Update for non-nullable generics in Pigeon (flutter/packages#7775)
2024-10-14 109111084+yaakovschectman@users.noreply.github.com [camera_android] Convert calls from native to dart side to Pigeon. (flutter/packages#7857)
2024-10-14 109111084+yaakovschectman@users.noreply.github.com [google_maps_flutter_android] Update JSON code to Pigeon for `BitmapDescriptor`, `Cap`, and `PatternItem` (flutter/packages#7840)
2024-10-13 andrechalella@gmail.com [flutter_markdown] Soft wrapping in blockquotes (flutter/packages#7848)
2024-10-12 stuartmorgan@google.com [google_maps_flutter] Update iOS Pigeon for non-nullable generics (flutter/packages#7792)
2024-10-11 10687576+bparrishMines@users.noreply.github.com [pigeon] Swift implementation for ProxyApis (flutter/packages#6602)
2024-10-11 echo.ellet@gmail.com [camera_android_camerax] Remove duplicated 'report' in README.md (flutter/packages#7708)

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
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 platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants