Skip to content

Releases: google/protobuf.dart

0.5.1+2 Remove Dependency on Crypto

22 Apr 18:55

Choose a tag to compare

bump version to 0.5.1+2

0.5.1 - strong mode

11 Apr 22:30

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

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

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

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

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.)

0.3.11

07 Jul 21:49

Choose a tag to compare

  • Add meta.dart which declares reserved names for the plugin.

0.3.10

06 Jul 18:36

Choose a tag to compare

Includes GeneratedService and RpcClient interfaces. (They are used in stubs generated for service definitions.)

0.3.9

24 Jun 02:23

Choose a tag to compare

  • Add experimental mixins_meta library
  • Add experimental PbMapMixin class (in a separate library).
  • Fix bug where ExtensionRegistry would not be used for nested messages.

added mergeFromJsonMap and writeToJsonMap

21 Apr 22:54

Choose a tag to compare

This release adds two new methods that are useful if you need to customize how JSON serialization is done. Make sure you also use the matching release of dart-protoc-plugin.