Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox stack traces confuse the parse regex #13

Open
wycats opened this issue Aug 25, 2022 · 1 comment
Open

Firefox stack traces confuse the parse regex #13

wycats opened this issue Aug 25, 2022 · 1 comment

Comments

@wycats
Copy link

wycats commented Aug 25, 2022

This is a variant of the bug in #6.

Consider this stack frame, created by Firefox:

create@http://localhost:3001/@fs/home/wycats/Code/Starbeam/starbeam/packages/debug/src/stack.ts:88:28

This ends up resulting in a parsed stack frame with file === "fs/home/wycats/Code/Starbeam/starbeam/packages/debug/src/stack.ts".

TL;DR I believe that the regex in rawParse needs to match the portion before @ with a non-greedy regex:

-        (line.slice(0, 3) !== "at " && (planA = line.match(/(.*)@(.*)/)))
+        (line.slice(0, 3) !== "at " && (planA = line.match(/(.*?)@(.*)/)))

Does this make sense to you or are there other places that need this fix?

@wycats
Copy link
Author

wycats commented Sep 15, 2022

@xpl any update here? I'm about to publish the 0.7 release of starbeam which uses Stacktracey for debugging infrastructure, and I was hoping to get this fixed before 0.7.

Would you accept a pull request along these lines?

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

No branches or pull requests

1 participant