Skip to content

Commit

Permalink
Merge branch 'main' of github.com:terramate-io/hcl into opentofu
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki committed Aug 29, 2024
2 parents 8048794 + b0ec608 commit 53dc3ba
Show file tree
Hide file tree
Showing 142 changed files with 319 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
- dependencies
- automated
reviewers:
- hashicorp/terraform-core
- terramate-io/cli-tooling
# only update HashiCorp actions, external actions managed by TSCCR
allow:
- dependency-name: hashicorp/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
go-version-file: go.mod
- name: Go test
run: |
go test ./... -race
go test -race ./...
copyright:
name: "copyright headers"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# HCL Changelog

## v2.22.0 (August 26, 2024)

### Enhancements

* feat: return an ExprSyntaxError for invalid references that end in a dot ([#692](https://github.com/hashicorp/hcl/pull/692))

## v2.21.0 (June 19, 2024)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/diags_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"encoding/json"
"io"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

type jsonDiagWriter struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hcldec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"os"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/hashicorp/hcl/v2/hclparse"
flag "github.com/spf13/pflag"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2/hclparse"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
ctyjson "github.com/zclconf/go-cty/cty/json"
Expand Down
8 changes: 4 additions & 4 deletions cmd/hcldec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package main
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/ext/userfunc"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/ext/userfunc"
"github.com/terramate-io/hcl/v2/gohcl"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/type_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"reflect"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/hclfmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"os"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclparse"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclparse"
"github.com/terramate-io/hcl/v2/hclwrite"
"golang.org/x/crypto/ssh/terminal"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"encoding/json"
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

func decodeJSONDiagnostics(src []byte) hcl.Diagnostics {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package main

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

type LogBeginCallback func(testName string, testFile *TestFile)
Expand Down
4 changes: 2 additions & 2 deletions cmd/hclspecsuite/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"golang.org/x/crypto/ssh/terminal"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclparse"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclparse"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hclspecsuite/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"github.com/zclconf/go-cty/cty/convert"
ctyjson "github.com/zclconf/go-cty/cty/json"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/ext/typeexpr"
"github.com/hashicorp/hcl/v2/hclparse"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/ext/typeexpr"
"github.com/terramate-io/hcl/v2/hclparse"
)

type Runner struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hclspecsuite/test_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/ext/typeexpr"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/ext/typeexpr"
"github.com/terramate-io/hcl/v2/gohcl"
)

type TestFile struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/traversals.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"reflect"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

func findTraversalSpec(got hcl.Traversal, candidates []*TestFileExpectTraversal) *TestFileExpectTraversal {
Expand Down
2 changes: 1 addition & 1 deletion ext/customdecode/customdecode.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package customdecode

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/customdecode/expression_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"reflect"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expand_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package dynblock
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions ext/dynblock/expand_body_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/davecgh/go-spew/spew"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/hashicorp/hcl/v2/hcltest"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2/hcltest"
"github.com/zclconf/go-cty-debug/ctydebug"
"github.com/zclconf/go-cty/cty"
)
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expand_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package dynblock
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"
)
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expr_wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/iteration.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

// Expand "dynamic" blocks in the given body, returning a new body that
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package dynblock

import "github.com/hashicorp/hcl/v2"
import "github.com/terramate-io/hcl/v2"

var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{
Type: "dynamic",
Expand Down
4 changes: 2 additions & 2 deletions ext/dynblock/unknown_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
4 changes: 2 additions & 2 deletions ext/dynblock/variables_hcldec.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package dynblock

import (
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcldec"
)

// VariablesHCLDec is a wrapper around WalkVariables that uses the given hcldec
Expand Down
6 changes: 3 additions & 3 deletions ext/dynblock/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"reflect"
"testing"

"github.com/hashicorp/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"

"github.com/davecgh/go-spew/spew"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestVariables(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion ext/transform/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package transform

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

// NewErrorBody returns a hcl.Body that returns the given diagnostics whenever
Expand Down
2 changes: 1 addition & 1 deletion ext/transform/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package transform

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

// Shallow is equivalent to calling transformer.TransformBody(body), and
Expand Down
4 changes: 2 additions & 2 deletions ext/transform/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"reflect"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcltest"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcltest"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/transform/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package transform

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

// A Transformer takes a given body, applies some (possibly no-op)
Expand Down
4 changes: 2 additions & 2 deletions ext/tryfunc/tryfunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/ext/customdecode"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/ext/customdecode"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
4 changes: 2 additions & 2 deletions ext/tryfunc/tryfunc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package tryfunc
import (
"testing"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion ext/typeexpr/get_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
)

const invalidTypeSummary = "Invalid type specification"
Expand Down
8 changes: 4 additions & 4 deletions ext/typeexpr/get_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"fmt"
"testing"

"github.com/hashicorp/hcl/v2/gohcl"
"github.com/terramate-io/hcl/v2/gohcl"

"github.com/google/go-cmp/cmp"
"github.com/zclconf/go-cty/cty"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/hcl/v2/json"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2/json"
)

var (
Expand Down
Loading

0 comments on commit 53dc3ba

Please sign in to comment.