Skip to content

Commit

Permalink
chore: expose the lang package by copying the files. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki authored Aug 30, 2024
2 parents b33a95f + 9333ebb commit 3629055
Show file tree
Hide file tree
Showing 148 changed files with 106 additions and 115 deletions.
2 changes: 1 addition & 1 deletion internal/command/format/diagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/zclconf/go-cty/cty/function"

viewsjson "github.com/terramate-io/opentofulib/internal/command/views/json"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"

"github.com/terramate-io/opentofulib/internal/tfdiags"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/command/format/object_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package format

import (
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/format/object_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"testing"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/command/jsonconfig/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/internal/lang/blocktoattr"
"github.com/terramate-io/opentofulib/lang"
"github.com/terramate-io/opentofulib/lang/blocktoattr"
)

// expression represents any unparsed expression
Expand Down
2 changes: 1 addition & 1 deletion internal/command/jsonformat/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"github.com/terramate-io/opentofulib/internal/command/jsonplan"
"github.com/terramate-io/opentofulib/internal/command/jsonprovider"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/providers"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/terminal"
"github.com/terramate-io/opentofulib/internal/tofu"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestRenderHuman_EmptyPlan(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/command/jsonfunction/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"encoding/json"
"fmt"

"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/command/jsonstate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/command/jsonchecks"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/states/statefile"
"github.com/terramate-io/opentofulib/internal/tofu"
"github.com/terramate-io/opentofulib/lang/marks"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/command/jsonstate/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/providers"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/tofu"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestMarshalOutputs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/command/metadata_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/zclconf/go-cty/cty/function"

"github.com/terramate-io/opentofulib/internal/command/jsonfunction"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/lang"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"testing"

"github.com/terramate-io/opentofulib/internal/command/arguments"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/terminal"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/json/diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/terramate-io/hcl/v2/hcled"
"github.com/terramate-io/hcl/v2/hclparse"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/json/diagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcltest"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/json/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/command/arguments"
"github.com/terramate-io/opentofulib/internal/encryption"
"github.com/terramate-io/opentofulib/internal/lang/globalref"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/states/statefile"
"github.com/terramate-io/opentofulib/internal/terminal"
"github.com/terramate-io/opentofulib/internal/tofu"
"github.com/terramate-io/opentofulib/lang/globalref"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/views/refresh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"testing"

"github.com/terramate-io/opentofulib/internal/command/arguments"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/terminal"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/configs/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/lang"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/configs/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/terramate-io/hcl/v2/hclsyntax"

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/lang"
)

// CheckRule represents a configuration-defined validation rule, precondition,
Expand Down
2 changes: 1 addition & 1 deletion internal/configs/configschema/marks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package configschema
import (
"fmt"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/configs/configschema/marks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package configschema
import (
"testing"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/configs/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs/hcl2shim"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang"
)

// Resource represents a "resource" or "data" block in a module or file.
Expand Down
2 changes: 1 addition & 1 deletion internal/configs/static_evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/terramate-io/hcl/v2/gohcl"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/lang"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/configs/static_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/didyoumean"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang"
)

// newStaticScope creates a lang.Scope that's backed by the static view of the module represented by the StaticEvaluator
Expand Down
2 changes: 1 addition & 1 deletion internal/encryption/keyprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/encryption/config"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/lang"

"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/gohcl"
Expand Down
2 changes: 1 addition & 1 deletion internal/plans/changes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/plans/objchange/compatible.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/zclconf/go-cty/cty/convert"

"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
)

// AssertObjectCompatible checks whether the given "actual" value is a valid
Expand Down
2 changes: 1 addition & 1 deletion internal/plans/objchange/compatible_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestAssertObjectCompatible(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/plans/objchange/lcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"testing"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/plans/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/globalref"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/lang/globalref"
)

// Plan is the top-level type representing a planned set of changes.
Expand Down
4 changes: 2 additions & 2 deletions internal/plans/planfile/tfplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/checks"
"github.com/terramate-io/opentofulib/internal/lang/globalref"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/plans/internal/planproto"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/lang/globalref"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/terramate-io/opentofulib/version"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/plans/planfile/tfplan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/checks"
"github.com/terramate-io/opentofulib/internal/lang/globalref"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/lang/globalref"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestTFPlanRoundTrip(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/repl/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"strings"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/repl/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"testing"

"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/repl/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/lang"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/lang/types"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang"
"github.com/terramate-io/opentofulib/lang/marks"
"github.com/terramate-io/opentofulib/lang/types"
)

// Session represents the state for a single REPL session.
Expand Down
2 changes: 1 addition & 1 deletion internal/states/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestState(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/states/statefile/version4.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/checks"
"github.com/terramate-io/opentofulib/internal/encryption"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
)

func readStateV4(src []byte) (*File, tfdiags.Diagnostics) {
Expand Down
2 changes: 1 addition & 1 deletion internal/tfdiags/rpc_friendly.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ func (d rpcFriendlyDiag) ExtraInfo() interface{} {
}

func init() {
gob.RegisterName("tfdiags.rpcFriendlyDiag", (*rpcFriendlyDiag)(nil))
gob.Register((*rpcFriendlyDiag)(nil))
}
2 changes: 1 addition & 1 deletion internal/tofu/context_apply2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/checks"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/providers"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
)

// Test that the PreApply hook is called with the correct deposed key
Expand Down
2 changes: 1 addition & 1 deletion internal/tofu/context_apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/configs/configschema"
"github.com/terramate-io/opentofulib/internal/configs/hcl2shim"
"github.com/terramate-io/opentofulib/internal/lang/marks"
"github.com/terramate-io/opentofulib/internal/plans"
"github.com/terramate-io/opentofulib/internal/providers"
"github.com/terramate-io/opentofulib/internal/provisioners"
"github.com/terramate-io/opentofulib/internal/states"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/lang/marks"
)

func TestContext2Apply_basic(t *testing.T) {
Expand Down
Loading

0 comments on commit 3629055

Please sign in to comment.