e2c64bc255
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. |
||
---|---|---|
.. | ||
blocktoattr | ||
funcs | ||
testdata/functions-test | ||
data.go | ||
data_test.go | ||
doc.go | ||
eval.go | ||
eval_test.go | ||
functions.go | ||
functions_test.go | ||
references.go | ||
scope.go |