treewide: add aliases for third_party dependencies
With bzlmod it is currently not possible to access other third_party libraries. By adding an alias inside the root module we can work around this with a fairly moderate hack. We do have a folder and BUILD file for every dependency anyway, so this isn't that bad.
Change-Id: I472194f590fd4c4aa8ba304af70dd8b92ecc5c1e
Reviewed-on: https://review.monogon.dev/c/monogon/+/3231
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/third_party/libpg_query/BUILD.bazel b/third_party/libpg_query/BUILD.bazel
index e69de29..4e4c14e 100644
--- a/third_party/libpg_query/BUILD.bazel
+++ b/third_party/libpg_query/BUILD.bazel
@@ -0,0 +1,6 @@
+# TODO: Workaround for https://github.com/bazelbuild/bazel/issues/19301
+alias(
+ name = "libpg_query",
+ actual = "@libpg_query//:libpg_query",
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/libpg_query/external/BUILD.repo b/third_party/libpg_query/external/BUILD.repo
index ad732b4..b362e34 100644
--- a/third_party/libpg_query/external/BUILD.repo
+++ b/third_party/libpg_query/external/BUILD.repo
@@ -58,6 +58,6 @@
"-Iexternal/libpg_query/vendor/xxhash",
],
visibility = [
- "@com_github_pganalyze_pg_query_go_v4//:__subpackages__",
+ "@//third_party/libpg_query:__pkg__",
],
)