rules_go
rules_go copied to clipboard
Automatically run `bazel mod tidy` in `@rules_go//go`
What type of PR is this?
Feature
What does this PR do? Why is it needed?
bazel mod tidy
is run if supported and if relevant files change due to the command.
Which issues(s) does this PR fix?
Fixes #3900 Fixes https://github.com/bazelbuild/bazel-gazelle/issues/1749
Other notes for review
Just checking, will this also work for users of go.work workspaces?
Just checking, will this also work for users of go.work workspaces?
This requires adding the relevant files to https://github.com/bazelbuild/bazel-gazelle/blob/7c84c339075a992ea1a6f720899d91c0e047efe2/internal/bzlmod/go_deps.bzl#L657. Maybe that already happens with the fake go.mod
files we create for a workspace?