Skip to content
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

Support dependencies with package names that include ";" #25

Closed
li-peng-dd opened this issue Sep 5, 2019 · 2 comments
Closed

Support dependencies with package names that include ";" #25

li-peng-dd opened this issue Sep 5, 2019 · 2 comments

Comments

@li-peng-dd
Copy link

li-peng-dd commented Sep 5, 2019

I noticed that if you try to start a service with a proto file that includes a dependency on something with package like go_package=github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor, it fails with:

2019/09/05 03:16:17 Failed to generate server formatting 20:19: invalid import path: "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor" (and 1 more errors)

This is because server.tmpl just naively uses the package declaration as the import statement, which results in invalid like above. It can be fixed by truncating the package declaration at the semicolon.

@li-peng-dd
Copy link
Author

@jekiapp I propose #26 as fix for this.

@jekiapp
Copy link
Contributor

jekiapp commented Sep 23, 2019

solved in #27 with example. api.proto has declaration of go_package with ;

@jekiapp jekiapp closed this as completed Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants