Releases: hashicorp/hcl
Releases · hashicorp/hcl
v2.10.0
v2.10.0 (April 20, 2021)
Enhancements
- dynblock,hcldec: Using dynblock in conjunction with hcldec can now decode blocks with unknown dynamic for_each arguments as entirely unknown values (#461)
- hclsyntax: Some syntax errors during parsing of the inside of
${
...}
template interpolation sequences will now produce an extra hint message about the need to escape as$${
when trying to include interpolation syntax for other languages like shell scripting, AWS IAM policies, etc. (#462)
v2.9.1
v2.8.2
v2.8.1
v2.8.0
Enhancements
- hclsyntax: Expression grouping parentheses will now be reflected by an explicit node in the AST, whereas before they were only considered during parsing. (#426)
Bugs Fixed
- hclwrite: The parser will now correctly include the
(
and)
tokens when an expression is surrounded by parentheses. Previously it would incorrectly recognize those tokens as being extraneous tokens outside of the expression. (#426) - hclwrite: The formatter will now remove (rather than insert) spaces between the
!
(unary boolean "not") operator and its subsequent operand. (#403) - hclsyntax: Unmark conditional values in expressions before checking their truthfulness (#427)
v2.7.2
Bugs Fixed
- gohcl: Fix panic when decoding into type containing value slices. (#335)
- hclsyntax: The unusual expression
null[*]
was previously always returning an unknown value, even though the rules for[*]
normally call for it to return an empty tuple when applied to a null. As well as being a surprising result, it was particularly problematic because it violated the rule that a calling application may assume that an expression result will always be known unless the application itself introduces unknown values via the evaluation context.null[*]
will now produce an empty tuple. (#416) - hclsyntax: Fix panic when traversing a list, tuple, or map with cty "marks" (#424)
v2.7.1
v2.7.0
Enhancements
- json: There is a new function
ParseWithStartPos
, which allows overriding the starting position for parsing in case the given JSON bytes are a fragment of a larger document, such as might happen when decoding withencoding/json
into ajson.RawMessage
. (#389) - json: There is a new function
ParseExpression
, which allows parsing a JSON string directly in expression mode, whereas previously it was only possible to parse a JSON string in body mode. (#381) - hclwrite:
Block
type now supportsSetType
andSetLabels
, allowing surgical changes to the type and labels of an existing block without having to reconstruct the entire block. (#340)