Skip to content

Unable to install and use truss #337

@brentgriffin

Description

@brentgriffin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions