Index: test/protos/dart_options.proto |
diff --git a/test/protos/dart_options.proto b/test/protos/dart_options.proto |
index 7a16d818606f5a865c456b856ee29380b84ec3e5..3f75f67134e339f163ba57135ed5c03e677715b8 100644 |
--- a/test/protos/dart_options.proto |
+++ b/test/protos/dart_options.proto |
@@ -10,8 +10,31 @@ package dart_options; |
import "descriptor_2_5_opensource.proto"; |
+// A mixin to be applied in the 'with' clause of a generated proto in dart. |
+message DartMixin { |
+ // Class name of the mixin class. |
+ optional string name = 1; |
+ |
+ // File from which the mixin class is imported. |
skybrian
2016/06/23 19:01:42
"File" => "URI"
|
+ // The generated Dart code will use this in an import statement. |
+ optional string import_from = 2; |
+ |
+ // Used to apply multiple mixins to a proto. |
+ // The mixin listed in parent will always be applied before this one, |
+ // making the generated proto implement both mixins. |
+ optional string parent = 3; |
+} |
+ |
extend google.protobuf.FileOptions { |
+ // Defines the named mixins to be used on messages in this file. |
+ // These mixins are in addition to internally defined mixins (e.g PbMapMixin) |
+ // and may override them. |
+ // Warning: there is no checking at compile time for name conflicts between |
+ // identifiers defined in the mixin and proto-generated identifiers. |
+ // Running dartanalyzer on the generated file might find some of them. |
+ repeated DartMixin mixins = 28125061; |
+ |
// Applies the named mixin to all messages in this file. |
// (May be overridden by the "mixin" option on a message.) |
// For now, "PbMapMixin" is the only available mixin. |