[erlang-questions] Conditional configuration?

Roger Lipscombe roger@REDACTED
Tue Jun 3 15:29:24 CEST 2014


On 3 June 2014 04:50, Richard A. O'Keefe <ok@REDACTED> wrote:
>
> On 30/05/2014, at 11:09 PM, Roger Lipscombe wrote:
>
>> You can provide different config files by using the -config switch. We
>> use this to have a different configuration for each environment.
>> Unfortunately, this leads to a lot of duplication in the config files.
>
> The question is what the cost of that duplication is.
> If someone has to *maintain* duplicate files, that's
> a problem.

Absolutely agree. For *us*, *right now*, the cost is low enough that
we're not immediately bothered. I can see it being a problem for
others, and becoming a problem for us in future.

> Since the configuration files are straightforward
> data structures, how hard would it be to have a module
> that generates all the variants?

At this point, you're basically looking at preprocessing the files,
whether you do something in Erlang, or (even) use GNU m4. This is why
we're considering using cuttlefish for this.



More information about the erlang-questions mailing list