mirror of https://github.com/databricks/cli.git
4d8eba04cd
## Changes This PR makes two changes: 1. In https://github.com/databricks/cli/pull/1510 we'll be adding multiple associated location metadata with a dyn.Value. The Go compiler does not allow comparing structs if they contain slice values (presumably due to multiple possible definitions for equality). In anticipation for adding a `[]dyn.Location` type field to `dyn.Value` this PR removes all direct comparisons of `dyn.Value` and instead relies on the kind. 2. Retain location metadata for values in convert.FromTyped. The change diff is exactly the same as https://github.com/databricks/cli/pull/1523. It's been combined with this PR because they both depend on each other to prevent test failures (forming a test failure deadlock). Go patch used: ``` @@ var x expression @@ -x == dyn.InvalidValue +x.Kind() == dyn.KindInvalid @@ var x expression @@ -x != dyn.InvalidValue +x.Kind() != dyn.KindInvalid @@ var x expression @@ -x == dyn.NilValue +x.Kind() == dyn.KindNil @@ var x expression @@ -x != dyn.NilValue +x.Kind() != dyn.KindNil ``` ## Tests Unit tests and integration tests pass. |
||
---|---|---|
.. | ||
generate | ||
loader | ||
mutator | ||
paths | ||
resources | ||
testdata | ||
validate | ||
variable | ||
artifact.go | ||
artifacts_test.go | ||
bundle.go | ||
deployment.go | ||
experimental.go | ||
filename.go | ||
filename_test.go | ||
git.go | ||
lock.go | ||
lock_test.go | ||
resources.go | ||
resources_test.go | ||
root.go | ||
root_test.go | ||
sync.go | ||
target.go | ||
workspace.go | ||
workspace_test.go |