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. |
||
---|---|---|
.. | ||
artifacts | ||
config | ||
deploy | ||
deployer | ||
env | ||
internal | ||
libraries | ||
metadata | ||
permissions | ||
phases | ||
python | ||
run | ||
schema | ||
scripts | ||
tests | ||
bundle.go | ||
bundle_read_only.go | ||
bundle_test.go | ||
context.go | ||
context_test.go | ||
deferred.go | ||
deferred_test.go | ||
log_string.go | ||
mutator.go | ||
mutator_read_only.go | ||
mutator_test.go | ||
parallel.go | ||
parallel_test.go | ||
root.go | ||
root_test.go | ||
seq.go | ||
seq_test.go |