Support herb as a backend for taze.
PiperOrigin-RevId: 235958571
diff --git a/ts_auto_deps/analyze/loader.go b/ts_auto_deps/analyze/loader.go
index f70dbcb..ca5f73f 100644
--- a/ts_auto_deps/analyze/loader.go
+++ b/ts_auto_deps/analyze/loader.go
@@ -349,7 +349,10 @@
// queries not returning a result while running with the '--keep_going'
// flag. Since one query failing to return a result does not hinder the
// other queries from returning a result, ignore these errors.
- if err.Error() != "exit status 3" {
+ //
+ // Herb prints "printing partial results" to indicate the same as bazel's
+ // exit status 3
+ if err.Error() != "exit status 3" && !strings.Contains(stderr.String(), "printing partial results") {
// The error provided as a result is less useful than the contents of
// stderr for debugging.
return nil, fmt.Errorf(stderr.String())
diff --git a/ts_auto_deps/updater/updater.go b/ts_auto_deps/updater/updater.go
index 44e6492..8c156ed 100644
--- a/ts_auto_deps/updater/updater.go
+++ b/ts_auto_deps/updater/updater.go
@@ -77,7 +77,7 @@
// Matches the warning TypeScriptRuleChecker prints for unused ts_declarations.
// TODO(martinprobst): in the long term, this should become the default and TypeScriptRuleChecker should no longer special case ts_declaration.
var unusedDeclarationRE = regexp.MustCompile(
- `WARNING: [^:]+:\d+:\d+: keeping possibly used ts_declaration '([^']+)'`)
+ `WARNING: [^:]+:\d+:(?:\d+:)? keeping possibly used ts_declaration '([^']+)'`)
// GarbledBazelResponseError signals to callers that the proto returned by bazel
// analyze was garbled, and couldn't be unmarshalled.