openacid / slim

Surprisingly space efficient trie in Golang(11 bits/key; 100 ns/get).

Home Page:https://openacid.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XXX_sizecache undefined

lwhile opened this issue · comments

commented

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

  1. go get github.com/openacid/slim
  2. make gen
  3. mak test
  4. 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. 😆

commented

Thanks for your reply.