Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of config parser #286

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Initial implementation of config parser #286

wants to merge 4 commits into from

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