aconfig: add proto `bug` field
Add a `bug` field on the flag_declaration and parsed_flag proto
messages. This field is optional in the sense that it can occur zero or
more times, and aconfig will simply pass any value through.
Bug fields are included in the aconfig dump format, which can be
processed by other tools.
Also unify how protos.rs checks that fields marked 'optional' in the
proto file, but in practice are 'required', are actually set.
Test: atest aconfig.test aconfig.test.java
Bug: 288261336
Change-Id: I93de0005674822c6ff4d699bdc2c6509763a7f7f
diff --git a/tools/aconfig/protos/aconfig.proto b/tools/aconfig/protos/aconfig.proto
index b59fdfc..4cad69a 100644
--- a/tools/aconfig/protos/aconfig.proto
+++ b/tools/aconfig/protos/aconfig.proto
@@ -38,6 +38,7 @@
optional string name = 1;
optional string namespace = 2;
optional string description = 3;
+ repeated string bug = 4;
};
message flag_declarations {
@@ -70,9 +71,10 @@
optional string name = 2;
optional string namespace = 3;
optional string description = 4;
- optional flag_state state = 5;
- optional flag_permission permission = 6;
- repeated tracepoint trace = 7;
+ repeated string bug = 5;
+ optional flag_state state = 6;
+ optional flag_permission permission = 7;
+ repeated tracepoint trace = 8;
}
message parsed_flags {