client/rpc_client.go:145:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
vmee opened this issue · 1 comments
During make build, it reporting "client/rpc_client.go:145:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle"
➜ serf git:(master) ✗ make
awk: can't open file cmd/serf/version.go
source line number 1
Using sudo to setup lo0 interface aliases for testing.
Password:
--> Running go vet
# github.com/hashicorp/serf/client
client/rpc_client.go:145:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
client/rpc_client.go:147:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
# github.com/hashicorp/serf/cmd/serf/command/agent
cmd/serf/command/agent/ipc.go:390:25: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
cmd/serf/command/agent/ipc.go:392:25: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
go test ./...
# github.com/hashicorp/serf/client
client/rpc_client.go:145:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
client/rpc_client.go:147:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
# github.com/hashicorp/serf/cmd/serf/command/agent
cmd/serf/command/agent/ipc.go:390:25: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
cmd/serf/command/agent/ipc.go:392:25: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle
FAIL github.com/hashicorp/serf/cmd/serf/command [build failed]
FAIL github.com/hashicorp/serf/cmd/serf/command/agent [build failed]
ok github.com/hashicorp/serf/coordinate 3.445s
2020/12/21 16:00:18 [WARN] serf: truncated key list response, showing first 18 of 50 keys
--- FAIL: TestSnapshotter_forceCompact (0.40s)
snapshot_test.go:220: bad clock 466
2020/12/21 16:00:50 [INFO] serf: Ignoring previous leave in snapshot
FAIL
FAIL github.com/hashicorp/serf/serf 36.300s
ok github.com/hashicorp/serf/testutil (cached) [no tests to run]
ok github.com/hashicorp/serf/testutil/retry (cached)
make: *** [test] Error 2
I hit the same problem and I am very confused as DecodeOptions doesn't have RawToString while MsgpackHandle has it...
https://github.com/hashicorp/go-msgpack/blob/master/codec/decode.go#L50
https://github.com/hashicorp/go-msgpack/blob/master/codec/msgpack.go#L676
Searching more I found that it got moved in ugorji/go in ugorji/go@a70535d but I don't see anything using ugorji...
After more digging, what happened is that go-msgpack released a v1.1.5 version which is ugorji/go... https://github.com/hashicorp/go-msgpack/releases/tag/v1.1.5 so now everything using hashicorp/go-msgpack needs to be updated for that upstream change.