You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now default only allows a handful of different expression types. But sometimes you might want to store the value in a Rust constant or call a function or something like that. Maybe we want to allow that?
The obvious problem here is printing that in the config template. Either the user specifies default_in_template = ... for us to use, or we require that the value implements Serialize and somehow do it like this? Both seems rather meh.
And maybe basically no one wants this feature anyway. Or maybe we shouldn't even allow it as the default value should be expressible in simple expressions: that's whats in the config file in the end, after all.
The text was updated successfully, but these errors were encountered:
I think that calling a function (for example to get the home directory of the user) at runtime is an extremely common procedure in making config defaults which use any type of file path.
Right now
default
only allows a handful of different expression types. But sometimes you might want to store the value in a Rust constant or call a function or something like that. Maybe we want to allow that?The obvious problem here is printing that in the config template. Either the user specifies
default_in_template = ...
for us to use, or we require that the value implementsSerialize
and somehow do it like this? Both seems rather meh.And maybe basically no one wants this feature anyway. Or maybe we shouldn't even allow it as the default value should be expressible in simple expressions: that's whats in the config file in the end, after all.
The text was updated successfully, but these errors were encountered: