-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect handling of import_path when it is a path #77
Comments
johanbrandhorst
added a commit
to johanbrandhorst/protoc-gen-star
that referenced
this issue
Jun 8, 2020
This change makes protoc-gen-star conform to the behaviour of protoc-gen-go in the presence of an import_path parameter that contains slashes. 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. Fixes lyft#77
johanbrandhorst
added a commit
to johanbrandhorst/protoc-gen-star
that referenced
this issue
Jun 8, 2020
This change makes protoc-gen-star conform to the behaviour of protoc-gen-go in the presence of an import_path parameter that contains slashes. 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. Fixes lyft#77
johanbrandhorst
added a commit
to johanbrandhorst/protoc-gen-star
that referenced
this issue
Aug 6, 2020
This change makes protoc-gen-star conform to the behaviour of protoc-gen-go in the presence of an import_path parameter that contains slashes. 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. Fixes lyft#77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 thePackageName()
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.
The text was updated successfully, but these errors were encountered: