-
The imports of .proto-definitions which are not in the same directory as the current .proto-file are not supported in the current version.
For example, .proto-imports like import 'myproject/foo/bar/baz.proto'; translate into local myproject/foo/bar/baz_pb = ....
Also, message and enum types from imported .proto-definitions were not properly referenced in the module which does the import. For example, if xyz.proto has import 'myproject/foo/bar/baz.proto'; and myproject/foo/bar/baz.proto declares package baz.types; and if some message from xyz.proto has a reference to, say, message MyMsg from myproject/foo/bar/baz.proto (as baz.types.MyMsg) then the descriptor of MyMsg in xyz.proto is referenced as module.MYPROJECT/FOO/BAR/BAZ_PB_MYMSG which is not valid Lua code.
-
Also, there's a typo in the protoc-gen-lua Python script which prevents the use of imports altogether:
for i in includes:
lua('local %s_pb = require \'%s_pb\')\n' % (i, i))
which gives invalid Lua code like local myProto_pb = require 'myProto_pb')
The imports of .proto-definitions which are not in the same directory as the current .proto-file are not supported in the current version.
For example, .proto-imports like
import 'myproject/foo/bar/baz.proto';translate intolocal myproject/foo/bar/baz_pb = ....Also, message and enum types from imported .proto-definitions were not properly referenced in the module which does the import. For example, if
xyz.protohasimport 'myproject/foo/bar/baz.proto';andmyproject/foo/bar/baz.protodeclarespackage baz.types;and if some message fromxyz.protohas a reference to, say, messageMyMsgfrommyproject/foo/bar/baz.proto(asbaz.types.MyMsg) then the descriptor ofMyMsginxyz.protois referenced asmodule.MYPROJECT/FOO/BAR/BAZ_PB_MYMSGwhich is not valid Lua code.Also, there's a typo in the
protoc-gen-luaPython script which prevents the use of imports altogether:which gives invalid Lua code like
local myProto_pb = require 'myProto_pb')