gocache
gocache copied to clipboard
Error while building go application, issue with github.com/XiaoMi/pegasus-go-client
Unable to build go application on go version 1.18.2 on MacOS and Ubuntu My guess is that problem is in this library: https://github.com/XiaoMi/pegasus-go-client which is used in github.com/eko/gocache/v3/store
Steps for Reproduction
- Use
store.WithExpiration(5*time.Minute)in code Error is there even if using any other time value
Expected behavior: App should build
Actual behavior: Error while building application
Error Log:
divkix@Divs: …/AlitaGoRobot [ Beta][+3595 -17369][📦🗑️×22📝×41🛤️ ×2][🐳 desktop-linux][🐹 v1.18.2][🐏 11GiB/16GiB]
❯ go build .
# github.com/XiaoMi/pegasus-go-client/idl/cmd
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:41:15: not enough arguments in call to iprot.ReadStructBegin
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:46:35: not enough arguments in call to iprot.ReadFieldBegin
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:60:26: not enough arguments in call to iprot.Skip
have (thrift.TType)
want (context.Context, thrift.TType)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:70:26: not enough arguments in call to iprot.Skip
have (thrift.TType)
want (context.Context, thrift.TType)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:75:25: not enough arguments in call to iprot.Skip
have (thrift.TType)
want (context.Context, thrift.TType)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:79:13: not enough arguments in call to iprot.ReadFieldEnd
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:83:12: not enough arguments in call to iprot.ReadStructEnd
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:90:15: not enough arguments in call to iprot.ReadString
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:99:18: not enough arguments in call to iprot.ReadListBegin
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:107:16: not enough arguments in call to iprot.ReadString
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/cmd/cmd.go:107:16: too many errors
# github.com/XiaoMi/pegasus-go-client/idl/base
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/blob.go:18:15: not enough arguments in call to iprot.ReadBinary
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/blob.go:27:27: not enough arguments in call to oprot.WriteBinary
have ([]byte)
want (context.Context, []byte)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/error_code.go:94:18: not enough arguments in call to iprot.ReadString
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/error_code.go:99:27: not enough arguments in call to oprot.WriteString
have (string)
want (context.Context, string)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/gpid.go:18:12: not enough arguments in call to iprot.ReadI64
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/gpid.go:30:24: not enough arguments in call to oprot.WriteI64
have (int64)
want (context.Context, int64)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/rpc_address.go:26:18: not enough arguments in call to iprot.ReadI64
have ()
want (context.Context)
vendor/github.com/XiaoMi/pegasus-go-client/idl/base/rpc_address.go:35:24: not enough arguments in call to oprot.WriteI64
have (int64)
want (context.Context, int64)
Platforms:
- MacOS Monterey Version 12.3.1 (21E258)
- Ubuntu 20.04 LTS
Include browser, operating system and respective versions
Versions:
- v3.0.0 (latest)
Which versions are you running? Go Version: v1.18.2 gocache version: v3.0.0 OS: MacOS 12.3.1 and Ubuntu 20.04 LTS
same issue looks like it moved https://github.com/apache/incubator-pegasus/tree/master/go-client
Can't seem to revert after running a go get -u with v2.3.1
same issue looks like it moved https://github.com/apache/incubator-pegasus/tree/master/go-client
Can't seem to revert after running a
go get -uwith v2.3.1
I'm still facing this issue even when using v2.3.0
Experiencing the same issue on v3.0.0 😢 Only using the go-cache store...
this is a work around:
add a replace into your go.mod
replace github.com/pegasus-kv/thrift v0.14.1 => github.com/pegasus-kv/thrift v0.13.0
this is a work around: add a replace into your
go.modreplace github.com/pegasus-kv/thrift v0.14.1 => github.com/pegasus-kv/thrift v0.13.0
This solves the build issue, thanks!
Hello, the pegasus store is now in a separated Go module so this should be fixed in case you only use the Gocache library (by importing github.com/eko/gocache/v4/lib).
I close this issue for now but feel free to reopen if you still have any issue with this new v4.0.0 release.