`go get` error when using Go Modules
Closed this issue · 4 comments
markvincentcaro commented
When running go get
with Go Modules enabled, 4 errors are reported.
NOTE: E:\GoCodes
is just my GOPATH.
E:\GoCodes\pkg\mod\github.com\hhkbp2\go-logging@v0.2.5\gen-go\logging\thriftloggingservice.go:77:20: not enough arguments in call to oprot.Flush
have ()
want (context.Context)
E:\GoCodes\pkg\mod\github.com\hhkbp2\go-logging@v0.2.5\gen-go\logging\thriftloggingservice.go:101:31: cannot use &thriftLoggingServiceProcessorReport literal (type *thriftLoggingServiceProcessorReport) as type thrift.TProcessorFunction in assignment:
*thriftLoggingServiceProcessorReport does not implement thrift.TProcessorFunction (wrong type for Process method)
have Process(int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
want Process(context.Context, int32, thrift.TProtocol, thrift.TProtocol) (bool, thrift.TException)
E:\GoCodes\pkg\mod\github.com\hhkbp2\go-logging@v0.2.5\gen-go\logging\thriftloggingservice.go:111:27: not enough arguments in call to processor.Process
have (int32, thrift.TProtocol, thrift.TProtocol)
want (context.Context, int32, thrift.TProtocol, thrift.TProtocol)
E:\GoCodes\pkg\mod\github.com\hhkbp2\go-logging@v0.2.5\gen-go\logging\thriftloggingservice.go:119:13: not enough arguments in call to oprot.Flush
have ()
want (context.Context)
markvincentcaro commented
Upon further inspection, it seems to be an incompatibility with git.apache.org/thrift.git@v0.12.0.
Might need to go back to using non-Modules for now...
hhkbp2 commented
Please notice
- The 0.2.5 version is quite old. The thrift handler was moved to the branch
thrift-hanlder
already but no new release was made. You should check out the latest master branch. - Go Modules is not supported yet. I will take a look into adding support for it later.
markvincentcaro commented
Hi, @hhkbp2
Yeah, I guess it's much too early to start using Go Modules for now.
I think I'll wait a few more years until it becomes the norm.
Many thanks for replying!
hhkbp2 commented
I added the mod files to support go module. You could check out the latest master code and use go module commands. Thanks.