Skip to content

Add source maps and traceback recovery for Lua transformations - #257

Merged
levno-710 merged 6 commits into
masterfrom
feature/source-maps
Nov 3, 2026
Merged

levno-710 merged 6 commits into
masterfrom
feature/source-maps

Conversation

@levno-710

Copy link
Copy Markdown
Member

Prometheus can now produce Source Map v3 files that recover approximate original error locations from transformed Lua output. This supports debugging minified code and other non-obfuscation workflows.

  • Attach source spans to parsed AST nodes and preserve provenance through transformations.
  • Generate line-based maps for compact and pretty-printed output.
  • Add --source-map, --source-map-no-sources, and a trace command that translates tracebacks and displays original code excerpts.
  • Embed source text by default and assign unique IDs to internal snippets.
  • Support Lua newline conventions and truncated Lua 5.1 filenames.

VM-generated code maps to internal sources. AntiTamper is skipped with a warning when mapping is enabled.

@levno-710
levno-710 merged commit b3d3db2 into master Nov 3, 2026
1 check passed
@levno-710 levno-710 mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant