Releases: dart-archive/dart-protoc-plugin
Documentation update
- Updated README.md.
- Added CHANGELOG.md.
Global Activation
- Enable executable for
pub global
usage. Protoc plugin can now be installed by runningpub global activate protoc_plugin
. - Ensure generated extension class names don't conflict with message class names.
Function
will soon be a reserved keyword, so don't generate classes with that name.- Strong mode tweaks and lint fixes.
0.5.1 - strong mode and Bazel
- Fixed all analyzer diagnostics in strong mode.
- Added experimental support for Bazel.
0.5.0 - Performance improvements
This release requires 0.5.0 of the protobuf library.
- significantly improved performance for getters, setters, and hazzers
- Each enum type now has a $json constant that contains its metadata.
fixed imports, $checkItem, $json
- Fixed all warnings, including in generated code.
- Started generating $checkItem function for verifying the values of repeated fields
- Fixed service stubs to work when a message is in a different package
- Started generating JSON constants to get the original descriptor data for services
0.4.0 - getters for message fields changed
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.
0.3.11
0.3.10
0.3.9
added option for experimental map API
0.3.7 added an option to have GeneratedMessage subclasses implement Map.
0.3.8 changed the Map API so that operator [] and operator []= support dotted keys such as "foo.bar".
This new API is subject to change without notice, but if you want to try it out anyway, see the unit test.