Use fully-qualified import paths in go_package options.#219
Merged
bergsieker merged 1 commit intobazelbuild:mainfrom Apr 13, 2022
Merged
Use fully-qualified import paths in go_package options.#219bergsieker merged 1 commit intobazelbuild:mainfrom
go_package options.#219bergsieker merged 1 commit intobazelbuild:mainfrom
Conversation
The Protobuf documentation for [`go_package`][1] requires that it contain a fully-qualified import path, with an optional package name override. As of [CL 301953][2] (released in [protobuf-go v1.26][3]), this requirement is being enforced by the `protoc-gen-go` plugin. I set the `go_package` options such that there is no change to generated code compared to the previous version. This required overriding the package names for the `remoteasset`, `remoteexecution`, and `remotelogstream` packages, since those have import paths ending in `/v1` or `/v2`. Fixes bazelbuild#181 [1]: https://developers.google.com/protocol-buffers/docs/reference/go-generated#package [2]: https://go-review.googlesource.com/c/protobuf/+/301953/ [3]: https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.26.0
EdSchouten
approved these changes
Apr 13, 2022
bergsieker
approved these changes
Apr 13, 2022
moroten
added a commit
to moroten/remote-apis
that referenced
this pull request
May 10, 2022
This commit updates .pb.go using hooks/pre-commit as it was forgotten in the following commits: 2af1c43 Use fully-qualified import paths in `go_package` options. (bazelbuild#219) 5971c1e Add a note about ordering of Tree protos (bazelbuild#223)
Merged
moroten
added a commit
to moroten/remote-apis
that referenced
this pull request
May 10, 2022
This commit updates .pb.go using hooks/pre-commit as it was forgotten in the following commits: 2af1c43 Use fully-qualified import paths in `go_package` options. (bazelbuild#219) 5971c1e Add a note about ordering of Tree protos (bazelbuild#223)
bergsieker
pushed a commit
that referenced
this pull request
May 10, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Protobuf documentation for
go_packagerequires that itcontain a fully-qualified import path, with an optional package
name override.
As of CL 301953 (released in protobuf-go v1.26), this
requirement is being enforced by the
protoc-gen-goplugin.I set the
go_packageoptions such that there is no change togenerated code compared to the previous version. This required
overriding the package names for the
remoteasset,remoteexecution,and
remotelogstreampackages, since those have import paths endingin
/v1or/v2.Fixes #181