handlebars.js icon indicating copy to clipboard operation
handlebars.js copied to clipboard

We need a spec

Open lawnsea opened this issue 8 years ago • 8 comments

Currently, the Handlebars language is defined by the behavior of this reference implementation and incompletely described by the documentation found at handlebarsjs.com. This makes it very difficult to reason about bugs like #1276. Should partials that use {{> @partial-block}} be invocable in the manner the bug reporter expects? Not clear.

I had a related discussion with @wycats and we came to the conclusion that we need to specify the language before we move forward with any new features.

This would be a non-trivial effort. Thoughts?

lawnsea avatar Nov 23 '16 03:11 lawnsea

#1262 is another great example of why we need a spec.

lawnsea avatar Nov 23 '16 04:11 lawnsea

Looks like work is already underway: https://github.com/handlebars-lang/spec.

lawnsea avatar Nov 23 '16 15:11 lawnsea

I'm reopening this issue. Although there is an attempt for a spec in the referenced repo, there is no progress at the moment.

nknapp avatar Aug 02 '17 22:08 nknapp

No progress has been made in months, and no new features are being added until it's done? That seems incredibly... silly

MaxLeiter avatar Aug 02 '17 22:08 MaxLeiter

I think, we need more help here. Someone has made a first attempt for a spec, but at the moment, there is nobody actively working on it. On the other hand @wycats has made it clear, that he wants to have a spec before new language features are implemented. The reason for this is (as I understood):

There are many implementations of the Handlebars language in different programming-languages (Java, Rust, multiple implementations in JavaScript...) and without a formal specification, they will always diverge. You can never be sure that your templates still work when you migrate to another engine.

nknapp avatar Aug 02 '17 22:08 nknapp

Yes, there aren't many active collaborators at the moment. I don't want to say that I'm the only one, but sometimes it feels like it.

When I asked @wycats for push-access and release-permissions, I had the feeling that there was noone with the time and the resources to fix bugs and publish new releases, so I wanted to at least become that person.

I would also love to write a spec and a great documentation site, but the reality is that I have a wife and two kids, a daytime job and a house to pay off. And I have few other open-source projects.

I can fix bugs, answer to issues, merge PRs and publish new versions. But writing a spec is too much (at the moment)

nknapp avatar Aug 02 '17 22:08 nknapp

Has there been any progress on this? I'm attempting to write a Dart version of handlebars, and it is very difficult to without a formal spec to work off of.

EDIT: I should also say that I am willing to take some of my own time to help develop the spec, if help is needed.

thislooksfun avatar Nov 09 '17 02:11 thislooksfun

I have started a repo at handlebars-lang/specification on which I work when I have nothing else to do (which is not very often). Feel free to contribute there. I can add you to the team if you want.

nknapp avatar Nov 09 '17 05:11 nknapp