Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Added CHANGELOG.md, updated README.md. (#74)
Browse files Browse the repository at this point in the history
Bumped version to 0.7.2.

Fixes #68.
  • Loading branch information
jakobr-google authored Jun 12, 2017
1 parent 9d14bcc commit 430deeb
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 29 deletions.
138 changes: 138 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
## 0.7.2 - 2017-06-12

* Added CHANGELOG.md

## 0.7.1 - 2017-06-12

* Enable executable for `pub global` usage. Protoc plugin can now be installed by running `pub 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.7.0 - Not released

* Change how to customize the Dart name of a field to using a `dart_name` option.
* Implemented support for adding external mixins to generate Dart protos.

## 0.6.0+1 - Not released

* Fix missing import when an extension uses an enum in the same .proto file.

## 0.6.0 - Not released

* Move protobuf enums to a separate .pbenum.dart file.
* Move server-side stubs to .pbserver.dart.

## 0.5.2 - Not released

* Generate separate .pbjson.dart files for constants.

## 0.5.1 - 2016-04-12

### Strong mode and Bazel

* Fixed all analyzer diagnostics in strong mode.
* Added experimental support for Bazel.

## 0.5.0 - 2015-10-02

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

## 0.4.1 - 2015-08-22

### 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 - 2015-07-16

### 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 - 2015-07-08

* Fixes issues with reserved names

## 0.3.10 - 2015-07-06

* Adds support for generating stubs from service definitions.

## 0.3.9 - 2015-06-24

* Modify dart_options support so that it supports alternate mixins.
* Move the experimental map implementation to PbMapMixin

For now, new mixins can only be added using a patch:

* add the new class to the protobuf library
* add the class to the list in mixin.dart.

## 0.3.8 - 2015-06-16

### Added option for experimental map API

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

## 0.3.7 - Unreleased

### Added option for experimental map API

* Added an option to have GeneratedMessage subclasses implement Map.

## 0.3.6 - 2016-04-22

### Added writeToJsonMap and mergeFromJsonMap to reservedNames

The 0.3.6 version of the dart-protobuf library added two new functions, so this release changes the protobuf compiler to avoid using them.

## 0.3.5 - 2015-03-31

Protobuf changes for smaller dart2js code, Int64 fixes

This change is paired with https://chromiumcodereview.appspot.com/814213003

Reduces code size for one app by 0.9%

1. Allow constants for the default value to avoid many trivial closures.
2. Generate and use static M.create() and M.createRepeated() methods on message classes M to ensure there is a shared copy of these closures rather than one copy per use.
3. Parse Int64 values rather than generate from 'int' to ensure no truncation errors in JavaScript.

## 0.3.4 - 2015-03-31

Parameterize uri resolution and parsing of options, use package:path.

This helps make the compiler more configurable
to embed it in other systems (like pub transformers)

## 0.3.3 - 2015-03-31

Update the version number
33 changes: 5 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,21 @@ How to build and use
*Note:* currently the workflow is POSIX-oriented.

To build standalone `protoc` plugin:
- run `pub install` to install all dependecies
- run `make build-plugin`. That will create a file `out/protoc-gen-dart` which
is a plugin
- Now you can use it either by adding into `PATH` or passing directly with
`protoc`'s `--plugin` option.
- run `pub install` to install all dependencies
- Now you can use the plugin either by adding the `bin` directory to your `PATH`,
or passing it directly with `protoc`'s `--plugin` option.

Please, remember that the plugin is pure Dart script and requires the presence
of `dart` executable in your `PATH`.

When both the `dart` executable and `out/protoc-gen-dart` are in the
When both the `dart` executable and `bin/protoc-gen-dart` are in the
`PATH` the protocol buffer compiler can be invoked to generate like this:

$ protoc --dart_out=. test.proto

### Optionally using `pub global`

$ pub global activate -sgit https://github.com/dart-lang/dart-protoc-plugin
$ pub global activate protoc_plugin

And then add `.pub-cache/bin` in your home dir to your `PATH` if you haven't already.

Expand Down Expand Up @@ -112,27 +110,6 @@ https://developers.google.com/protocol-buffers/docs/downloads).

Remember to run the tests. That is as easy as `make run-tests`.

The default way of running the Dart protoc plugin is through the
generated `out/protoc-gen-dart` script. However when run this way the
Dart code is assembled into one large Dart file using dart2dart. To
run with the actual source in the repository create an executable
script called `protoc-gen-dart` with the following content:

#! /bin/bash
dart bin/protoc_plugin.dart

When running protoc just ensure that this script is first when PATH is
searched. If the script is in the current directory run `protoc` like
this:

$ PATH=.:$PATH protoc --dart_out=. test.proto

It is also possible to call the script something else than
`protoc-gen-dart` and then refer directly to it using the `--plugin`
option. If the script is called `dart-plugin` run `protoc` like this:

$ protoc --plugin=protoc-gen-dart=./plugin --dart_out=. test.proto

Useful references
-----------------

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: protoc_plugin
version: 0.7.1
version: 0.7.2
author: Dart Team <[email protected]>
description: Protoc compiler plugin to generate Dart code
homepage: https://github.com/dart-lang/dart-protoc-plugin
Expand Down

0 comments on commit 430deeb

Please sign in to comment.