aero icon indicating copy to clipboard operation
aero copied to clipboard

Suggestion: A value which should never be filled for dummy values (e.g. #throw)

Open SevereOverfl0w opened this issue 5 years ago • 1 comments

Inspired by https://lobste.rs/s/chxlum/changeme_is_valid_base64#c_drqazo

The use case is for when setting up a config early in a project, and you're not sure what the value will be, something like this:

:api-token {:dev "dev-token" :prod "changeme"}

In order to assist with forgetting to change the token, you could instead do

:api-token {:dev "dev-token" :prod #throw "changeme"}

which would give you early warning that something was amiss. Ideally Aero's reporting would bubble out information such as what k-path the error was at.

SevereOverfl0w avatar Nov 12 '20 19:11 SevereOverfl0w

It might be useful to have this be the default return value for #profile, etc. too:

(read-config "#profile {:foo 10}" {:profile :bar}) ;; => 💥 

SevereOverfl0w avatar Nov 09 '21 10:11 SevereOverfl0w