The problem is caused by circular module imports. Example (the modules are in separate files):
module A
using B
export f1, f2
function f1(x)
return x + A.g1(x)
end
function f2(x)
return x^2
end
end # module A
module B
using A
export g1, g2
function g1(x)
return 5 * x
end
function g2(x)
return A.f2(x) - x^3
end
end # module B
if a script uses both modules, its precompilation can never succeed.
using A
using B
print(A.f1(3) + B.g2(5), “\n”)
I suppose it is a bug that the precompiler doesn’t complain in understandable language about such situations where it isn’t smart enough to work.