pipeline: analysis: ignore CUE errors

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-10-20 14:37:31 -07:00
parent d01940b9a1
commit e37f8c5e53
2 changed files with 4 additions and 3 deletions

View File

@@ -121,7 +121,9 @@ func ops(code *compiler.Value) ([]*compiler.Value, error) {
func Analyze(fn func(*compiler.Value) error, code *compiler.Value) error {
ops, err := ops(code)
if err != nil {
return err
// Ignore CUE errors when analyzing. This might be because the value is
// not concrete since static analysis runs before pipelines are executed.
return nil
}
for _, op := range ops {
if err := analyzeOp(fn, op); err != nil {