HomePhabricator

[Wilds] Prepare for more modular configuration management

Authored by epriestley on Sep 18 2018, 7:49 PM.

Description

[Wilds] Prepare for more modular configuration management

Summary:
Ref T13098. This is kind of a catch-all diff with stuff that didn't fit in prior diffs, and which fixes some bugs with that stuff now that I made it at least sort of reachable.

Beyond bugs, the general idea is to replace ConfigurationManager (a big class which knew about config-end-to-end) with a more modern/modular ConfigurationEngine using the standard Engine + EngineExtension modularity pattern.

Configuration becomes a ConfigurationSourceList of ConfigurationSource objects, each of which represents one source (a config file, --config x=y, etc). The various sources will have the logic to parse values (e.g., decode x=y flags or JSON files on disk). A new --config-file allows you to replace the system (/etc/arcconfig) and user (~/.arcrc) files.

This also gets rid of --library support entirely for now since it's kind of messy to bridge until Config works. I expect to either restore it or replace it with arc install and similar.

Test Plan: Ran arc liberate; it actually works now. (The Config stuff does not actually work yet.)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13098

Differential Revision: https://secure.phabricator.com/D19694