Skip to content

Initial implementation of config parser#286

Open
pacak wants to merge 4 commits intomasterfrom
config
Open

Initial implementation of config parser#286
pacak wants to merge 4 commits intomasterfrom
config

Conversation

@pacak
Copy link
Owner

@pacak pacak commented Aug 28, 2023

Implements #275

  • - NamedArg::key gives an easy "read this thing from the config" method
  • - Parser::key behaves similar to Parser::fallback and gives "if not specified - try to use config"
  • - how to pass config to the parser? Ended up implementing OptionParser::config_parser
    • want to be able to run tests or custom runs - use with OptionParser::run_inner
    • want to be able to specify config file name on a command line
  • - strictly typed config reader in addition to stringly typed? Generic parsers tend to produce an enum Value that can be one of String, f64, etc. should Config::get return a local version of that?
  • - how should a single key annotation on a field behave?
    • it can behave similarly to env and add a fallback to the config
    • it can behave like short/long and override the behavior making it easy to create pure config reader
  • - API documentation
  • - tutorial documentation
  • - instances of Config for a few formats? yaml/json/toml?
  • - simple "ini" config reader
  • - derive macro support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant