Skip to content

[linux/windows] Add support for StandardMethodCodec #67

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

Closed
stuartmorgan-g opened this issue Jun 7, 2018 · 13 comments
Closed

[linux/windows] Add support for StandardMethodCodec #67

stuartmorgan-g opened this issue Jun 7, 2018 · 13 comments

Comments

@stuartmorgan-g
Copy link
Collaborator

Currently the native plugin APIs are hard-coded to use JSON, so the Dart side must use JSONMethodCodec. We should support all the codec options that are supported on mobile, and a way to specify the codec to use for a given plugin.

@stuartmorgan-g stuartmorgan-g self-assigned this Jul 12, 2018
stuartmorgan-g added a commit to stuartmorgan-g/flutter-desktop-embedding that referenced this issue Jul 16, 2018
Extracts method codecs into stand-alone objects, and allows plugins to
indicate that they use a codec other than JSON. This is an incremental
step toward aligning the plugin API with Flutter's MethodChannel API.

For now no other codecs are actually implemented in the framework, and
the default is still JSON (unlike in existing Flutter code) so that this
is not a breaking change. A future change will full move to MethodChannel,
which will be a breaking change.

Partially addresses issue google#67 in that custom codecs are now supported,
even though the Standard (binary) codec is not yet implemented.
stuartmorgan-g added a commit to stuartmorgan-g/flutter-desktop-embedding that referenced this issue Aug 6, 2018
Extracts method codecs into stand-alone objects, and allows plugins to
indicate that they use a codec other than JSON. This is an incremental
step toward aligning the plugin API with Flutter's MethodChannel API.

For now no other codecs are actually implemented in the framework, and
the default is still JSON (unlike in existing Flutter code) so that this
is not a breaking change. A future change will full move to MethodChannel,
which will be a breaking change.

Partially addresses issue google#67 in that custom codecs are now supported,
even though the Standard (binary) codec is not yet implemented.
stuartmorgan-g pushed a commit that referenced this issue Aug 7, 2018
Extracts method codecs into stand-alone objects, and allows plugins to
indicate that they use a codec other than JSON. This is an incremental
step toward aligning the plugin API with Flutter's MethodChannel API.

For now no other codecs are actually implemented in the framework, and
the default is still JSON (unlike in existing Flutter code) so that this
is only a minor breaking change, and only on Linux (unavoidable due to
the initial use of Json::Value in key interfaces; the JsonPlugin class is
designed to minimize impact on existing plugins). A future change will
move to MethodChannel, which will be a more significant breaking
change.

Partially addresses issue #67 in that custom codecs are now supported,
even though the Standard (binary) codec is not yet implemented.
@stuartmorgan-g stuartmorgan-g removed their assignment Aug 7, 2018
@stuartmorgan-g
Copy link
Collaborator Author

It's now possible to use custom method codecs. Leaving this open (and adjusting title) for the remaining work of implementing StandardMethodCodec. It should be straightforward in ObjC, but on the C++ side will involve creating a typed object hierarchy or something similarly inspectable containing all the types supported by the codec.

@stuartmorgan-g stuartmorgan-g changed the title Add support for other MethodChannel codecs in the plugin API Add support for StandardMethodCodec Aug 7, 2018
@ghost

This comment has been minimized.

@stuartmorgan-g

This comment has been minimized.

@ghost

This comment has been minimized.

@pauldemarco
Copy link

It seems like some recent commits are allowing for this issue to be worked on.

Is this on the docket any time soon?

@stuartmorgan-g
Copy link
Collaborator Author

It seems like some recent commits are allowing for this issue to be worked on.

This hasn't been blocked since #110, actually; the recent (and remaining) plugin refactors are tangential to codecs.

Is this on the docket any time soon?

I have no plans to work on this in the foreseeable future, since so far we haven't encountered any cases where we need StandardMethodCodec to unblock important functionality. I'm happy to review patches from anyone interested in working on it though.

@pauldemarco
Copy link

I would like to start working on Firebase auth and RTDB for Linux, using C++ sdk, but unfortunately blocked on this issue.

@pulyaevskiy

This comment has been minimized.

@pauldemarco

This comment has been minimized.

@pulyaevskiy

This comment has been minimized.

@stuartmorgan-g
Copy link
Collaborator Author

If you'd like to continue that discussion, https://groups.google.com/forum/#!topic/flutter-desktop-embedding-dev/QPz9quNmB3o would be a much better place.

Returning to the topic of this issue: as I said I'm happy to review patches adding Standard{Message,Method}Codec support. A general approach for a C++ implementation is outlined above.

@stuartmorgan-g
Copy link
Collaborator Author

With the migration to flutter/engine, which included switching to using the relevant iOS classes, StandardMethodCodec is now supported for macOS. Leaving open for Linux and Windows.

@stuartmorgan-g stuartmorgan-g changed the title Add support for StandardMethodCodec [linux/windows] Add support for StandardMethodCodec Feb 14, 2019
@stuartmorgan-g
Copy link
Collaborator Author

Moved to flutter/flutter#30670

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants