Using require in a coroutine on a remote asset uploaded with MainModule can hide the callstack for where the require was called.
This seems to happen with functions that are implemented on the C-side of Luau (for example, functions that return “[C]
” when using debug.info(func, 's')
)
For example, if I upload a ModuleScript named ‘MainModule’ with the following source–
print('Hello World!')
return 0
–and I require the asset id using a coroutine in a server script–
local thread = coroutine.create(require)
coroutine.resume(thread, 107462162251037)
–then the require callstack seems to vanish.
The module has distribution enabled if you would like to use mine instead of uploading your own module to test it.
System Info (If needed):
CPU: AMD Ryzen 7 7800X3D 8-Core Processor
RAM: 64 GB
GPU: NVIDIA GeForce RTX 4070