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

Enhance get helper to support hash parameters. #83

Merged
merged 6 commits into from
Jan 2, 2022

Conversation

mkantor
Copy link
Owner

@mkantor mkantor commented Jan 2, 2022

Hash parameters for the get helper work the same way as with partial include syntax. They may override Operator-set render data.

Contributes to #10.

This isn't used yet, but will allow the helper to modify the context
(useful for #10).
Hash parameters for the `get` helper work the same way as with partial
include syntax. They may override Operator-set render data.
@mkantor
Copy link
Owner Author

mkantor commented Jan 2, 2022

Whoops, I need to support hash params for executables too!

@mkantor mkantor closed this Jan 2, 2022
This doesn't always guarantee a deterministic order when dealing with
the new hash params, which can cause some snapshot tests of content
passing multiple hash params to sporadically fail (because of
differing order of serialized JSON object properties, since the tests
just use dumb string equality checks).

`preserve_order` is also not necessary to get a stable ordering (since
serde_json uses a `BTreeMap` by default), and there's probably a small
performance benefit to turning off the feature (though I haven't
measured).
@mkantor mkantor reopened this Jan 2, 2022
@mkantor mkantor merged commit c96b28d into master Jan 2, 2022
@mkantor mkantor deleted the get-helper-hash-parameters branch January 2, 2022 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant