basho/cuttlefish — pull request #116 by joedevivo (2014-02-05 21:11:32+00:00)
Title: Right Hand Side Substitutions

This is the ability to have settings depend on other settings, either explicitly or by default.

Imagine a `riak.conf` file:

```
##
## Default: ./data
##
## Acceptable values:
## - the path to a directory
platform_data_dir = ./lore

## Default location of ringstate
##
## Default: #(platform_data_dir)/ring
##
## Acceptable values:
## - the path to a directory
ring.state_dir = #(platform_data_dir)/ring
```

If you change `platform_data_dir`, `ring.state_dir` will also change

The effective config will still display the relative value:

```
...
platform_data_dir = ./lore
ring.state_dir = #(platform_data_dir)/ring
...
```

But the generated `app.config` will have a hard substitution

```
[
{riak_core, [
{platform_data_dir, "./lore"},
{ring_state_dir, "./lore/ring"}
]}
].
```

This will allow for a more consistent experience when sub directories in riak.

Here are some caveats:
* Only one RHS substitution per line
* If you're including a RHS sub as a default, that default must be a string

I'll open up a PR against riak_core so you can see how this would work in practice.