spullara / spullara/mustache.java
Lambda context support (for JStachio fallback)
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2k
- Forks
- 281
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the JStacheLambda and JMustacheRenderer documentation linked in the issue, then inspect mustache.java's lambda handling and context access. The issue does not name files or tests, and completion would require deciding whether context exposure is possible and defining the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100