Skip to content

Releases: google/protobuf.dart

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)

protobuf-3.1.0

14 Aug 11:25
a852ba4
Compare
Choose a tag to compare
  • CodedBufferReader readBytes now copies the returned bytes to avoid accidental sharing of the input buffer with the returned Uint8List. New member readBytesAsView added with the old behavior. (#863)

  • Avoid sharing the input buffer in unknown length-delimited fields using the new readBytes. (#863)

protoc_plugin-21.0.2

19 Jun 07:39
e76bd74
Compare
Choose a tag to compare
  • Fix missing protobuf import in generated grpc files. (#844)

protoc_plugin-21.0.0

15 Jun 08:38
a9bf79f
Compare
Choose a tag to compare
  • Identifiers fromBuffer, fromJson, $_defaultFor, initByValue are no longer reserved. Proto fields with those Dart names will no longer have a suffix added. (#679)

  • Remove message constructor arguments. Constructors with arguments cause increase in release binary sizes even when no arguments are passed to the constructors. (#703)

    Migration:

    Set the fields after construction, using cascade syntax. For example, if you have:

    MyMessage(a: 123, b: [1, 2, 3])

    You can do:

    MyMessage()
      ..a = 123
      ..b.addAll([1, 2, 3])
  • Require Dart 2.19.

  • Export public dependencies (import publics in proto files) in .pbenum.dart files, same as .pb.dart files. (9aad6aa)

  • Fix decoding map fields when key or value (or both) fields of a map entry is missing. (#719, #745)

  • Generated files now split ignore_for_file comments across multiple lines when necessary. (#770)

  • Generated files now uses shared consts to eliminate repeated bool.fromEnvironment() expressions. (#772)

  • Removed accidental /// at the top of generated Dart files to avoid new dangling_library_doc_comments lint. (#774)

  • Generated files now have sorted imports and have fewer import-related ignore_for_file: analysis directives. (#778)

  • Remove duplicated consts in generated files. (#773)

protobuf-3.0.0

15 Jun 08:36
a9bf79f
Compare
Choose a tag to compare
  • Require Dart 2.19.
  • Remove ReadonlyMessageMixin (#183, #644)
  • Remove frozenMessageModificationHandler (#175, #643)
  • Remove PbListBase and FrozenPbList types. All proto repeated fields now use PbList. To check if a list is frozen, use isFrozen getter. (#624, #626)
  • Initialize map fields in GeneratedMessage.getField. This behavior is consistent with getField called on repeated fields. (#373, #707)
  • Remove unused and optional PbMap constructor argument BuilderInfo? info. (d94d3f0)
  • UnknownFieldSetField methods hasRequiredFields, isInitialized and getter length removed. (#721)
  • Update library documentation to hide internals, add documentation for public types. (#681)
  • Fix PbMap._isReadonly field initialization in PbMap.unmodifiable. (#741, #754)
  • Fix decoding map fields when key or value (or both) fields of a map entry is missing. (#719, #745)
  • Fix updating frozen (immutable) messages with merge methods (mergeFromBuffer, mergeFromProto3Json, ...). (#489, #727)
  • Fix handling null values in proto3 JSON deserializer. (#751, #760, #763)
  • Fix handling negative JSON values when parsing uint32 fields. (#839)
  • Avoid serializing unknown fields twice in reparseMessage. (#840)

protobuf-2.1.0, protoc_plugin-20.0.1

15 Jun 06:51
53f756a
Compare
Choose a tag to compare

protobuf-2.1.0

  • Update READMEs of protobuf and protoc_plugin:
    • Use dart pub instead of pub in command examples (a7e75cb)
    • Fix typos, clarify installation instructions, mention native compilation, fix proto syntax for protoc_plugin (#610, #617, #641)
  • Update some of the documentation according to Effective Dart documentation guide (#664, #674)
  • Improve runtime perf by removing some of the runtime type checks (#574, #573)
  • Fix a bug when converting negative Timestamp to Dart DateTime (#580, #577)
  • Document BuilderInfo and FieldInfo properties (#597)
  • Improve BuilderInfo initialization by doing some of the work lazily (#606)
  • Improve enum hash code generation (#556)
  • Fix parsing nested Any messages from JSON (#568)
  • Improve message hash code generation performance (#554, #633)
  • Fix reading uninitialized map fields changing equality and hash code of messages. (#638)
  • Fix setting an extension field when there's an unknown field with the same tag. (#639)
  • Fix sharing backing memory for repeated bytes and optional bytes fields. (#640)
  • GeneratedMessage.rebuild now generates a warning when the return value is not used. (#631)
  • Fix hash code of messages with empty unknown field set (#648)
  • Show field tags with protobuf.omit_field_names, enum value tags with protobuf.omit_enum_names in debug strings (toString methods) (#649)
  • TimestampMixin.toDateTime now takes an optional named bool argument toLocal (defaults to false) for generating a DateTime in the local time zone (instead of UTC). (#653)
  • Fix serialization of infinity and nan doubles in JSON serializers (#652)
  • Fix Dart generation for fields starting with underscore (#651)
  • Fix proto3 JSON deserialization of fixed32 fields (#655)
  • Fix uninitialized repeated field values runtime types for frozen messages (#654)

protoc_plugin-20.0.1

  • Fix proto3 repeated field encoding without the packed option (#345, #635)

protobuf-2.0.1

28 Apr 10:03
23136dc
Compare
Choose a tag to compare

2.0.1

  • Fix bug of parsing map-values with default values.
  • Merge fixes from version 1.1.2 - 1.1.4 into v2.

2.0.0

  • Stable null safety release.

1.1.4

  • Fix comparison of empty lists from frozen messages.
  • Switch repo internals to use dart format instead of dartfmt.

1.1.3

  • Fix that fixed32 int could be negative.

1.1.2

  • Fix proto deserialization issue for repeated and map enum value fields where
    the enum value is unknown.

1.1.1

  • Fix decoding of oneof fields from proto3 json. The 'whichFoo' state would
    not be set.
  • Fix the return type of copyWith.

1.1.0

  • Require at least Dart SDK 2.7.0 to enable usage of extension methods.
  • Introduce extension methods GeneratedMessage.rebuild and GeneratedMessage.deepCopy replacing copyWith and clone. Using these alternatives can result in smaller binaries, because it is defined once instead of once per class. Use protoc_plugin from 19.1.0 to generate deprecation warnings for copyWith and clone methods.
  • GeneratedMessage.getExtension throws when reading trying to read an extension that is present in the unknown fields. We consider this change a bug-fix because depending on the old behavior is indicative of a bug in your program.

1.0.4

  • Requires sdk 2.3.0
  • Update pedantic to 1.9.2

1.0.3

  • Enable hashCode memoization for frozen protos.
  • Add timeout to ClientContext

1.0.2

  • Fix hashcode of bytes fields.
  • Fix issue with the permissiveEnums option to mergeFromProto3Json. The comparison did not work properly.
  • Fix binary representation of negative int32 values.

protoc_plugin-20.0.0

28 Apr 10:01
d53d2bb
Compare
Choose a tag to compare

20.0.0

  • Stable release generating null-safe code.

19.3.1

  • Emit binary coded descriptors, which can be used to reflect over the options given to the descriptor.

19.3.0

  • Generate constructors with optional named arguments for prefilling fields.
  • Output language version 2.7 in generated files to support extension methods.

19.2.1

  • Support optional proto3 fields.