Skip to content

Releases: google/protobuf.dart

JSON parsing of unknown enum values

20 Apr 14:26
Compare
Choose a tag to compare
  • Unknown enum values are now ignored when parsing JSON, instead of throwing an exception.

0.5.3+2

29 Mar 01:01
Compare
Choose a tag to compare
  • Resolved a strong-mode error.

fixed binary protos using dart2js

01 Sep 18:37
Compare
Choose a tag to compare
  • all tests pass for binary protos using dart2js

Mixins, performance

01 Sep 18:32
Compare
Choose a tag to compare
  • make PbMixin constructor public for use within protoc plugin
  • improve operator== performance
  • drop dependency on package:crypto

0.5.1+2 Remove Dependency on Crypto

22 Apr 18:55
Compare
Choose a tag to compare
bump version to 0.5.1+2

0.5.1 - strong mode

11 Apr 22:30
Compare
Choose a tag to compare
  • Experimental support for strong mode.
  • Fixed an issue with GeneratedMessage operator== and Map mixins
  • Added declaration of GeneratedMessage clone method

0.5.0 - Performance improvements

01 Oct 23:49
Compare
Choose a tag to compare
  • Reorganized internals to improve performance. We now store field values in a list instead of a map. Private properties and methods are all moved to the _FieldSet class. There are new entry points for generated getters, hazzers, and setters. Improved JSON decoding performance.
  • Dropped compatibility with .pb.dart files before 0.4.2 by removing internal constants from GeneratedMessage. Also, protoc plugins before 0.5.0 won't work.

0.4.2 - renamed FieldType to PbFieldType

24 Aug 23:48
Compare
Choose a tag to compare
rename FieldType to PbFieldType and bump version to 0.4.2

'FieldType' conflicts with classes and proto messages with the
same name. Renamed to PbFieldType to make this less likely.

(I'm breaking compatibility with 0.4.1 because leaving
'FieldType' around will prevent upgrades from 0.4.0
and below. Since I just released 0.4.1 on Friday, it
seems unlikely to affect many people.)

BUG=
[email protected]

Review URL: https://chromiumcodereview.appspot.com//1312763005.

0.4.1 - EventPlugin, createRepeatedField - DO NOT USE

21 Aug 23:34
Compare
Choose a tag to compare
  • added FieldType class. It turned out that FieldType is a
    commonly used name, even in .proto files. This is renamed to
    PbFieldType in 0.4.2, so use that release instead.
  • Added support for observing field changes.
    For now, this can only be enabled by using a mixin to override
    the eventPlugin getter.
  • Removed optional third parameter from setField().
    It was only intended for internal use, and could be used to
    defeat type checks on fields.
  • clearExtension() removes the value and extension in all cases.
    (Before, the extension would be kept and the list cleared
    for repeated fields.)
  • Upcoming: clearField() will require its argument to be a known
    tag number (which could be an extension). For now, this is only
    enforced when a mixin provides an eventPlugin.

0.4.0 - getters for message fields changed

15 Jul 23:47
Compare
Choose a tag to compare

This release changes how getters work for message fields, to detect a common mistake.

Previously, the protobuf API didn't report any error for an incorrect usage of setters. For example, if field "foo" is a message field of type Foo, this code would silently have no effect:

var msg = new SomeMessage();
msg.foo.bar = 123;

This is because "msg.foo" would call "new Foo()" and return it without saving it.

The example can be fixed like this:

var msg = new SomeMessage();
msg.foo = new Foo();
msg.foo.bar = 123;

Or equivalently:

var msg = new SomeMessage()
  ..foo = (new Foo()..bar = 123);

Starting in 0.4.0, the default value of "msg.foo" is an immutable instance of Foo. You can read
the default value of a field the same as before, but writes will throw UnsupportedError.

(You also need version 0.4.0 of dart-protoc-plugin to get the new behavior.)