platform_build/tools/aconfig
Mårten Kongstad a2e5ab82c7 aconfig: make proto fields optional
Change all required proto fields to optional. While the proto file is
supposed to be a backwards compatible API, and fields are not supposed
to be deprecated, this commit will allow for that option if needed.

Implementation wise this change doesn't matter much: any parsed data
needs additional verification outside what the protobuf crate's parser
provides anyway, so adding checks to verify that all required fields,
even though marked optional in the proto file, were found is a minor
increase in code complexity.

If in the future a proto field should no longer be used:

  - keep the field in the proto, still marked optional and clearly
    document that it is no longer in use
  - change protos.rs from checking struct.has_field() to explicitly
    dropping any value via struct.clear_field()

Bug: 286337317
Test: atest aconfig.test
Change-Id: Iad1ccfe50ecac286ff7a796aec909bec70b9520d
2023-06-19 16:53:22 +02:00
..
protos aconfig: make proto fields optional 2023-06-19 16:53:22 +02:00
src aconfig: make proto fields optional 2023-06-19 16:53:22 +02:00
templates aconfig: generate Java flag name constants 2023-06-19 16:12:01 +02:00
tests aconfig: change java flag method name to camelCase 2023-06-16 12:40:40 +00:00
.gitignore aconfig: add support for cargo 2023-05-03 09:41:11 +02:00
Android.bp Fix build breakage 2023-06-09 13:39:41 -07:00
build.rs aconfig: add support for cargo 2023-05-03 09:41:11 +02:00
Cargo.toml aconfig: improve code diffs in tests 2023-06-08 11:27:59 +02:00
MODULE_LICENSE_APACHE2
OWNERS
PREUPLOAD.cfg
rustfmt.toml