metaverse / truss

Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
Other
736 stars 144 forks source link

error when using go module #291

Open Septemberd opened 4 years ago

Septemberd commented 4 years ago

Hi there. Here's the issues, My go version is 1.13.3, and GO111MODULE=on. My project is not placed under the gopath. When i generating code with truss, it always recognizes my path like this "../../../ ../my-real-pro-path/src/real-package-name". It seems that after using the go module, truss can't correctly identify the package or path of the project? Is my setting wrong?

zaquestion commented 4 years ago

@Septemberd thanks for reaching out, I've seen this issue manifest a few different ways. To start make sure you are on the absolute latest version of truss. About a month ago I brought in some changes that also fixed some issues with go 1.13. There was also a change brought in around the same time to address new weirdness with go_package and that MR contains some discussion on go 1.13 issues as well. https://github.com/metaverse/truss/pull/288

If updating to the latest version of truss doesn't help, I'd encourage you to try posting a sample filestructure and protos to reproduce and we can take a closer look. As it stands I can confirm that using truss with a project outside the gopath should be working, All of my truss projects are setup this way. Happy to help debug, let me know :D