opentofu/lang
Martin Atkins e2c64bc255 core: Annotate for_each errors with expression info
Our diagnostics model allows for optionally annotating an error or warning
with information about the expression and eval context it was generated
from, which the diagnostic renderer for the UI will then use to give the
user some additional hints about what values may have contributed to the
error.

We previously didn't have those annotations on the results of evaluating
for_each expressions though, because in that case we were using the helper
function to evaluate an expression in one shot and thus we didn't ever
have a reference to the EvalContext in order to include it in the
diagnostic values.

Now, at the expense of having to handle the evaluation at a slightly lower
level of abstraction, we'll annotate all of the for_each error messages
with source expression information. This is valuable because we see users
often confused as to how their complex for_each expressions ended up being
invalid, and hopefully giving some information about what the inputs were
will allow more users to self-solve.
2020-10-29 09:07:48 -07:00
..
blocktoattr add benchmark used for DecoderSpec 2020-10-14 09:19:26 -04:00
funcs lang/funcs: "anytrue" function 2020-10-23 13:52:48 -07:00
testdata/functions-test lang/funcs: Update fileset() function to include path as separate first argument, automatically trim the path argument from results, and ensure results are always canonical with forward slash path separators 2019-08-30 20:19:44 -04:00
data_test.go eval Data needs to operate on whole modules 2020-04-12 10:50:31 -04:00
data.go remove GetModuleInstanceOutput 2020-04-14 14:49:10 -04:00
doc.go lang: new package for the runtime parts of the config language 2018-10-16 18:44:26 -07:00
eval_test.go eval Data needs to operate on whole modules 2020-04-12 10:50:31 -04:00
eval.go core: Annotate for_each errors with expression info 2020-10-29 09:07:48 -07:00
functions_test.go lang/funcs: "anytrue" function 2020-10-23 13:52:48 -07:00
functions.go lang/funcs: "anytrue" function 2020-10-23 13:52:48 -07:00
references.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
scope.go terraform: ugly huge change to weave in new HCL2-oriented types 2018-10-16 18:46:46 -07:00