protoc-gen-lua
protoc-gen-lua copied to clipboard
Failed to parse message in lua when proto file imports another proto file
Failed to parse message in lua, when the message contains embedded field which is defined in another proto file.
the error message and stack:
[LUA-print] LUA ERROR: [string "pb/containers.lua"]:27: attempt to index field '_message_descriptor' (a nil value)
[LUA-print] stack traceback: [string ".\script/main.lua"]:53: in function <[string ".\script/main.lua"]:50> [string "pb/containers.lua"]:27: in function 'add' [string "pb/decoder.lua"]:249: in function 'field_decoder' [string "pb/protobuf.lua"]:684: in function '_InternalParse' [string "pb/decoder.lua"]:271: in function 'field_decoder' [string "pb/protobuf.lua"]:684: in function '_internal_parse' [string "pb/protobuf.lua"]:693: in function 'merge_from_string' [string "pb/protobuf.lua"]:702: in function 'ParseFromString'
Is it a bug? or I missed something when compiling proto files? Any suggestion or solution will be appreciated.
This project does have some bugs,most in encrypting messages in lua.You may post your proto file here,or we can help you to figure it out
did this bug is fixed?
I got this error message either...
[error] 16634#0: *331110815 lua entry thread aborted: runtime error: lua/protobuf/containers.lua:27: attempt to index field '_message_descriptor' (a nil value) stack traceback: coroutine 0: lua/protobuf/containers.lua: in function 'add' lua/protobuf/decoder.lua:249: in function 'field_decoder' lua/protobuf/protobuf.lua:684: in function '_internal_parse' lua/protobuf/protobuf.lua:693: in function 'merge_from_string' lua/protobuf/protobuf.lua:702: in function 'ParseFromString'
@a652 I recommend you use starwing/lua-protobuf instead.