-
Notifications
You must be signed in to change notification settings - Fork 23
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
Please review my optimizations and code generation fixes #61
Conversation
library: - thrift's BYTE type is signed (so it is int8, not byte) - asynchronous protocol is removed as irrelevant in go code generation: - safer constants using typed vars - int64 consts over 2^32 dont blow up - negative byte consts - generated struct doesn't include type metainformation field to avoid metainfo creating for every instance - map, list, set initializers didn't work tests: - use generated Work and CalculateArgs
Wow, thanks Aleksey! I don't have time to look through this for the next couple of weeks and I definitely want to take a good look to understand all the changes. I'll try to find some time at the beginning of March. |
sure. I hope I will have my other planned things done by that time. (I started short summary here https://github.com/apesternikov/thrift4go/wiki/Roadmap) |
…out nonblocking socket
lists are native (TList -> []elemtype) maps are native (TMap -> map[keytype]valtype) native types including binary are supported as key type sets are native (TSet -> map[valtype]bool optimized struct's Read function library: removed types not present in thrift protocol spec removed Tlist, TSet, TMap, TCompare, all data coercing fun from ttype.go added TDebugProtocol
ReadFieldN -> readFieldN remove ReadFieldFIELDNAME WriteFieldN -> writeFieldN remove WriteFieldFIELDNAME
it's cool, I tried apesternikov/thrift4go, but i got error when generate code for Hbase thrift api, it stoped at code: |
bug of TlLIst, it break when i=0 if len(p.l) >= i { |
sdming, |
still can not compile Hbase thrift interface error happen at the logic to handle key of map you can download hbase thrift interface from http://wiki.apache.org/hadoop/Hbase/ThriftApi |
type Text []byte you make a map map[string]XXX but you set value with |
sorry, I forgot to commit my last changes. please test |
still many errors an example type TRegionInfo struct { func (p *TRegionInfo) readField5(iprot thrift.TProtocol) { ... |
sdming, please make sure that your library is up to date. please update it with ReadByte() returns int8: and this is one of the changes from the original library: |
it's strange, go get -u does not work, but git clone works fine |
library:
code generation:
tests: