Skip to content

Commit

Permalink
fix: add bzlmod use_repo of org_golang_x_sys (#896)
Browse files Browse the repository at this point in the history
Commit 3c121a9 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.
  • Loading branch information
plobsing authored Aug 9, 2024
1 parent 3c121a9 commit 2b69a7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2b69a7a

Please sign in to comment.