-
Couldn't load subscription status.
- Fork 49
Configuration Facility Design
Ilya Sher edited this page Feb 25, 2019
·
2 revisions
Software needs configuration to operate (except for very basic or one off software with hard coded configuration).
- Support for configuration sources
- Command line switches
- Must not interfere with arbitrary processing of command line arguments by the main program
- Environment variables
- Structured files
- Maybe: runtime configuration using API
- Command line switches
- Ability to provide different data types, not only strings (as typical for environment variables and command line switches).
- Priorities of configuration source (low to high)
- Configuration files
- System-wide
- Home directory (somewhere under home directory to be more specific)
- Environment variables
- Command line switches
- Configuration files
- Take another look at Spring for ideas
- Which other frameworks to look at?
- Do we need schema on order to know how to parse?
- Consider dependency injection (where the types/objects are configured by this configuration system)
- Check
.localfolder and do more general research on where config files should go - Debugging is already configured using the
DEBUGenvironment variable- Think about compatibility
- Design switching debugging configuration to the new (this) system
- Consider overriding/merging behaviour for lists (Arr) and dictionaries (Hash)... or any other types of containers
- Consider
++as end-of-configuration marker for command line arguments.- ... but not after
--?
- ... but not after
- See
config()method
NGS official website is at https://ngs-lang.org/