Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add bzlmod use_repo of org_golang_x_sys #896

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

plobsing
Copy link
Contributor

@plobsing plobsing commented Aug 9, 2024

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.


Changes are visible to end-users: no

Test plan

Have confirmed that e2e/copy_to_directory and e2e/external_copy_to_directory
were broken before this change and fixed after.

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.
@jbedard jbedard merged commit 2b69a7a into bazel-contrib:main Aug 9, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants