Releases: google/protobuf.dart
protoc_plugin-21.1.2
protoc_plugin-21.1.1
- Rename a local variable used with message constructors to avoid potential conflicts with protobuf field names. (#869)
protoc_plugin-21.1.0
-
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>:.' ...
protobuf-3.1.0
protoc_plugin-21.0.2
- Fix missing protobuf import in generated grpc files. (#844)
protoc_plugin-21.0.0
-
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 public
s 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 newdangling_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
- Require Dart
2.19
. - Remove
ReadonlyMessageMixin
(#183, #644) - Remove
frozenMessageModificationHandler
(#175, #643) - Remove
PbListBase
andFrozenPbList
types. All proto repeated fields now usePbList
. To check if a list is frozen, useisFrozen
getter. (#624, #626) - Initialize map fields in
GeneratedMessage.getField
. This behavior is consistent withgetField
called on repeated fields. (#373, #707) - Remove unused and optional
PbMap
constructor argumentBuilderInfo? info
. (d94d3f0) UnknownFieldSetField
methodshasRequiredFields
,isInitialized
and getterlength
removed. (#721)- Update library documentation to hide internals, add documentation for public types. (#681)
- Fix
PbMap._isReadonly
field initialization inPbMap.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
protobuf-2.1.0
- Update READMEs of
protobuf
andprotoc_plugin
: - 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 DartDateTime
(#580, #577) - Document
BuilderInfo
andFieldInfo
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
andoptional 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 withprotobuf.omit_enum_names
in debug strings (toString
methods) (#649) TimestampMixin.toDateTime
now takes an optional namedbool
argumenttoLocal
(defaults tofalse
) for generating aDateTime
in the local time zone (instead of UTC). (#653)- Fix serialization of
infinity
andnan
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
protobuf-2.0.1
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 ofdartfmt
.
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
andGeneratedMessage.deepCopy
replacingcopyWith
andclone
. Using these alternatives can result in smaller binaries, because it is defined once instead of once per class. Useprotoc_plugin
from 19.1.0 to generate deprecation warnings forcopyWith
andclone
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
toClientContext
1.0.2
- Fix hashcode of bytes fields.
- Fix issue with the
permissiveEnums
option tomergeFromProto3Json
. The comparison did not work properly. - Fix binary representation of negative int32 values.
protoc_plugin-20.0.0
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.