From 2b69a7a1f695098eb7d305008348227f68b97c71 Mon Sep 17 00:00:00 2001 From: Peter Lobsinger Date: Thu, 8 Aug 2024 17:57:03 -0700 Subject: [PATCH] fix: add bzlmod use_repo of org_golang_x_sys (#896) Commit 3c121a9cd9c665f3aca903c473ec91dc8af68721 broke E2E tests with the following error: ``` (23:31:56) ERROR: no such package '@@[unknown repo 'org_golang_x_sys' requested from @@aspect_bazel_lib~]//unix': The repository '@@[unknown repo 'org_golang_x_sys' requested from @@aspect_bazel_lib~]' could not be resolved: No repository visible as '@org_golang_x_sys' from repository '@@aspect_bazel_lib~' ``` The build worked when operating within the `aspect_bazel_lib` repo itself, but not when importing it with Bzlmod. This is because the `org_golang_x_sys` repo is imported indirectly by `rules_go`'s `go_rules_dependencies` macro in the `WORKSPACE` file, which is still active under bzlmod because there is no `WORKSPACE.bzlmod` file to suppress it. --- MODULE.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/MODULE.bazel b/MODULE.bazel index efc31d1..bef9552 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -66,6 +66,7 @@ use_repo( go_deps, "com_github_bmatcuk_doublestar_v4", "org_golang_x_exp", + "org_golang_x_sys", ) host = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "host", dev_dependency = True)