Skip to content

Lambda context support (for JStachio fallback) #286

Description

@agentgt

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions