Fue icon indicating copy to clipboard operation
Fue copied to clipboard

Does not raise errors when referencing non-existing properties

Open agross opened this issue 7 years ago • 3 comments

With placeholders: {{{ config.Foo }}} and {{{ config.Bar }}}
{{{ config.DoesNotExist }}}

configs type does not contain a definition for DoesNotExist, yet rendering is successful. I wonder if this is intentional.

agross avatar Mar 15 '19 13:03 agross

Yeah, the value is just not replaced at all. It was designed to be not so intrusive (IMHO it is better have all rendered except one than have full failure), but I am gathering improvements ideas for next major version so please if you see any area for improvement, keep it coming.

Dzoukr avatar Mar 16 '19 17:03 Dzoukr

It was designed to be not so intrusive

I'd say this makes Fue unreliable. I'm currently investigating if I could use Fue to template config files. It would be unfortunate to create configs that won't run in production because someone msityped a key. See, it already happened ;-)

Here's what I have in mind: https://github.com/agross/fake-config-templates/blob/master/build.fsx#L31-L69

agross avatar Mar 16 '19 20:03 agross

I see. Hmmm. I'll keep that in mind for next version, maybe this is good intention, but bad behavior. :)

Dzoukr avatar Mar 18 '19 06:03 Dzoukr