Fork me on GitHub
#juxt
<
2019-12-20
>
andrea.crotti15:12:57

A couple of christmas thoughts about Aero, two common problems I had (and others as well are) • using something like :config-value #or [#env VAR 1] works fine locally, but when you have the $VAR set it's a string and it blows up at runtime • just today I was confused by a problem and it was just that I had [#env VAR "val"] instead of #or [#env VAR "vall"] where my wrong version simply evaluated to a vector

andrea.crotti15:12:36

well I guess that the second version is also potentially fine if someone actually wants a list, but I wonder if there could be a bit more safety

andrea.crotti15:12:12

I can have problem spec validation everywhere, but that still would not catch the first issue, unless $VAR is set somewhere

dominicm15:12:22

Thinking out loud, you could use the internal format aero uses to generate an ast, then use type hints about what is returned from a variable to make sure that all paths are valid. Eg running through a custom type checker.