Skip to content
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

Change to MiniJinja #791

Open
1 task done
pando85 opened this issue Aug 11, 2024 · 8 comments
Open
1 task done

Change to MiniJinja #791

pando85 opened this issue Aug 11, 2024 · 8 comments
Labels
feature/request New feature or request

Comments

@pando85
Copy link

pando85 commented Aug 11, 2024

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

I think that changing the template engine to MiniJinja will be a notable improvement in templates.

Desired solution

Replace Tera with MiniJinja

Alternatives considered

Keep using Tera.

Additional context

No response

@pando85 pando85 added the feature/request New feature or request label Aug 11, 2024
Copy link

welcome bot commented Aug 11, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@alerque
Copy link
Contributor

alerque commented Aug 12, 2024

Why? Personally the use of Tera was one of the things that stood out in git cliff's favor when I was first considering using it. What is the perceived problem with Tera and why would Minijinja be better?

@pando85
Copy link
Author

pando85 commented Aug 12, 2024

There are multiple points about user experience which I think are the most important.

MiniJinja works better in a sense that overpass all the limitations that Tera V2 is trying to fix. For example, Tera doesn't support parenthesis for operations priority. These limitations are recognized by his own author.

Also, MiniJinja syntax is widely known because it is compatible with Jinja2.

I'm not saying that Tera is not a good software. I've loved and used it for a long time. But I think that MiniJinja is better and it can be a personal opinion but I wanted to bring the discussion here.

Furthermore, this is not an easy change because it implies a breaking change but probably Tera V2 is going to have similar problems.

@Cyclonit
Copy link
Contributor

Can you provide a couple of examples of syntax that is supported by MiniJinja but not Tera? A list of breaking changes would be nice too.

@pando85
Copy link
Author

pando85 commented Aug 12, 2024

The things from this list: Keats/tera#637

Plus the syntax is fully compatible with Jinja2.

@orhun
Copy link
Owner

orhun commented Aug 13, 2024

I think this will be a significant breaking change. However, I'm curious about the possibility of supporting MiniJinja with a feature flag for users who might prefer it over Tera (e.g. --features minijinja-templates).

But I'm not still sure if it is worth it. @pando85 what was the feature you needed the most in MiniJinja which Tera does not have?

@orhun orhun removed their assignment Aug 13, 2024
@pando85
Copy link
Author

pando85 commented Aug 13, 2024

I don't have anything special. I want to bring here the discussion. From my perspective it can be a better solution for the future. Probably it could be better just to wait to see what happen with https://github.com/Keats/tera2 which seems that it is already in beta.

Which seems clear to me is that Tera (v1) is going to be deprecated soon.

@orhun
Copy link
Owner

orhun commented Aug 13, 2024

Ooh, I didn't know about the existence of that repository. Thanks for sharing!

Which seems clear to me is that Tera (v1) is going to be deprecated soon.

It's definitely exciting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants