2 ms·
I tried Moonscript (another lang that compiles to Lua). Unlike JS, it didn't seem like the Lua VM supported source-mapping, so if there was a runtime error in m
by garbanz0 5y ago
I tried Moonscript (another lang that compiles to Lua). Unlike JS, it didn't seem like the Lua VM supported source-mapping, so if there was a runtime error in my code, it appeared as a gibberish Lua error and not a MoonScript error. Is the same true for Fennel?
- Tcepsa 5y agoNot sure exactly what you're looking for but it at least seems to do a good job of telling me the line in my .fnl file that has the error (though it also says "in function ?" despite being in a named function). Also, that's running through the Fennel interpreter rather than transpiling to Lua and then running it with Lua.
- nerdponx 5y agoFortunately the generated Lua code is pretty readable. I can't speak for a large project, but I'm usually able to find bugs by inspecting the generated Lua code, and I'm usually able to find and fix them in the Fennel source without difficulty.