You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Done — the undefined-function error now includes the name/value being called (lib/lua.ex:807,848: undefined function '#{inspect(func)}'). The old bare {:undefined_function, nil} is gone.
Fixed in #383. Lua.call_function/3 was inspecting the resolved value (nil) instead of the name you looked up. It now routes through the same TypeError the VM raises for an in-Lua call, so it names the callee:
Call
Before
After
call_function(lua, [:bar], [])
{:error, "undefined function 'nil'", …}
{:error, "attempt to call a nil value (global 'bar')", …}
call_function(lua, [:x], []) (x=5)
{:error, "undefined function '5'", …}
{:error, "attempt to call a number value (global 'x')", …}
call_function!(lua, [:bar], [])
Lua runtime error: undefined function 'nil'
Full render: message + Suggestion: block
nested [:t, :missing]
undefined function 'nil'
attempt to call a nil value (field 'missing')
The terse call_function/3 reason stays a one-line pcall-parity string; call_function!/3 gets the rich render with a Suggestion: block, matching what you already see for an undefined call made from inside Lua.
Activity
davydog187 commentedon Oct 8, 2025
Thanks for reporting @kevinschweikert
I very much agree this error message sucks. We need to make some changes upstream to Luerl in order to fix this
davydog187 commentedon Jun 15, 2026
Done — the undefined-function error now includes the name/value being called (
lib/lua.ex:807,848:undefined function '#{inspect(func)}'). The old bare{:undefined_function, nil}is gone.kevinschweikert commentedon Jun 15, 2026
@davydog187 i still get
nilSection
davydog187 commentedon Jul 8, 2026
Fixed in #383.
Lua.call_function/3was inspecting the resolved value (nil) instead of the name you looked up. It now routes through the sameTypeErrorthe VM raises for an in-Lua call, so it names the callee:call_function(lua, [:bar], []){:error, "undefined function 'nil'", …}{:error, "attempt to call a nil value (global 'bar')", …}call_function(lua, [:x], [])(x=5){:error, "undefined function '5'", …}{:error, "attempt to call a number value (global 'x')", …}call_function!(lua, [:bar], [])Lua runtime error: undefined function 'nil'Suggestion:block[:t, :missing]undefined function 'nil'attempt to call a nil value (field 'missing')The terse
call_function/3reason stays a one-linepcall-parity string;call_function!/3gets the rich render with aSuggestion:block, matching what you already see for an undefined call made from inside Lua.