-
Notifications
You must be signed in to change notification settings - Fork 13
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
Sourcemapping #848
base: main
Are you sure you want to change the base?
Sourcemapping #848
Conversation
92ae3a2
to
338e898
Compare
TODO: I'm confusing myself here about the error reporter and the role it plays. I really think I'm gonna rip it out as part of this work. What we really need is:
That means CLI logs some nice pretty messages, and the worker probably just logs a JSON object (but not stringified) Not sure. Needs more thought. |
…a string expression
Not sure how useful this is tbh
It might be a distraction but I want to go back and look at the example in #582 It still doesn't serialize well (in prod or this branch), and just shows the error as But when I look at the stack trace, there's no stack in the job code, so we can't extract any error information. I think it's something to do with the axios callback - the error occurs in an async callstack, hence there's nothing useful in the stack to report. Is there anything we can everdo about this? Btw to repro the error (and get a real error message out), do this:
This goes away in later http versions, but I'm still worried about / interested in this async error case. |
Errors which occur within the job code directly are currently working well. But I'm struggling for errors within adaptor code, and that's a real problem. Basically when an error is thrown from inside an adaptor, the stack trace does not include the vm sandbox. So you get a stack like this:
What I rely on for source mapping is a frame inside the vm, like this:
Where that I don't really understand why the vm frames are omitted from the stack, but it'll be something to do with how the node vm module works I'm sure. I'll have to get my thinking cap on about this. |
Short Description
This PR uses sourcemapping to report accurate positions on error messages
Fixes #230
Implementation Details
Early stages here. I've worked out how to get the sourcemap from recast when compiling, and how to use it in the runtime to map positions. There's a couple of basic unit tests around this.
Plenty to do:
QA Notes
List any considerations/cases/advice for testing/QA here.
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy