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.
GoogleAPIs has been notiriously difficult to upgrade.
The reason being rules_go manage it's own version of GoogleAPIs package and Gazelle is
configured to map all GoogleAPI compilation to the version pinned under rules_go.
This means that unless rules_go were to upgrade their GoogleAPIs version, everybody else
is stuck at the same version as theirs.
We resolve this by doing a couple things:
Override rules_go's
go_googleapis
archive with our own version. Generating froma relatively new commit.
Upgrade our go.mod and go.sum to latest commit by using
go get -u <pkg_name>@main
where
main
is the default branch of the package's repository.Override Gazelle resolve directives to use the go_repository version during compilation where possible.
Switch dependencies to //proto to consistently link all of our Go binary using the right version.
At the end, we manage to build our repository using a newer, self-managed version of go_googleapis.
To demonstrate, remove the restriction from building
tools/edit_instance_template
that was put there earlier due to difficulties in upgrading
go_googleapis
.I expect this to help unblocking us from using latest dependencies and features in the go ecosystem.
Version bump: TODO