Remove the (unused) flag to control whether taze registers tests with all_tests libraries.
PiperOrigin-RevId: 231864435
diff --git a/ts_auto_deps/main.go b/ts_auto_deps/main.go
index 2d1da26..81542dc 100644
--- a/ts_auto_deps/main.go
+++ b/ts_auto_deps/main.go
@@ -12,9 +12,8 @@
var (
isRoot = flag.Bool("root", false, "the given path is the root of a TypeScript project "+
"(generates ts_config and ts_development_sources targets).")
- recursive = flag.Bool("recursive", false, "recursively update all packages under the given root.")
- files = flag.Bool("files", false, "treats arguments as file names. Filters .ts files, then runs on their dirnames.")
- allowAllTestLibraries = flag.Bool("allow_all_test_libraries", false, "treats testonly ts_libraries named 'all_tests' as an alternative to ts_config/ts_dev_srcs for registering tests")
+ recursive = flag.Bool("recursive", false, "recursively update all packages under the given root.")
+ files = flag.Bool("files", false, "treats arguments as file names. Filters .ts files, then runs on their dirnames.")
)
func usage() {
@@ -59,7 +58,7 @@
}
host := updater.New(false, false, updater.QueryBasedBazelAnalyze, updater.LocalUpdateFile)
- if err := updater.Execute(host, paths, *isRoot, *recursive, *allowAllTestLibraries); err != nil {
+ if err := updater.Execute(host, paths, *isRoot, *recursive); err != nil {
platform.Error(err)
}
}
diff --git a/ts_auto_deps/updater/test_register.go b/ts_auto_deps/updater/test_register.go
index 794dcec..b5f9e67 100644
--- a/ts_auto_deps/updater/test_register.go
+++ b/ts_auto_deps/updater/test_register.go
@@ -40,7 +40,7 @@
// with a testonly ts_library named "all_tests", which allows users to set up
// their own BUILD layout. It's separated from UpdateBUILD since it's non-local,
// multiple packages may all need to make writes to the same ts_config.
-func (upd *Updater) RegisterTestRules(ctx context.Context, allowAllTestLibrary bool, paths ...string) (bool, error) {
+func (upd *Updater) RegisterTestRules(ctx context.Context, paths ...string) (bool, error) {
reg := &buildRegistry{make(map[string]*build.File), make(map[*build.File]bool)}
var g3root string
for _, path := range paths {
diff --git a/ts_auto_deps/updater/updater.go b/ts_auto_deps/updater/updater.go
index a45d04c..f4f9a5e 100644
--- a/ts_auto_deps/updater/updater.go
+++ b/ts_auto_deps/updater/updater.go
@@ -1221,7 +1221,7 @@
}
// Execute runs ts_auto_deps on paths using host.
-func Execute(host *Updater, paths []string, isRoot, recursive, allowAllTestLibraries bool) error {
+func Execute(host *Updater, paths []string, isRoot, recursive bool) error {
ctx := context.Background()
for i, p := range paths {
isLastAndRoot := isRoot && i == len(paths)-1
@@ -1240,7 +1240,7 @@
}
}
}
- host.RegisterTestRules(ctx, allowAllTestLibraries, paths...)
+ host.RegisterTestRules(ctx, paths...)
return nil
}