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. |
||
---|---|---|
.. | ||
convert | ||
dynassert | ||
dynvar | ||
merge | ||
yamlloader | ||
yamlsaver | ||
kind.go | ||
kind_test.go | ||
location.go | ||
location_test.go | ||
mapping.go | ||
mapping_test.go | ||
path.go | ||
path_string.go | ||
path_string_test.go | ||
path_test.go | ||
pattern.go | ||
pattern_test.go | ||
value.go | ||
value_test.go | ||
value_underlying.go | ||
value_underlying_test.go | ||
visit.go | ||
visit_get.go | ||
visit_get_test.go | ||
visit_map.go | ||
visit_map_test.go | ||
visit_set.go | ||
visit_set_test.go | ||
walk.go | ||
walk_test.go |