~bigbes/tarantool

tarantool-protobuf

ref: b624a6bf75cfdf7ff59c14073e6b1ecc21f9f143 tarantool-protobuf/test/codegen_lua_package_test.lua -rw-r--r-- 4.0 KiB
06b2978a — Eugene Blikh 3 months ago
codegen: resolve (tarantool.lua_package) via global type registry

The custom file option was being dropped silently: protoc encoded it
correctly into the FileDescriptorProto, but protobuf-go parked the
unknown extension in the message's unknown-fields tail because
E_LuaPackage was never registered with protoregistry.GlobalTypes. As a
result proto.GetExtension returned "" and every override the README
documented was a no-op — every caller fell through to the default
"<pkg>.<file>_pb" path resolution.

Register E_LuaPackage in init() and add a luatest regression that
asserts both the output path and the cross-file require strings honor
the option, parameterized over both codegen modes.