spacewander commented on a change in pull request #4368:
URL: https://github.com/apache/apisix/pull/4368#discussion_r644709102
##########
File path: apisix/plugins/grpc-transcode/proto.lua
##########
@@ -43,7 +43,7 @@ local function create_proto_obj(proto_id)
end
local _p = protoc.new()
- local res = _p:load(content)
+ local res = _p:load(content, "filename for loaded") --
https://github.com/starwing/lua-protobuf/commit/89faac205585360d800472c62752d5b532d7ce9e
Review comment:
We need to explain it clearly in the comment instead of just a commit
link.
##########
File path: apisix/plugins/grpc-transcode/proto.lua
##########
@@ -43,7 +43,11 @@ 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 default to
keep the codes below unchanged, or we can create
Review comment:
```suggestion
-- 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
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]