summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-21github: Pin action refs to latest trusted by TSCCR (#700)mainhashicorp-tsccr[bot]
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-10-08docs(ext/dynblock): recursive function call typo in detecting variables (#686)Calmon Ribeiro
2024-10-01Merge pull request #701 from hashicorp/d/fix-typoCraig Wright
docs: fix typo under "Dynamic Attributes Processing"
2024-10-01docs: use 'by' instead of 'prior to'Bruno Schaatsbergen
2024-10-01docs: fix typoBruno Schaatsbergen
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
2024-09-24Merge pull request #699 from hashicorp/jbardin/marked-traversalsJames Bardin
Preserve marks when traversing unknown values
2024-09-24Preserve marks when traversing unknown valuesJames Bardin
When traversing an unknown value or a DynamicVal, the marks from that initial value must be preserved for HCL Index and GetAttr operations. This mirrors the behavior of GetAttr and Index when used directly the underlying cty values.
2024-08-26Merge pull request #694 from hashicorp/prepare-release-2.22.0Ansgar Mertens
Prepare for v2.22.0 release
2024-08-26Prepare for v2.22.0 releaseAnsgar Mertens
2024-08-22Merge pull request #693 from hashicorp/update-changelog-692Ansgar Mertens
Update Changelog.md
2024-08-22Update Changelog.mdAnsgar Mertens
2024-08-22Merge pull request #692 from ↵Ansgar Mertens
hashicorp/support-incomplete-references-in-object-items feat: return an `ExprSyntaxError` for invalid references that end in a dot
2024-08-21feat: return an ExprSyntaxError for invalid references that end in a dot ↵Ansgar Mertens
(commonly occurs in editors for completions) Detect value expressions of the ExprSyntaxError type when parsing object constructor expressions and use them to add an item to the result even though we skip parsing the object due to recovery after the invalid expression. This allows the Terraform language server to support completions for object attributes after a dot was typed.
2024-06-19prepare for v2.21.0 releaseLiam Cervante
2024-06-14github: Pin action refs to latest trusted by TSCCR (#683)hashicorp-tsccr[bot]
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-05-09Update CHANGELOG.mdMartin Atkins
2024-05-09hcldec: Allow body-derived values to be markedMartin Atkins
Similar to the previously-added UnknownBody, the new optional interface MarkedBody allows hcl.Body implementations to suggest a set of marks that ought to be applied to any value that's generated to represent the content of that body. The dynblock extension then uses this to get hcldec to mark the whole object representing any block that was generated by a dynamic block whose for_each was marked, for a better representation of the fact that a block's existence was decided based on a marked value.
2024-05-09dynblock: Preserve marks from for_each expression into resultMartin Atkins
Previously if the for_each expression was marked then expansion would fail because marked expressions are never directly iterable. Now instead we'll allow marked for_each and preserve the marks into the values produced by the resulting block as much as we can. This runs into the classic problem that HCL blocks are not values themselves and so cannot carry marks directly, but we can at least make sure that the values of any leaf arguments end up marked.
2024-05-09hclsyntax: Don't panic if splat operand is unknown and markedMartin Atkins
We were calling .Range() on any unknown sourceVal, without first checking whether it was marked. That method panics if called on a marked value, so we need to strip that off first. While testing this I found some return paths that weren't properly transferring the source value's marks to the output, and so this also addresses those so that all return paths preserve whatever markings are present on the source value. In particular, if a non-list/set/tuple value gets "upgraded" into a tuple then we must transfer its marks onto the tuple, because the decision about constructing that value was based on characteristics of the source value.
2024-05-08github: Set up Dependabot to manage HashiCorp-owned Actions versioningNara Kasbergen Kwon
2024-05-08github: Pin action refs to latest trusted by TSCCR (#677)hashicorp-tsccr[bot]
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-04-22Update CHANGELOG.mdLiam Cervante
2024-04-22Add additional function for parsing traversals with [*] keys (#673)Liam Cervante
* Add additional function for parsing traversals with [*] keys * add more context around skipped test cases
2024-03-26Update CHANGELOG for 2.20.1Radek Simko
2024-03-14Standardize on only two value dumping/diffing librariesMartin Atkins
Due to the quite messy heritage of this codebase -- including a large part of it being just a fork of my earlier personal project ZCL -- there were many different conventions for how to pretty-print and diff values in the tests in different parts of the codebase. To reduce the dependency sprawl, this commit now standardizes on: - github.com/davecgh/go-spew for pretty-printing - github.com/google/go-cmp for diffing These two dependencies were already present anyway, are the most general out of all of the candidates, and are also already in use by at least some of HCL's most significant callers, such as HashiCorp Terraform. The version of go-cmp we were previously using seems to have a bug that causes the tests to crash when run under the Go race detector, so I've also upgraded that dependency to latest here to clear that bug.
2024-03-13Merge pull request #668 from hashicorp/add-expr-syntax-errorAnsgar Mertens
add `ExprSyntaxError`
2024-03-13fix test error message if wrong typeAnsgar Mertens
2024-03-13add SrcRange to ExprSyntaxErrorAnsgar Mertens
2024-03-12chore: add test from #665Ansgar Mertens
2024-03-12feat: return ExprSyntaxError instead of nil when expression parsing fails ↵Ansgar Mertens
for namespaced functions
2024-02-29update CHANGELOG.md for v2.20James Bardin
2024-02-29Merge pull request #663 from hashicorp/ci-workflow-updatesRadek Simko
Use new make targets in CI
2024-02-26Use make targets in CIRadek Simko
2024-02-26Merge pull request #661 from hashicorp/add-makefileRadek Simko
Add make targets for common checks + fixes
2024-02-26Merge pull request #659 from hashicorp/fix-license-headersRadek Simko
Fix license headers
2024-02-26Merge pull request #660 from hashicorp/ci-test-on-macosRadek Simko
Run unit tests on macOS
2024-02-16Add make targets for common checks + fixesRadek Simko
This is to make it easier for existing and new maintainers and contributors to run checks on the codebase.
2024-02-16Update CHANGELOG.mdRadek Simko
2024-02-16Update CHANGELOG.mdRadek Simko
2024-02-16Update changelogDaniel Schmidt
2024-02-16github: Read Go version from go.modRadek Simko
This reduces the number of places to update whenever we upgrade Go version.
2024-02-16github: Run unit tests on macos/amd64 as wellRadek Simko
2024-02-16github: Rename workflow to reflect realityRadek Simko
2024-02-16add missing copywrite headersRadek Simko
2024-02-16go generate ./...Radek Simko
2024-02-16hclsyntax: Add license headers to generated codeRadek Simko
2024-02-16deps: Track stringer@v0.6.0 as 'tools' dependencyRadek Simko
In theory we could use the latest (v0.18.0) version of the x/tools module but that would also bring upgrade of x/sys (transitive dependency of go-cty) from current v0.5.0 and full understanding of implications of that upgrade.
2024-02-16Merge pull request #658 from hashicorp/b-fix-func-fmtRadek Simko
hclwrite: Fix formatting of namespaced functions
2024-02-16correct comment formattingRadek Simko
2024-02-15hclwrite: add two more test casesRadek Simko