protoc-gen-star
protoc-gen-star copied to clipboard
Incorrect handling of import_path when it is a path
In the rare case where import_path
is used to indicate the full import path of a package, protoc-gen-star
incorrectly uses the full path in the PackageName()
function, generating invalid code.
The correct behaviour is to remove anything before the last slash in the path, and use this as the package name. See https://github.com/golang/protobuf/blob/v1.4.2/protoc-gen-go/generator/generator.go#L637-L643 for evidence of this behaviour in protoc-gen-go
.
I intend to submit a fix for this.