Fix use of //go
with Bzlmod by removing dependency on @org_golang_x_sys
#3509
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
Running
bazel run //go
(orbazel run @rules_go//go
from another module) fails when using Bzlmod because the@org_golang_x_sys
repository is not visible. Without Bzlmod, the repository is loaded through a WORKSPACE dependency and the error does not happen.Related to these recent changes:
go
binary available as a target #3429//go
usable in scripts run withbazel run
#3474Two-step minimal reproduction from root of this repo:
touch WORKSPACE.bzlmod
bazel run --enable_bzlmod //go
Here's the error that produces:
Here's the point in the BUILD file where this repository is being referenced:
rules_go/go/tools/go_bin_runner/BUILD.bazel
Line 25 in e558f56
Which issues(s) does this PR fix?
None
Other notes for review