Closed alonbg closed 1 year ago
I have made a new commit for better unknown handling in proton.Lua
, please try it out to see whether it solve your issue.
@starwing Issue is indeed resolved
workaround I used still works btw (since Parser
is the metatable
fallback, I presume ) and this is fine by me :)
the following test failes:
pb predefined types: 33
......E.............
Failed tests:
-------------
1) test_extend
./protoc.lua:337: attempt to call local 'import_fallback' (a boolean value)
stack traceback:
./protoc.lua:511: in function 'top_parser'
./protoc.lua:836: in function 'f'
./protoc.lua:1152: in function 'do_compile'
./protoc.lua:1157: in function 'compile'
./protoc.lua:1169: in function 'load'
test.lua:199: in function 'test_extend'
Ran 20 tests in 0.012 seconds, 19 successes, 1 error
replacing protoc.lua:337:
if import_fallback then
info = import_fallback(self, name)
end
with
if import_fallback then
info = import_fallback == true or import_fallback(self, name)
end
solves the issue. seems right ?
okay, thanks for the catch! Now the tests are passed.
Problem: loading this envoy proto
With the following environment & prerequisites: LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/ lua-protobuf - latest commit as of this writing
fails on
I realized that this is solved by prefixing these types with
.envoy.
Thus I created this hookHowever, it still errored. It workes only when hook is attached to the module itself (i.e.
protoc
)Any ideas ?