package-manager icon indicating copy to clipboard operation
package-manager copied to clipboard

Simplify availability of user vars in templates

Open ckreibich opened this issue 2 years ago • 1 comments

zkg currently warns when a user var that a template feature declares required is not available, but then continues. The validation methods in the features currently check that values are actually present and non-empty, but they don't really need to — the fact that features already declared them required is enough.

We can simplify this by aborting where we currently warn. That means the validation code only has to do the kind of validation that's actually interesting, such as checking for a particular type, formatting, etc.

We can also simplify how the templating code currently derives substitution parameters from user vars: when a user var directly translates into a param, that can be done by default — no need for templates to do this explicitly.

ckreibich avatar Oct 13 '21 05:10 ckreibich