You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buildx/bake
Justin Chadwell cc87bd104e
bake: avoid early-exit for resolution failures
With changes made to allow lazy evaluation, we were early exiting if an
undefined name was detected, either for a variable or a function.

This had two key implications:

1. The error messages changed, and became significantly less
   informative.

   For example, we went from:

   > Unknown variable; There is no variable named "FO". Did you mean "FOO"?, and 1 other diagnostic(s)

   To

   > Invalid expression; undefined variable "FO"

2. Any issues in our function detection from funcCalls which cause JSON
   functions to be erroneously detected cause invalid functions to be
   resolved, which causes new name resolution errors.

To avoid the above problems, we can defer the error from an undefined
name until HCL evaluation - which produces the more informative errors,
and does not suffer from incorrectly detecting JSON functions.

Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit dc8a2b0398)
2 years ago
..
hclparser bake: avoid early-exit for resolution failures 2 years ago
bake.go bake: SOURCE_DATE_EPOCH: fix `panic: assignment to entry in nil map` 2 years ago
bake_test.go bake: support null label value 2 years ago
compose.go bake: fix loop references 2 years ago
compose_test.go bake: support null arg value 2 years ago
hcl.go bake: restrict target name 3 years ago
hcl_test.go bake: avoid early-exit for resolution failures 2 years ago
remote.go bake: fix loop references 2 years ago