-
Notifications
You must be signed in to change notification settings - Fork 315
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
Formalize templating syntax #4622
Comments
Confirmed valid in v0.57 |
Added this as a 1.0 task, as I'd like to avoid potentially breaking syntax changes after that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
Description
Spurred by #4615 and the subsequent fix in #4620, we have a bit of work to do to tighten up our templating syntax.
As detailed in #4620, the Rust
handlebars
crate we're currently using changed how it processes array access; it used to use{{foo[0]}}
, which is Habitat's syntax, but it was changed in version 0.29.0 to use the Handlebars-standard{{foo.[0]}}
dot notation instead. Testing at http://tryhandlebarsjs.com suggests that this is, in fact, the correct Handlebars syntax for array access (foo[0]
andfoo.0
both fail).This in turn suggests that we would need to update our templating engine to accept the old format as well as the newer, correct format in Habitat templates (otherwise we'll be stuck on version 0.28.3 of the
handlebars
crate forever).This further suggests that we should have a linter that can validate templates, and suggest updates to the correct syntax when appropriate (we've had a linter request before: #1779). The regression above also indicates that we need a more complete test suite of our rendering engine, ensuring that it can properly process anything we consider to be a valid template.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: