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

Issue 2086253002: Allow application of external mixins to generated dart protos. (Closed)

Created:
4 years, 6 months ago by frederikmutzel
Modified:
4 years, 5 months ago
Reviewers:
skybrian
CC:
reviews_dartlang.org, Søren Gjesse
Base URL:
https://github.com/dart-lang/dart-protoc-plugin.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Allow application of external mixins to generated dart protos. These are defined using the new dart_option "mixins". For example usage, see test/protos/mixins.proto. This change requires issue 2090033002 to be submitted first, which introduces protobuf version 0.5.2. R=skybrian@google.com Committed: https://github.com/dart-lang/dart-protoc-plugin/commit/fc1de6cf0dae146bf9f7d1053639bcdd71bc6b34

Patch Set 1 #

Patch Set 2 : Add support for mixins in protos. #

Total comments: 18

Patch Set 3 : Update from code review. #

Total comments: 7

Patch Set 4 : Make imported_mixins a single optional field for older protoc compatibility. #

Patch Set 5 : Revert pubspec-yaml to require 0.5.2, forgot that in the last upload #

Total comments: 5

Patch Set 6 : Add dart options for override annotations. These make it possible to annotate generated getters, se… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -6 lines) Patch
M lib/message_generator.dart View 1 2 3 4 5 2 chunks +24 lines, -1 line 0 comments Download
M lib/protobuf_field.dart View 1 2 3 4 5 2 chunks +17 lines, -0 lines 0 comments Download
M lib/src/dart_options.pb.dart View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M test/protos/dart_options.proto View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M test/protos/mixins.proto View 1 2 3 4 5 2 chunks +15 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (3 generated)
skybrian
https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart File lib/file_generator.dart (right): https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart#newcode21 lib/file_generator.dart:21: throw ('Duplicate mixin name: "${mixin.name}"'); style nit: parentheses aren't ...
4 years, 6 months ago (2016-06-22 19:27:18 UTC) #3
skybrian
https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart File lib/file_generator.dart (right): https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart#newcode21 lib/file_generator.dart:21: throw ('Duplicate mixin name: "${mixin.name}"'); When we throw we ...
4 years, 6 months ago (2016-06-22 20:29:53 UTC) #4
frederikmutzel
https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart File lib/file_generator.dart (right): https://codereview.chromium.org/2086253002/diff/20001/lib/file_generator.dart#newcode21 lib/file_generator.dart:21: throw ('Duplicate mixin name: "${mixin.name}"'); On 2016/06/22 19:27:18, skybrian ...
4 years, 6 months ago (2016-06-23 12:30:16 UTC) #5
skybrian
On 2016/06/23 12:30:16, frederikmutzel wrote: > I'd really prefer to use a package import here. ...
4 years, 6 months ago (2016-06-23 19:00:00 UTC) #6
skybrian
LGTM In the interest of making progress, I'm going to land this as-is. Here are ...
4 years, 6 months ago (2016-06-23 19:01:42 UTC) #7
skybrian
When I tried testing this I got: mixins.proto:5:8: Option field "(dart_options.mixins)" is repeated. Repeated options ...
4 years, 6 months ago (2016-06-23 19:58:01 UTC) #8
frederikmutzel
On 2016/06/23 19:58:01, skybrian wrote: > When I tried testing this I got: > > ...
4 years, 6 months ago (2016-06-23 21:20:18 UTC) #9
skybrian
Good idea. Let's try that. ImportedMixins maybe?
4 years, 6 months ago (2016-06-23 21:25:17 UTC) #10
skybrian
On 2016/06/23 21:25:17, skybrian wrote: > Good idea. Let's try that. > > ImportedMixins maybe? ...
4 years, 6 months ago (2016-06-24 00:13:19 UTC) #11
frederikmutzel
On 2016/06/24 00:13:19, skybrian wrote: > On 2016/06/23 21:25:17, skybrian wrote: > > Good idea. ...
4 years, 6 months ago (2016-06-24 08:00:29 UTC) #12
frederikmutzel
On 2016/06/24 08:00:29, frederikmutzel wrote: > On 2016/06/24 00:13:19, skybrian wrote: > > On 2016/06/23 ...
4 years, 5 months ago (2016-06-27 08:44:18 UTC) #13
frederikmutzel
https://chromiumcodereview.appspot.com/2086253002/diff/40001/lib/file_generator.dart File lib/file_generator.dart (right): https://chromiumcodereview.appspot.com/2086253002/diff/40001/lib/file_generator.dart#newcode23 lib/file_generator.dart:23: final dartMixins = <String, DartMixin>{}; On 2016/06/23 19:01:42, skybrian ...
4 years, 5 months ago (2016-06-27 08:44:31 UTC) #14
skybrian
Thanks, I will land this (with changes below). (I will be on vacation on Wednesday ...
4 years, 5 months ago (2016-06-27 23:33:38 UTC) #15
skybrian
https://codereview.chromium.org/2086253002/diff/80001/test/protos/mixins.proto File test/protos/mixins.proto (right): https://codereview.chromium.org/2086253002/diff/80001/test/protos/mixins.proto#newcode6 test/protos/mixins.proto:6: mixins: [{ The bad news is that this syntax ...
4 years, 5 months ago (2016-06-28 00:13:08 UTC) #16
skybrian
Committed patchset #5 (id:80001) manually as fc1de6cf0dae146bf9f7d1053639bcdd71bc6b34 (presubmit successful).
4 years, 5 months ago (2016-06-28 00:46:40 UTC) #18
skybrian
4 years, 5 months ago (2016-06-28 05:29:53 UTC) #19
Message was sent while issue was closed.
On 2016/06/28 00:46:40, skybrian wrote:
> Committed patchset #5 (id:80001) manually as
> fc1de6cf0dae146bf9f7d1053639bcdd71bc6b34 (presubmit successful).

Landed as-is and created another patch:
https://codereview.chromium.org/2103743002/

Powered by Google App Engine
This is Rietveld 408576698