confy icon indicating copy to clipboard operation
confy copied to clipboard

Compatibility with CLI parsing

Open spacekookie opened this issue 7 years ago • 2 comments

The general idea behind this feature is the following. Take a configuration file:

my_option = "foo"

and a CLI which also wants to provide the option my_option which, if provided overrides the config state and if isn't, just uses the default provided by the configuration.

Open Questions

  • A similar problem was already solved by config (and others), can we just use their work/ be compatible with them?
  • It should also be to use this feature with clap.rs directly, structopt or thunder so a more generic approach is generally good

spacekookie avatar May 28 '18 09:05 spacekookie

Similar to my comment https://github.com/rust-clique/confy/issues/4#issuecomment-392550722, this was suggested as a non-goal in https://github.com/rust-clique/confy/issues/3#issuecomment-385886056:

Viper looks like something that tries to do everything which is not something I think we should replicate or even try to emulate.

(Where viper has multipart configs, env vars, command line handling, and even more.)

No strong feelings, just wanted to point it out. :-)

kamalmarhubi avatar May 28 '18 15:05 kamalmarhubi

I came looking for clap integration. Aside, I've so far decided not to use config crate anymore. I don't want to use toml anyway. SCL is too good, and I really haven't seen any need for the level of configurability that config offers.

naturallymitchell avatar Dec 07 '18 04:12 naturallymitchell