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

client/rpc_client.go:145:24: cannot use promoted field BasicHandle.DecodeOptions.RawToString in struct literal of type codec.MsgpackHandle #620

Open
vmee opened this issue Dec 21, 2020 · 1 comment

Comments

@vmee
Copy link

vmee commented Dec 21, 2020

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
@pterjan
Copy link

pterjan commented Dec 29, 2020

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.

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

2 participants