Skip to content

Commit 23cf6b6

Browse files
authored
fix(update_deleted_packages.sh): wheels example should not be included in .bazelrc (#1207)
This correctly handles the integration tests and examples that are a part of the `rules_python` workspace and should not be included in the deleted packages list. This brings the changes made to the `.bazelrc` very close to what is in `main`, but I would like to update this later once #1155 and #1205 are merged. Fixes #919.
1 parent 0912bba commit 23cf6b6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tools/bazel_integration_test/update_deleted_packages.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515

1616
# For integration tests, we want to be able to glob() up the sources inside a nested package
1717
# See explanation in .bazelrc
18+
#
19+
# This script ensures that we only delete subtrees that have something a file
20+
# signifying a new bazel workspace, whether it be bzlmod or classic. Generic
21+
# algorithm:
22+
# 1. Get all directories where a WORKSPACE or MODULE.bazel exists.
23+
# 2. For each of the directories, get all directories that contains a BUILD.bazel file.
24+
# 3. Sort and remove duplicates.
1825

1926
set -euxo pipefail
2027

@@ -23,5 +30,10 @@ cd $DIR
2330

2431
# The sed -i.bak pattern is compatible between macos and linux
2532
sed -i.bak "/^[^#].*--deleted_packages/s#=.*#=$(\
26-
find examples/*/* tests/*/* \( -name BUILD -or -name BUILD.bazel \) | xargs -n 1 dirname | paste -sd, -\
33+
find examples/*/* tests/*/* \( -name WORKSPACE -or -name MODULE.bazel \) |
34+
xargs -n 1 dirname |
35+
xargs -n 1 -I{} find {} \( -name BUILD -or -name BUILD.bazel \) |
36+
xargs -n 1 dirname |
37+
sort -u |
38+
paste -sd, -\
2739
)#" $DIR/.bazelrc && rm .bazelrc.bak

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy