Kyorai / cuttlefish

Erlang library to read sysctl-like configuration files
Apache License 2.0
22 stars 14 forks source link

Environment vars #7

Closed heyoka closed 3 years ago

heyoka commented 4 years ago

I would like to warm up an old issue from the original basho cuttlefish repository: Environment Variables Is there any change for such a feature ? I woud need this for different scenarios where config via Environment vars is mandatory.

Thank you.

michaelklishin commented 4 years ago

Environment variables are "arbitrarily typed", unvalidated inputs so using them should be a last resort measure. However, I can see how this can be useful in a narrow number of cases.

If Cuttlefish expanded such variables before performing validation and would take the key type into account when parsing the values, it might work well. Rendering values verbatim is also an option.

We need someone interested to put together a specific proposal as to how exactly such environment variable support would work. For example, we can add a built-in function instead of a special syntax. We need to decide what to do with the implicit typing of raw env variable values.

@heyoka would you be up for putting together a specific proposal with some examples that address the typing question above?

michaelklishin commented 3 years ago

Closing due to the lack of activity (and interest in env variable support from some of the heaviest users of Cuttlefish today).