luau/Require/Runtime
Alex Orlenko 42281aa8de
(regression) Fix lua_requireinternal to use variable number of stack args (#1804)
Since 0.672 the `lua_proxyrequire` function is broken and attempt to use
it fails with the error message `module must return a single value`.

This function takes two stack arguments (`lua_require` takes one), but
`lua_requireinternal` expects only one extra argument and pushes another
one (`cacheKey`).
As a result, the continuation function `lua_requirecont` (that has
hardcoded number of stack args = 2) thinks that module returned more
than one result and throw an exception.

The fix instead of hardcoding number of arguments in the continuation
function, pass this number in a first stack argument.
This will allow both `lua_require` and `lua_proxyrequire` work at the
same time.
2025-05-05 12:48:28 -07:00
..
include/Luau Sync to upstream/release/672 (#1800) 2025-05-02 14:00:23 -07:00
src (regression) Fix lua_requireinternal to use variable number of stack args (#1804) 2025-05-05 12:48:28 -07:00