tera icon indicating copy to clipboard operation
tera copied to clipboard

Default "__tera_one_off" template name used for the string templates creates confusion

Open nulltier opened this issue 3 years ago • 4 comments

Tera provides two methods which allows to render the templates without a name and clear posibility to derive a name from somewhere (filename, for example). Though for the code consistency Tera internals consideres name required. That is why default value was introduced.

The issue with this default value is that is requires to be mentioned in docs explicitly. It contains not enough information on its own. Consider something like "NAMELESS STRING TEMPLATE" default name to compare how it could make error messages easier to comprehend even without additional mentions in documentation.

The biggest issue with this improvement is that it better to be postponed for major release since it could break error handling implemented by the library users.

nulltier avatar May 21 '22 19:05 nulltier

I will prepare the PR if the idea got an approve.

nulltier avatar May 21 '22 20:05 nulltier

Yep, this will get changed for the next major version, probably no need to change it now though.

Keats avatar May 21 '22 21:05 Keats

Did you changed it already? I can create a PR into separate branch, dedicated for the next major release. Will you plan to create such branch?

nulltier avatar May 22 '22 09:05 nulltier

The repo will likely be rewritten from scratch

Keats avatar May 23 '22 08:05 Keats