Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Issue 1196773004: changes for 0.3.9 (Closed)

Created:
5 years, 6 months ago by skybrian
Modified:
5 years, 6 months ago
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart-protobuf.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

changes for 0.3.9 - add experimental PbMapMixin class - fix bug where ExtensionRegistry would not be used for nested messages. BUG=https://github.com/dart-lang/dart-protobuf/issues/27 R=sgjesse@google.com Committed: https://github.com/dart-lang/protobuf/commit/08bb09f58349707af89ebc51a7552e59d9a3eca5

Patch Set 1 #

Total comments: 11

Patch Set 2 : add mixins_meta, move PbMapMixin to separate library #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -11 lines) Patch
M CHANGELOG.md View 1 1 chunk +5 lines, -0 lines 0 comments Download
A lib/mixins_meta.dart View 1 1 chunk +84 lines, -0 lines 6 comments Download
M lib/src/protobuf/coded_buffer_reader.dart View 2 chunks +2 lines, -2 lines 0 comments Download
A lib/src/protobuf/mixins/map_mixin.dart View 1 1 chunk +56 lines, -0 lines 0 comments Download
M pubspec.yaml View 1 chunk +1 line, -1 line 0 comments Download
M test/all_tests.dart View 1 chunk +10 lines, -8 lines 0 comments Download
A test/map_mixin_test.dart View 1 1 chunk +127 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (1 generated)
skybrian
5 years, 6 months ago (2015-06-20 00:50:38 UTC) #2
Søren Gjesse
https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/coded_buffer_reader.dart File lib/src/protobuf/coded_buffer_reader.dart (right): https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/coded_buffer_reader.dart#newcode70 lib/src/protobuf/coded_buffer_reader.dart:70: message.mergeFromCodedBufferReader(this, extensionRegistry); Should there be a regression test for ...
5 years, 6 months ago (2015-06-22 07:25:01 UTC) #3
skybrian
> Just for context here. Is this supposed to replace/simplify the code generated > for ...
5 years, 6 months ago (2015-06-22 17:19:02 UTC) #4
Siggi Cherem (dart-lang)
I like this general change of decoupling things from protoc. I added one general suggestion ...
5 years, 6 months ago (2015-06-22 19:45:37 UTC) #5
skybrian
https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/map_mixin.dart File lib/src/protobuf/map_mixin.dart (right): https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/map_mixin.dart#newcode15 lib/src/protobuf/map_mixin.dart:15: /// A PbMapMixin provides an experimental implementation of the ...
5 years, 6 months ago (2015-06-22 21:53:50 UTC) #6
Siggi Cherem (dart-lang)
https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/map_mixin.dart File lib/src/protobuf/map_mixin.dart (right): https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/map_mixin.dart#newcode15 lib/src/protobuf/map_mixin.dart:15: /// A PbMapMixin provides an experimental implementation of the ...
5 years, 6 months ago (2015-06-22 22:22:25 UTC) #7
skybrian
https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/coded_buffer_reader.dart File lib/src/protobuf/coded_buffer_reader.dart (right): https://chromiumcodereview.appspot.com/1196773004/diff/1/lib/src/protobuf/coded_buffer_reader.dart#newcode70 lib/src/protobuf/coded_buffer_reader.dart:70: message.mergeFromCodedBufferReader(this, extensionRegistry); On 2015/06/22 07:25:01, Søren Gjesse wrote: > ...
5 years, 6 months ago (2015-06-23 02:35:34 UTC) #8
skybrian
On 2015/06/22 22:22:25, Siggi Cherem (dart-lang) wrote: > Totally, we could still include an example ...
5 years, 6 months ago (2015-06-23 02:38:08 UTC) #9
Søren Gjesse
lgtm https://chromiumcodereview.appspot.com/1196773004/diff/20001/lib/mixins_meta.dart File lib/mixins_meta.dart (right): https://chromiumcodereview.appspot.com/1196773004/diff/20001/lib/mixins_meta.dart#newcode21 lib/mixins_meta.dart:21: /// The mixin can be applied to a ...
5 years, 6 months ago (2015-06-23 06:49:56 UTC) #10
skybrian
Committed patchset #2 (id:20001) manually as 08bb09f58349707af89ebc51a7552e59d9a3eca5 (presubmit successful).
5 years, 6 months ago (2015-06-23 17:23:42 UTC) #11
skybrian
5 years, 6 months ago (2015-06-24 18:39:04 UTC) #12
Message was sent while issue was closed.
(Oops, didn't publish this earlier.)

https://codereview.chromium.org/1196773004/diff/20001/lib/mixins_meta.dart
File lib/mixins_meta.dart (right):

https://codereview.chromium.org/1196773004/diff/20001/lib/mixins_meta.dart#ne...
lib/mixins_meta.dart:21: /// The mixin can be applied to a message using the
options in dart_options.proto.
On 2015/06/23 06:49:56, Søren Gjesse wrote:
> Long line.

Done.

https://codereview.chromium.org/1196773004/diff/20001/lib/mixins_meta.dart#ne...
lib/mixins_meta.dart:26: /// The Dart symbol to be imported into the .pb.dart
file.
On 2015/06/23 06:49:56, Søren Gjesse wrote:
> Maybe be more explicit in this comment that this is the class name of the
actual
> mixin.

Done.

https://codereview.chromium.org/1196773004/diff/20001/lib/mixins_meta.dart#ne...
lib/mixins_meta.dart:70: const _mapMixin = const PbMixin._raw("MapMixin",
On 2015/06/23 06:49:56, Søren Gjesse wrote:
> This mixin is in this registry because it is required by PbMapMixin. However
it
> cannot be a primary mixin (or at least is not intended to be as it does not
work
> on its own). Should there be a boolean flag here to indicate that this is not
a
> primary mixin so that the protoc plugin can fail if this is the only mixin
used.
> 
> Of course getting into this situation require "mis-configuration" of the prats
> of the protoc-plugin that are currently hard-coded.

I'm relying on _exportedMixins to indicate whether a Mixin class is "public".
Since MapMixin is not listed there, findMixin will return null and the protoc
plugin will report that the mixin isn't found if someone attempts to use it in a
 .proto file.

We could make the error message better by using a flag like you suggest, but
I'm going to skip that for now.

Powered by Google App Engine
This is Rietveld 408576698