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

Unified Diff: test/protos/mixins.proto

Issue 2086253002: Allow application of external mixins to generated dart protos. (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: Revert pubspec-yaml to require 0.5.2, forgot that in the last upload Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/protos/dart_options.proto ('K') | « test/protos/dart_options.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/protos/mixins.proto
diff --git a/test/protos/mixins.proto b/test/protos/mixins.proto
new file mode 100644
index 0000000000000000000000000000000000000000..fccd674a5976114761959695fda9ca23751a29b6
--- /dev/null
+++ b/test/protos/mixins.proto
@@ -0,0 +1,41 @@
+syntax = "proto2";
+
+import "dart_options.proto";
+
+option (dart_options.imported_mixins) = {
+ mixins: [{
skybrian 2016/06/28 00:13:08 The bad news is that this syntax for initializing
+ name: "Mixin1"
+ import_from: "package:protoc_plugin/testing/mixins.dart"
+ },
+ {
+ name: "Mixin2"
+ import_from: "package:protoc_plugin/testing/mixins.dart"
+ },
+ {
+ name: "Mixin3"
+ import_from: "package:protoc_plugin/testing/mixins.dart"
+ parent: "Mixin1"
+ }];
+};
+
+option (dart_options.default_mixin) = "Mixin1";
+
+message NoMixinPB {
+ option (dart_options.mixin) = "";
+}
+
+message Mixin1PB {
+ optional string interface_string = 1;
+}
+
+message Mixin2PB {
+ option (dart_options.mixin) = "Mixin2";
+
+ optional string overridden_has_method = 3;
+}
+
+message Mixin3PB {
+ option (dart_options.mixin) = "Mixin3";
+
+ optional string interface_string = 1;
+}
« test/protos/dart_options.proto ('K') | « test/protos/dart_options.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698