XXX_sizecache undefined
lwhile opened this issue · comments
Describe the bug
running make test
outputted errors below
# github.com/openacid/slim/array_test [github.com/openacid/slim/array.test]
array/int_test.go:196:4: a.XXX_sizecache undefined (type *array.U16 has no field or method XXX_sizecache)
array/int_test.go:235:3: a.XXX_sizecache undefined (type *array.U16 has no field or method XXX_sizecache)
array/int_test.go:428:4: a.XXX_sizecache undefined (type *array.U32 has no field or method XXX_sizecache)
array/int_test.go:467:3: a.XXX_sizecache undefined (type *array.U32 has no field or method XXX_sizecache)
array/int_test.go:660:4: a.XXX_sizecache undefined (type *array.U64 has no field or method XXX_sizecache)
array/int_test.go:699:3: a.XXX_sizecache undefined (type *array.U64 has no field or method XXX_sizecache)
array/marshal_test.go:73:4: a.XXX_sizecache undefined (type *array.U16 has no field or method XXX_sizecache)
array/marshal_test.go:112:3: a.XXX_sizecache undefined (type *array.U16 has no field or method XXX_sizecache)
To Reproduce
go get github.com/openacid/slim
make gen
mak test
- See error
Environment (please complete the following information):
- OS: mac
- Version 10.14
Language (please complete the following information):
- Language: Go
- Version: 1.12
Thanks for letting me know such an issue. But it should not be a problem you need to face to:
First, you do not need to generate any codes in order to use slim
or to run the tests.
Everything is ready in its git repo. 😆
Second, your protobuf is a little bit old. I tried several version and find out that only proto v1.0.0
has this issue. Upgrading to at least v1.1.0
should fix this issue(We have been using v1.2.0
). To upgrade:
cd $GOPATH/github.com/golang/protobuf
git checkout v1.2.0
go install ./proto ./protoc-gen-go/
Then make gen && make test
should pass.
I am gonna add some comments to elaborate on what env/lib slim
relies on ASAP. 😆
Thanks for your reply.