-
Notifications
You must be signed in to change notification settings - Fork 46
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 Go modules: fix protobuf imports #568
Comments
With |
Na, does not work with the imports to other weave components... 😭 |
husio
added a commit
that referenced
this issue
May 23, 2019
We no longer use `GOPATH` and `dep` for dependency management. Using Go modules requires changes to how protobuf files are declared and included. - `protofmt` command no longer works as it does not accept `-I` flag - `protodoc` is disabled for now as it requires a single protobuf. This is waiting for #659 - some packages cannot be compiled unless weave top level `codec.proto` is included. Compiler is printing a warning that this file is not used, but it does not compile without it. Weird. fix #568
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
With the recent introduction of Go modules the project must not live within the Gopath anymore.
https://blog.golang.org/using-go-modules
While the Go code in the project works outside the GOPATH now the protobuf generation does not as files are depending on parent path structures.
Describe the solution you'd like
Make it fully work outside GOPATH as intended by the modules designers
Describe alternatives you've considered
Additional context
go list -f '{{ .Dir }}' -m github.com/golang/protobuf
may become helpful to set a proper imports in the makefile. See https://www.reddit.com/r/golang/comments/9blgn0/using_go_modules_with_vendorprovided_protobuf/The text was updated successfully, but these errors were encountered: