chore: upgrade protobuf to 0.3.2 (#4368)

Co-authored-by: leonnyu <leonnyu@tencent.com>
This commit is contained in:
yuhongyu879 2021-06-04 18:48:31 +08:00 committed by GitHub
parent e4f616be07
commit 10677e9067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,12 @@ local function create_proto_obj(proto_id)
end
local _p = protoc.new()
local res = _p:load(content)
-- the loaded proto won't appears in _p.loaded without a file name after lua-protobuf=0.3.2,
-- which means _p.loaded after _p:load(content) is always empty, so we can pass a fake file
-- name to keep the code below unchanged, or we can create our own load function with returning
-- the loaded DescriptorProto table additionally, see more details in
-- https://github.com/apache/apisix/pull/4368
local res = _p:load(content, "filename for loaded")
if not res or not _p.loaded then
return nil, "failed to load proto content"

View File

@ -45,7 +45,7 @@ dependencies = {
"lua-resty-session = 2.24",
"opentracing-openresty = 0.1",
"lua-resty-radixtree = 2.8.0",
"lua-protobuf = 0.3.1",
"lua-protobuf = 0.3.2",
"lua-resty-openidc = 1.7.2-1",
"luafilesystem = 1.7.0-2",
"lua-tinyyaml = 1.0",