Closed ghost closed 8 years ago
It seems that unlike Lua and LuaJIT Luvit does not prepend '@' to filenames when setting chunk name for a loaded file. Setting codefromstrings option to true in .luacov config should work. E.g.
return {
codefromstrings = true,
include = {"testthis$"}
}
Thanks! That works!
[I already described the issue in luvit/luvit#843 and am just copying the relevant part here.]
I am trying to make a coverage analysis of the tests of a module of mine written using Luvit using LuaCov. However, the coverage stats only include measures of
luvipath.lua
andluvibundle.lua
, but completely miss anything else.Example with
testthis.lua
:I compared this with plain LuaJIT:
At first I assumed that all of this is caused by LuaJIT, as described for LuaTrace:
However, even with the JIT enabled, plain LuaJIT still creates the desired output in my very simple test-case:
So it is unclear what happens, but somehow Luvit prevents LuaCov from being seeing the interpreter progress.
The same behaviour can be observed for LuaTrace.
So apparently they both use the same path, which is blocked by Luvit.
Could you please help me to figure out why LuaCov does not work in this case?