You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The presence of a slash implies there's an import path.
An import path may not actually have a slash in it. For example if you define a vanity import such as "go.mycompany.com" and then define your protobuf file at the root of the module as such:
Twirp will end up generating the following Go package declaration:
package go_mycompany_com_mycompany
...
This is clearly incorrect. Twirp should instead see if there's a semi-colon in the go_package option and then return the left hand side as the import path and the right hand side as the package name.
The text was updated successfully, but these errors were encountered:
Hi @marwan-at-work, thanks for bringing this to our attention. Our team was unaware of this expected behavior, and are having trouble finding documentation of it. By any chance, could you point us to any further details/docs?
@amcohen-twitch if try to generate Go code with --go_out=. with the latest protoc-gen-go (v2) and notice the warning it will spit out:
2020/11/22 16:42:07 WARNING: Missing 'go_package' option in "dbregistry.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
Perhaps the comment in this line of code describes the issue best:
twirp/protoc-gen-twirp/go_naming.go
Line 34 in ead44db
An import path may not actually have a slash in it. For example if you define a vanity import such as "go.mycompany.com" and then define your protobuf file at the root of the module as such:
Twirp will end up generating the following Go package declaration:
This is clearly incorrect. Twirp should instead see if there's a semi-colon in the go_package option and then return the left hand side as the import path and the right hand side as the package name.
The text was updated successfully, but these errors were encountered: