A description of the profile
Ordered list of profiles to be loaded in a standard DFS traversal
Default values for options, only set if no explicit value has been set at the end of configuration
- If multiple --profiles are provided on the command-line, the defaults are set right-to-left (if needed).
Required options for this profile, set immediately during configuration.
- If multiple --profiles are provided on the command-line, the defaults are set left-to-right (potentially overwritten).
High-level goal: Any entry appearing in "requires" and "defaults" should be exposed as a user-facing customization switch. Customization which is intended to never face users should reside in the "definitions" section, such as the phases and classes of processors.
The profile expansion happens inside the high-level option expansion pass, which processes options provided to the executable (command-line or server parameters).
- Initialize a CFG_OPTS options hash local to this profile
- Load profile file and parse YAML definitions
- DFS descent into dependencies, go to 1. for each, passing in the current CFG_OPTS
- Process definitions. On collisions, merge definition hashes, overwriting key values where needed
- Process "requires". On collisions, overwrite values.
- Suspend processing "defaults" by pushing them on a global DEFAULTS_OPTS
- Return the assembled CFG_OPTS
- Parse options, deferring to profile expansion on --profile and --format
- The parsing happens left-to-right, where collisions are overwritten as appropriate
- Use the assembled DEFAULT_OPTS to fill in any missing option values