From 7937dd14c3c632ffcfaea9073d5dec6dcac93845 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 8 Mar 2022 08:55:02 -0600 Subject: [PATCH] [5.1] Adding Starlark dependencies to the package //external (#14991) * Adding Starlark dependencies to the package //external This is an alternative approach to fix #14280. It adds transitive closure of Starlark dependencies to `//external` package when loading `WORKSPACE` file, so it can be processed in the same way as `BUILD` files during query execution. Comparing to the approach taken in #14497, this approach is less intrusive, but not able to distinguish the extension files needed by `//external:foo` and `//external:bar`, meaning `buildfiles(//external:foo)` returns the same result as `buildfiles(//external:*)`. However, this behavior is consistent with other packages. For example, `buildfiles(//foo:bar)` has the same result as `buildfiles(//foo:*)`. Closes #14630. PiperOrigin-RevId: 424092916 (cherry picked from commit a6c3f2327df424e56674a6bd758566d2757afdc7) * Avoid bazel_module_test timeout on macos https://buildkite.com/bazel/bazel-bazel/builds/17785#9a1fb564-c6f9-4e69-ac8f-87c422a002b0 By setting the test size to "large". RELNOTES:None PiperOrigin-RevId: 409114345 (cherry picked from commit 1d9939178643e3c9f63d58d2b3f3619d5fce16aa) Co-authored-by: Zhongpeng Lin Co-authored-by: pcloudy --- .../devtools/build/lib/packages/Package.java | 2 +- .../build/lib/packages/PackageFactory.java | 2 +- .../lib/skyframe/WorkspaceFileFunction.java | 9 ++ src/test/py/bazel/BUILD | 1 + src/test/py/bazel/query_test.py | 89 +++++++++++++++++++ 5 files changed, 101 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java index 25c5112544455d..f6d8ea24b611a2 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Package.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java @@ -1358,7 +1358,7 @@ FailureDetail getFailureDetail() { return null; } - Builder setStarlarkFileDependencies(ImmutableList