Closed Licenser closed 10 years ago
I'm going to mull this over the weekend. I think it (or something similar) will solve some problems I've also had. Part of the mulling will be trying to remember what those problems were.
mull away! If you want I can make a PR for this too but I wanted to discuss it before investing more time then just coming up with crazy stuff ;)
This is covered now with the little publicized "right hand substitutions" feature. It would work like this:
{mapping, "data_dir", "riak_core.platform_data_dir",
[{default, "{{platform_data_dir}}"},
{datatype, directory}]}.
{mapping, "hanoi.data_root", "hanoidb.data_root",
[{default, "#(data_dir)/hanoi"},
{datatype, directory}]}.
then you could also override in your .conf file like this:
data_dir = /wherever
hanoi.data_root = #(data_dir)/some_other_hanoi_path
I found it to be a commone sep to do something like this:
aka hide the detailed setting under a simplified name for a system. So what would be great is if there would be something like
{alias, "hanoidb.data_root"}
which would then act as a 'default' forhanoidb.data_root
(as example).So this would simplify the above code to:
which is kind of sweet ;)