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

Formalize templating syntax #4622

Open
christophermaier opened this issue Feb 15, 2018 · 4 comments
Open

Formalize templating syntax #4622

christophermaier opened this issue Feb 15, 2018 · 4 comments
Labels
Epic Focus :Plan Build Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Focus :Templating Improvements or bugs related to templated content in the Supervisor Stale Type: Feature Issues that describe a new desired feature

Comments

@christophermaier
Copy link
Contributor

christophermaier commented Feb 15, 2018

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] and foo.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

@baumanj
Copy link
Contributor

baumanj commented Jun 26, 2018

Confirmed valid in v0.57

@christophermaier
Copy link
Contributor Author

Added this as a 1.0 task, as I'd like to avoid potentially breaking syntax changes after that.

@stale
Copy link

stale bot commented Apr 2, 2020

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.

@stale stale bot unassigned mpeck Apr 2, 2020
@stale stale bot added the Stale label Apr 2, 2020
@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component and removed A-supervisor labels Jul 24, 2020
@stale stale bot removed the Stale label Jul 24, 2020
@christophermaier christophermaier added Type: Feature Issues that describe a new desired feature and removed C-feature labels Jul 24, 2020
@stale
Copy link

stale bot commented Aug 13, 2022

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.

@stale stale bot added the Stale label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Focus :Plan Build Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Focus :Templating Improvements or bugs related to templated content in the Supervisor Stale Type: Feature Issues that describe a new desired feature
Projects
None yet
Development

No branches or pull requests

6 participants