-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#20317Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Milestone
Description
The current C++ implementation of StandardMethodCodec/StandardMessageCodec doesn't allow client extensions, which is supported on other platforms, and require for compatibility with plugins that use it in their current implementations.
The approach I have in mind is:
- Add one more type to EncodableValue for extensions, and have that extension type store a
void*value along with function pointers for delete, copy, and optionally compare. Then there would be all the usual associated methods (IsExtension,ExtensionValue, etc.). - Make the serializer class subclassable, with a method that is called for reading and writing values when an extension type is encountered.
The reason for this approach rather than something subclassing based is that this should be something that would continue to work even if the codecs are moved into the libraries. We'll need to evaluate how onerous that ends up being to use; my hope is that it should be straightforward for someone extending to make an adapter that hides most of that complexity from most of the call sites.
technolion
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically