Unable to install and use truss
brentgriffin opened this issue · 4 comments
Attempted to install truss and use it to generate code for the provided echo.proto example file.
Tried to follow install instructions here https://github.com/metaverse/truss#install but did not work. Perhaps because of my version of go. It loaded into the ~/go/mod directory and I could not get the make to work from there. So, I installed via homebrew - e.g. brew install metaverse/tap/truss
I tried multiple things including pulling the code from git into the expected ~/go/src location. Most recently ran truss from this location: ~/go/src/github.com/metaverse/truss/_example
Now getting error when I try to generate code for example file:
truss -v echo.proto
DEBU[0000] GOPATH="[/Users/brent/go]"
DEBU[0000] rawDefPath=echo.proto
DEBU[0000] DefPaths="[/Users/brent/go/src/github.com/metaverse/truss/_example/echo.proto]"
DEBU[0000] PB Package=github.com/metaverse/truss/_example
DEBU[0000] PB Path=/Users/brent/go/src/github.com/metaverse/truss/_example
DEBU[0000] svcDirName=echo-service
DEBU[0000] svcPath=/Users/brent/go/src/github.com/metaverse/truss/_example/echo-service
DEBU[0000] Service Packages="[github.com/metaverse/truss/_example/echo-service]"
DEBU[0000] Service Package=github.com/metaverse/truss/_example/echo-service
DEBU[0000] package name=
DEBU[0000] Service Path=/Users/brent/go/src/github.com/metaverse/truss/_example/echo-service
DEBU[0000] Handler being created Service Methods=3
DEBU[0000] Rendering handler for the first time
FATA[0000] cannot generate service: cannot generate gokit service: cannot render template: cannot render template: svc/transport_http.gotemplate: template error: template: svc/transport_http.gotemplate:2:2: executing "svc/transport_http.gotemplate" at <call .HTTPHelper.ServerTemplate .>: error calling call: ERROR: go parser couldn't parse file '/home/runner/work/truss/truss/gengokit/httptransport/embeddable_funcs.go'
Version of go:
➜ go version
go version go1.16.6 darwin/amd64
Version of protoc:
➜ protoc --version
libprotoc 3.17.3
Version of truss:
➜ truss -v
truss: missing .proto file(s)
truss (version: 0.3.1 version date: 2021-07-14T06:36:40Z)
Running on OSX 10.15.6
Any help here would be greatly appreciated.
Thats certainly a strange and concerning error
@zaquestion Now I think the merge request is not valid. I thought the hardcoded GOPATH was an issue in go.yml. But It doesn't seem like that. This merge request can be ignored
For me what fixed the issue was:
- brew uninstall metaverse/tap/truss
- Set the GOPATH
- Cloned the repo in $GOPATH/src/github.com/metaverse'
- make dependencies && make
@vpiyush Thanks for looking into this! Perhaps theres some issue with the brew route now, it worked when i first set it up, but weve had a couple releases since then, something may have changed somewhere