From 76b67833cb22c8ddbf7de94c177668fc8e1f2dd5 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Mon, 6 Mar 2023 00:43:23 -0800 Subject: [PATCH] build: don't bust Bazel analysis cache when switching between build & test (#48694) `test` inherits from `build` in bazelrc so it is sufficient to specify `build` to get the flag set for both `bazel build` and `bazel test` --- .bazelrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index bd370750c4c..57b4d8f9866 100644 --- a/.bazelrc +++ b/.bazelrc @@ -15,5 +15,5 @@ import %workspace%/.aspect/bazelrc/performance.bazelrc # this file. See https://bazel.build/configure/best-practices#bazelrc-file. try-import %workspace%/.aspect/bazelrc/user.bazelrc -# Enable bazel hack for autogold -test --test_env=ENABLE_BAZEL_PACKAGES_LOAD_HACK=true +# Enable bazel hack for autogold; apply to both build & test to avoid busting analysis cache +build --test_env=ENABLE_BAZEL_PACKAGES_LOAD_HACK=true