truss
truss copied to clipboard
Update Dependencies for Go 1.18
When using Go 1.18, building the binary with make resulted in this failure:
go generate github.com/metaverse/truss/gengokit/template
go install -ldflags '-X "main.version=fcd9ff140d" -X "main.date=2021-07-14T06:36:40Z"' github.com/metaverse/truss/cmd/truss
# golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go:121:3: too many errors
make: *** [truss] Error 2
I've done a few things in this PR:
- update the reference to golang.org/x/sys with
go get -u golang.org/x/sys - update the go.mod file to reference go 1.18
- run
go mod vendorwith all the new dependency versions
Couple comments at a glance. The vendored gogo dependency seems to have regressed. I see several areas where ProtoVersion2 is used instead of 3 and that constant has been removed entirely. That doesn't quite seem right.
Other than that, if we're going to bring these changes in we should also update the CI to run on go 1.17.x and 1.18.x (historically we've supported the 2 most recent versions)
Appreciate the effort you're putting into updating this stuff! Curious to hear how you're using truss.