HaxeFoundation / HaxeFoundation/haxe

Implement language-independent source maps

Open
#6,591 4 comments 1 reaction 1 assignee Claimed by @jdonaldson View on GitHub
enhancement platform-lua
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

It would help a lot to have source maps that are language-independent in a Haxe-specific file format.

My context is:
I'm compiling Haxe to Lua code, but unfortunately, unlike Javascript, Lua doesn't have an official source map format (Lua's approach is to embed all required debug information into the bytecode output). But since Haxe compiles to Lua code rather than Lua bytecode, there's currently no way of getting a connection between Haxe and Lua.

Therefore, my suggestion is to generate a universal source map that I can use as a developer to handle error messages myself. In case of Lua, I can for example use Lua's debug library in conjunction with `pcall` to catch errors and the source map to map the line numbers correctly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.