Skip to content

fix debug.traceback failing on anonymous function (#1665)#1666

Merged
Perryvw merged 4 commits intoTypeScriptToLua:masterfrom
ChouUn:master
Mar 3, 2026
Merged

fix debug.traceback failing on anonymous function (#1665)#1666
Perryvw merged 4 commits intoTypeScriptToLua:masterfrom
ChouUn:master

Conversation

@ChouUn
Copy link
Contributor

@ChouUn ChouUn commented Oct 28, 2025

more details in #1665

Copilot AI review requested due to automatic review settings October 28, 2025 23:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the source map traceback regex pattern to avoid incorrectly matching anonymous function stack entries. The regex is updated to exclude the < character from file path matching, preventing matches against patterns like in function <...> that appear in Lua stack traces.

  • Updated regex pattern from (%S+) to ([^%s<]+) to exclude < character
  • Added comprehensive comments explaining the fix and its limitations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ypeScriptToLua#1665)

Nested IIFEs produce <file.lua:N> notation in debug.traceback().
The old pattern (%S+) captured the "<" prefix, causing sourcemap
lookup to fail for anonymous function definition locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChouUn and others added 2 commits March 1, 2026 06:41
…ypeScriptToLua#1665)

Use distinct sourcemap values and explicit <main.ts:N> assertions
per reviewer request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Perryvw Perryvw merged commit a3f2eea into TypeScriptToLua:master Mar 3, 2026
5 checks passed
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.

3 participants