mirror of https://github.com/databricks/cli.git
f54e790a3b
## Changes References to keys that themselves are also variable references were shortcircuited in the previous approach. This meant that certain fields were resolved even if the lookup function would have instructed to skip resolution. To fix this we separate the memoization of resolved variable references from the memoization of lookups. Now, every variable reference is passed through the lookup function. ## Tests Before this change, the new test failed with: ``` === RUN TestResolveWithSkipEverything [...]/libs/dyn/dynvar/resolve_test.go:208: Error Trace: [...]/libs/dyn/dynvar/resolve_test.go:208 Error: Not equal: expected: "${d} ${c} ${c} ${d}" actual : "${b} ${a} ${a} ${b}" Diff: --- Expected +++ Actual @@ -1 +1 @@ -${d} ${c} ${c} ${d} +${b} ${a} ${a} ${b} Test: TestResolveWithSkipEverything ``` |
||
---|---|---|
.. | ||
lookup.go | ||
lookup_test.go | ||
ref.go | ||
ref_test.go | ||
resolve.go | ||
resolve_test.go |