Use `$_createMessage()` of type `GeneratedMessage Function()` in Dart protoc compiler (#1093) Often apps use extensive numbers of protos. The `BuilderInfo` of a proto will refer to sub proto messages via using `Foo.create` tear-offs. Big apps can end up with tens of thousands of those `<name>.create` closures. All of them currently have a unique `<name> Function()` function type. Though the actual usage of those closures is only in contexts where the caller of the closure expects a `GeneratedMessage` as return type. If a caller knew the actual return type, then the caller could call the constructor directly. To avoid having to create potentially tens of thousands of unique function types, we make those closures have the `GeneratedMessage Function()` type. This mirrors cl/923994549 & cl/940364489
Protocol Buffers (protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
This repository is home to packages related to protobuf support for Dart.
| Package | Description | Published Version |
|---|---|---|
| protobuf | Runtime library for protocol buffers support. | |
| protoc_plugin | A protobuf protoc compiler plugin used to generate Dart code. | |
| benchmarks | Benchmarks for various protobuf functions. |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.