Open ianmcook opened 7 years ago
I'm we're only responding now, but I'm doing some cleanup of old issues.
IIUC, you're suggesting to be able to evaluate expressions in the config file. This is now possible, so I suggest closing this issue.
If I misunderstand, please add some additional context about how you would call config::get()
using these "dots arguments".
The idea is that you would call config::get(value = "some.setting", master = TRUE)
. Since master
is not one of the formal arguments to config::get()
, it would be interpreted as one of the ...
(dots) arguments, and its specified value "local"
would then be used to evaluate the expression.
I'm not sure if this is a good idea, but I'll throw it out here: What if
config::get()
could take named dots arguments and evaluate them in!expr
expressions in config.yml files? This would provide a useful way to add context dependence to configuration without using environment variables.A practical example:
sparklyr::spark_connect()
callssparklyr::spark_config()
which in turn callsconfig::get()
. Say you wanted to specify Spark configuration parameters in config.yml, but make them dependent on themaster
argument tospark_connect()
. If themaster
argument was passed through in the dots toconfig::get()
, then you could have a config.yml file like this: