-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow only pulling in specific builtins #890
Comments
This reverts commit 995bfe3. Tera does not support only pulling in specific builtins (we just need the slugify one). See Keats/tera#890
The way it's going to work for v2 is that you will have some built-in filters/fn/tests that don't require deps directly in Tera. Anything else will be a in a tera-contrib package with individual features for each element |
Would I be able to make a PR for v1 while v2 is still a work in progress? Or do you think v2 is stable enough to make the switch already? My plan is to decrease the amount of dependencies Bevy uses in its CI, with Tera being the first on the list. The only filter it needs is |
v2 is not coming that soon. For your usecase you can just disable the built-in feature and copy paste the slugify filter? |
To be honest I didn't realize you can register your own filters. Thanks for the idea! Have a good weekend |
In order to use builtin filters and functions, you have to enable the
builtin
feature:tera/Cargo.toml
Line 48 in 290889e
This feature requires 6 different dependencies, some of which you may not need (like
rand
). Instead of requiring an "all or nothing" approach, what if instead specific builtins are enabled only if the dependency they require is also enabled?For instance,
slugify
would only require theslug
feature to be enabled:Source
I would love to work on this if the idea gets approved! :)
The text was updated successfully, but these errors were encountered: