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

Lambda context support (for JStachio fallback) #286

Open
agentgt opened this issue Nov 10, 2022 · 0 comments
Open

Lambda context support (for JStachio fallback) #286

agentgt opened this issue Nov 10, 2022 · 0 comments

Comments

@agentgt
Copy link

agentgt commented Nov 10, 2022

So I recently early released a mustache type checked library called JStachio: https://github.com/jstachio/jstachio

While it may seems like JStachio is a competing Mustache implementation I think its complementary to both this library and JMustache. It actually can help users of mustache.java for type checking structured models (jstachio is not good at Map<String,?> models) while delegating to mustache.java for dynamic models.

JStachio delegating to either JMustache or mustache.java also allows more rapid development of templates as unfortunately incremental compilation via annotation processor for resources is problematic. Then in production one can turn off delegating and rely on the jstachio generated java code or not.

Anyway I could not figure out how to get a 1:1 support of lambdas in JStachio to mustache.java like I was with JMustache because it appears there is no way to get context from a lambda.

Is that correct? Am I missing something? I realize this isn't really part of the mustache spec but many implementations allow access.

Regardless @spullara any feedback on the library would be greatly appreciated.

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

No branches or pull requests

1 participant