aconfig: introduce cache
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
Loading
Please register or sign in to comment