Improve readability by extracting how multiple input files are
transformed from a clap argument to an Input.
Bug: 279485059
Test: atest aconfig.test
Change-Id: I299179d39eca80e107342f6978984da79ee81e34
Improve how the flag values (state, permission) are tracked when parsing
config and override files: migrate from a raw string to a proper struct,
as this will make it easier when aconfig will output this data in some
structured format for other tools to consume.
Also, rename Cache.debug to Cache.trace.
Bug: 279485059
Test: atest aconfig.test
Change-Id: Idad57c969515f697e9065429d8a44c38d8a512d2
Adding in build time flag for specifying cow version, in preparation to
add new cow version in libsnapshot
Test: m -> cat misc-info.txt
Bug: 279954153
Change-Id: I148d4e7cdd669496c91213889787172ffd83a5ab
Change the underlying type of a flag's value from bool to an explicit
enum (Disabled, Enabled): this will hopefully reduce future confusion on
how flags are intended to be used.
Bug: 279485059
Test: atest aconfig.test
Change-Id: I9535f9b23baf93ad5916ca06fb7d21277b4573eb
Introduce the concept of flag read/write permissions: a read-only flag
can only have its value set during the build; a writable flag can by
updated in runtime.
Bug: 279485059
Test: atest aconfig.test
Change-Id: I3ec5c9571faa54de5666120ccd60090d3db9e331
The Source struct is no longer serialized/deserialized. Remove the
unused derives.
Bug: 279485059
Test: atest aconfig.test
Change-Id: Ifd78988ed8134ab43013314b4437e428a8927981
The board configuration already had this inlined, and the addition
of a separate script makes it harder to follow what's happening.
Bug: 280685526
Test: ./build/bazel/ci/rbc_dashboard.py --quick aosp_arm64-userdebug
Change-Id: Ib76c4a46932ae81d84f854fbee5b0453266d6497
am skip reason: Merged-In Iec0d67abed7e0d53976e663ca8f4d497a33199e8 with SHA-1 e870db0c38 is already in history
Original change: https://android-review.googlesource.com/c/platform/build/+/2579071
Change-Id: Iab63646a364e79095d6608e4bd65377cce0508bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Iec0d67abed7e0d53976e663ca8f4d497a33199e8 with SHA-1 e870db0c38 is already in history
Original change: https://android-review.googlesource.com/c/platform/build/+/2579071
Change-Id: I2164b7695587fad7c99aa0e06dbb16918b9da634
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
* changes:
aconfig: add support for changing flag value based on build
aconfig: introduce cache
aconfig: define Aconfig proto
aconfig: add support for cargo
Create new phony build targets for sync_system, sync_vendor,
sync_product, sync_system_ext, sync_odm, sync_vendor_dlkm,
sync_odm_dlkm, and sync_system_dlkm.
These build just the files on the associated partion, (e.g.
/system_ext), but not the image file (e.g. system_ext.img). Like sync,
but just for a single partition.
Test: modify System UI, m sync_system_ext && adb sync && am restart
Change-Id: I5aa40d7018e029a57114681dd16db3f1e5651a63
Teach aconfig about build IDs (continuously increasing integers). Extend
the aconfig file format to allow flags to say "by default, my value is
X, but starting from build ID A, it's Y, and from build ID B, it's Z".
Bug: 279485059
Test: atest aconfig.test
Change-Id: Idde03dee06f6cb9041c0dd4ca917c8b2f2faafdd
Introduce the Cache struct to represent parsed and verified aconfig and
override content. Most commands in aconfig will work of an existing
cache file, eliminating the need to re-read the input every time.
Restructure main.rs to use clap to create a proper command line
interface with support for sub-commands. main.rs is responsible for
parsing the command line, performing disk I/O and calling the correct
subcommand implementation (in commands.rs).
To simplify unit tests, subcommands never perform explicit I/O; instead
they only work with Read and Write traits.
Also add dependencies on clap, serde and serde_json.
Bug: 279485059
Test: atest aconfig.test
Change-Id: Ib6abf2eabd264009804f253874b6fba924fc391b
Fill in aconfig.proto. Define Aconfig definitions (for introducing flags
and setting their values) and Overrides (for overriding flags regardless
of what their definitions say). More changes to the proto schema are
expected when more of the aconfig project is outlined.
Use proto2 instead of proto3: this will cause the protobuf text parser
to error on missing fields instead of returning a default value which is
ambiguous, especially for booleans. (Also, the text protobuf parser
doesn't provide good error messages: if the input is missing a field,
the error is always "1:1: Message not initialized").
Unfortunately the generated Rust wrappers around the proto structs land
in an external crate, which prevents aconfig from adding new impl
blocks. Circumvent this by converting the data read from proto into
structs defined in the aconfig crate.
Change main.rs to parse (static) text proto.
Also add dependency on anyhow.
Bug: 279485059
Test: atest aconfig.test
Change-Id: I512e3b61ef20e2f55b7699a178d466d2a9a89eac
Revert submission 2529481-aosp-no-emulator
Reason for revert: DroidMonitor: Potential culprit for Bug 280642806 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:2529481-aosp-no-emulator
Change-Id: I732e1b1a1f001fe016a4e20c1a95516995522501