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. |
||
---|---|---|
.. | ||
auth | ||
cmdgroup | ||
cmdio | ||
databrickscfg | ||
diag | ||
dyn | ||
env | ||
errs | ||
exec | ||
filer | ||
fileset | ||
flags | ||
folders | ||
git | ||
jsonschema | ||
locker | ||
log | ||
notebook | ||
process | ||
python | ||
set | ||
sync | ||
tags | ||
template | ||
terraform | ||
testfile | ||
textutil | ||
vfs |