Skip to content

Releases: google/protobuf.dart

package:protoc_plugin v22.3.0

28 May 17:12
60dfaed
Compare
Choose a tag to compare
  • Update the generated code to improve readability and to better follow common Dart patterns.
  • No longer generate empty enum (*.pbenum.dart) files.
  • No longer generate empty server (*.pbserver.dart) files.
  • Ignore implementation_imports for some generated files.

package:protoc_plugin v22.2.0

19 May 18:43
deda288
Compare
Choose a tag to compare
  • Bump protobuf constraint to ^4.1.0

  • Read default_host and oauth_scopes options from gRPC service definitions
    and write that information to the generated gRPC clients.

  • Adjust the deprecation messages for the message clone() and copyWith()
    methods (#998).

  • Generate dartdocs for grpc services (#973).
    We now parse and generate code cooresponding to the proto options
    google.api.default_host and google.api.oauth_scopes:

    service Firestore {
      option (google.api.default_host) = "firestore.googleapis.com";
      option (google.api.oauth_scopes) =
          "https://www.googleapis.com/auth/cloud-platform,"
          "https://www.googleapis.com/auth/datastore";
    
      ...

    Will generate as:

    class FirestoreClient extends $grpc.Client {
      /// The hostname for this service.
      static const $core.String defaultHost = 'firestore.googleapis.com';
    
      /// OAuth scopes needed for the client.
      static const $core.List<$core.String> oauthScopes = [
        'https://www.googleapis.com/auth/cloud-platform',
        'https://www.googleapis.com/auth/datastore',
      ];
    
      ...
  • Minimum SDK dependency bumped from 3.3.0 to 3.6.0. (#1001)

package:protobuf v4.1.0

19 May 18:43
deda288
Compare
Choose a tag to compare
  • Improve packed field decoding performance. (#959, #981)
  • Minimum SDK dependency bumped from 3.3.0 to 3.6.0. (#1001)

package:protoc_plugin v22.1.0

13 May 20:08
d5906e7
Compare
Choose a tag to compare
  • Fix factory argument types for protobuf Map fields. (#975)
  • Fix import order changes when files are passed in different order to protoc. (#952)
  • Add fromDart() and toDart() methods to convert between core Duration and proto Duration (#986)
  • Update the GRPC service generator to emit constructors that use super parameters.

package:protoc_plugin v22.0.1

28 Mar 14:00
cf4f3a8
Compare
Choose a tag to compare
  • Bump protobuf constraint to ^4.0.0

package:protoc_plugin v22.0.0

28 Mar 09:32
3bffe4b
Compare
Choose a tag to compare
  • Remove PbEventMixin mixin. (#738)
  • Type of repeated fields is now PbList (instead of List), type of map fields is now PbMap (instead of Map). (#903) This change requires protobuf-4.0.0.
  • Generated files now export GeneratedMessageGenericExtensions from the protobuf library. (#503, #907)
  • Generate doc comments for enum types and values, rpc services and methods. (#900, #909)
  • deprecated options in messages, grpc services and methods, and enum types and values are now handled to generate Dart @deprecated annotations. (#900, #908)
  • protoc_plugin and generated files now require Dart 3.3.0. (#953)
  • Fix performance issues when handling documentation comments in protobufs. (#935, #955)
  • Fix grpc methods with names 'call' and 'request' conflicting with other methods in the generated code and causing compile-time errors. (#963, #159)

package:protobuf v4.0.0

28 Mar 09:31
3bffe4b
Compare
Choose a tag to compare
  • Breaking: The following types and members are now removed:
    • PbEventMixin
    • PbFieldChange
    • EventBuffer
    • GeneratedMessage.createRepeatedField
    • GeneratedMessage.createMapField
      These were used to implement events, which are unused internally. To keep API surface small (to make it easier to change the library or migrate to another library) these types and members are removed. (#738)
  • Breaking: CodedBufferWriter.writeRawBytes now takes a Uint8List argument (instead of TypedData).
  • GeneratedMessageGenericExtensions.deepCopy is now annotated with @useResult and will generate a warning when its result is not used. (#896)
  • Breaking: PbMap.unmodifiable now takes key and value field types as arguments, instead of another PbMap.
    To migrate, use PbMap.unmodifiable(map.keyFieldType, map.valueFieldType) instead of PbMap.unmodifiable(map). (#902)
  • Messages deserialized from JSON now generate the unknown fields when serialized as JSON. Note that, as before, unknown fields in JSON messages are not stored in the unknownFields of the message. They are only used by the JSON serializers to support roundtripping. (#49, #918)
  • Minimum SDK dependency bumped from 2.19.0 to 3.3.0. (#953)

protoc_plugin-21.1.2

10 Oct 10:59
c559fe5
Compare
Choose a tag to compare
  • Fix a bug in comment parsing. (#871, #879)

protoc_plugin-21.1.1

15 Aug 06:52
41193fd
Compare
Choose a tag to compare
  • Rename a local variable used with message constructors to avoid potential conflicts with protobuf field names. (#869)

protoc_plugin-21.1.0

14 Aug 11:26
a852ba4
Compare
Choose a tag to compare
  • Generate code comments for annotated protobuf inputs. (#161)

  • Generate message constructor arguments by default again. New flag disable_constructor_args disables generating the arguments.

    Constructor arguments were removed in 21.0.0 as they increase dart2js binary sizes even when the arguments are not used.

    Example usage to disable constructor arguments:

    protoc --dart_out='disable_constructor_args,<other options>:.' ...
    

    (#850, #855)