Don't treat aliases with non-string "actual" attributes as errors.
The "actual" value could be a select statement, in which case just ignore it, it's probably an alias for a rule in a different language, where blaze invocation flags are a thing.
PiperOrigin-RevId: 240406142
diff --git a/ts_auto_deps/analyze/loader.go b/ts_auto_deps/analyze/loader.go
index a7be545..c42ddb8 100644
--- a/ts_auto_deps/analyze/loader.go
+++ b/ts_auto_deps/analyze/loader.go
@@ -550,7 +550,10 @@
// of aliases)
actual := stringAttribute(rule, "actual")
if actual == "" {
- return nil, nil, fmt.Errorf(`alias %q missing "actual" attribute`, rule.GetName())
+ // probably an alias with a select statement as the value for
+ // 'actual' - just ignore
+ platform.Infof(`alias %q has non-string "actual" attribute`, rule.GetName())
+ continue
}
actualToAlias[actual] = rule
pkgToActuals[pkg] = append(pkgToActuals[pkg], actual)