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] Moves all codec logic to singular custom codec #6600

Merged
merged 44 commits into from
Jun 6, 2024

Conversation

tarrinneal
Copy link
Contributor

@tarrinneal tarrinneal commented Apr 23, 2024

[pigeon] Moves all codec logic to singular custom codec.

Also fixes a few small codec related bugs that have cropped up over time.

fixes flutter/flutter#147454
fixes flutter/flutter#147127
fixes flutter/flutter#147587
fixes flutter/flutter#148065

@jmagman jmagman mentioned this pull request May 6, 2024
11 tasks
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.

This is great! It's awesome to see how much complexity and branching was removed from all over the generators.

packages/pigeon/lib/objc_generator.dart Outdated Show resolved Hide resolved
packages/pigeon/example/app/macos/Runner/messages.g.m Outdated Show resolved Hide resolved
packages/pigeon/example/app/macos/Runner/messages.g.h Outdated Show resolved Hide resolved
packages/pigeon/lib/objc_generator.dart Outdated Show resolved Hide resolved
const int64_t enum_arg_value =
encodable_enum_arg.IsNull() ? 0 : encodable_enum_arg.LongValue();
return encodable_enum_arg.IsNull()
? CustomEncodableValue(std::nullopt)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this just be EncodableValue?

Copy link
Contributor

Choose a reason for hiding this comment

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

This was marked as resolved without changes or comment; am I wrong about the type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I hadn't fully swapped the C++ APIs back in. It should be EncodableValue() for the null case, not EncodableValue(std:nullopt) (which I'm guessing is what gave you that error?). Using EncodableValue() in the null case works for me locally.

packages/pigeon/pigeons/core_tests.dart Show resolved Hide resolved
packages/pigeon/test/cpp_generator_test.dart Outdated Show resolved Hide resolved
@tarrinneal tarrinneal requested a review from vashworth May 30, 2024 17:28
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.

A couple minor things still, but LGTM

packages/pigeon/CHANGELOG.md Show resolved Hide resolved
const int64_t enum_arg_value =
encodable_enum_arg.IsNull() ? 0 : encodable_enum_arg.LongValue();
return encodable_enum_arg.IsNull()
? CustomEncodableValue(std::nullopt)
Copy link
Contributor

Choose a reason for hiding this comment

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

This was marked as resolved without changes or comment; am I wrong about the type?

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 6, 2024
@auto-submit auto-submit bot merged commit 2e928d7 into flutter:main Jun 6, 2024
74 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 7, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 7, 2024
flutter/packages@586faa6...8a2c4e4

2024-06-06 [email protected] Revert "Migrate `video_player/android` from `SurfaceTexture`->`SurfaceProducer`." (flutter/packages#6882)
2024-06-06 [email protected] [two_dimensional_scrollables] Adds generics to the callbacks and builders of TreeView (flutter/packages#6864)
2024-06-06 [email protected] Run tests on macOS 13 or 14 (flutter/packages#6877)
2024-06-06 [email protected] Disable sandboxing directly for macOS tests (flutter/packages#6880)
2024-06-06 [email protected] [pigeon] Moves all codec logic to singular custom codec (flutter/packages#6600)
2024-06-06 [email protected] Roll Flutter (stable) from a14f74f to 761747b (6 revisions) (flutter/packages#6878)
2024-06-06 [email protected] Roll Flutter from 27e0656 to 4608a89 (17 revisions) (flutter/packages#6876)
2024-06-06 [email protected] Disable sandboxing for macOS tests in CI (flutter/packages#6866)

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:/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
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
[pigeon] Moves all codec logic to singular custom codec.

Also fixes a few small codec related bugs that have cropped up over time.

fixes flutter/flutter#147454
fixes flutter/flutter#147127
fixes flutter/flutter#147587
fixes flutter/flutter#148065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants