databricks-cli/libs/dyn
Pieter Noordhuis a95b1c7dcf
Retain location information of variable reference (#1333)
## Changes

Variable substitution works as if the variable reference is literally
replaced with its contents.

The following fields should be interpreted in the same way regardless of
where the variable is defined:
```yaml
foo: ${var.some_path}
bar: "./${var.some_path}"
```

Before this change, `foo` would inherit the location information of the
variable definition. After this change, it uses the location information
of the variable reference, making the behavior for `foo` and `bar`
identical.

Fixes #1330.

## Tests

The new test passes only with the fix.
2024-04-03 10:40:29 +00:00
..
convert Include `dyn.Path` in normalization warnings and errors (#1332) 2024-04-03 08:56:46 +00:00
dynassert Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
dynvar Retain location information of variable reference (#1333) 2024-04-03 10:40:29 +00:00
merge Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
yamlloader Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
yamlsaver Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
kind.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
kind_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
location.go Retain location annotation when expanding globs for pipeline libraries (#1274) 2024-03-11 21:59:36 +00:00
location_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
mapping.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
mapping_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
path.go Make `Append` function to `dyn.Path` return independent slice (#1295) 2024-03-19 09:49:26 +00:00
path_string.go Rename libs/config -> libs/dyn (#1086) 2023-12-22 13:20:45 +00:00
path_string_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
path_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
pattern.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
pattern_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
value.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
value_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
value_underlying.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
value_underlying_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit_get.go Add `dyn.MapByPattern` to map a function to values with matching paths (#1266) 2024-03-08 14:33:01 +00:00
visit_get_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit_map.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit_map_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit_set.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
visit_set_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
walk.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
walk_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00