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

Unable to install and use truss #337

Open
brentgriffin opened this issue Sep 5, 2021 · 4 comments
Open

Unable to install and use truss #337

brentgriffin opened this issue Sep 5, 2021 · 4 comments

Comments

@brentgriffin
Copy link

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.

@zaquestion
Copy link
Member

Thats certainly a strange and concerning error

@zaquestion
Copy link
Member

cc @lelandbatey @adamryman

vpiyush pushed a commit to vpiyush/truss that referenced this issue Sep 10, 2021
@vpiyush
Copy link

vpiyush commented Sep 10, 2021

@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:

  1. brew uninstall metaverse/tap/truss
  2. Set the GOPATH
  3. Cloned the repo in $GOPATH/src/github.com/metaverse'
  4. make dependencies && make

@zaquestion
Copy link
Member

@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

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

3 participants