Open kriskowal opened 11 months ago
To capture my point of view already expressed in chat: I believe we should not modify intermediate runtime code to plumb any source map related information/power that are development environment specific, as that does not solve the problem of debugging production bundles, and is IMO a layering violation.
What is the Problem Being Solved?
Per https://github.com/Agoric/agoric-sdk/discussions/8539, our bundler supports scratching out a source map during development and
importBundle
can opt-into rehydrating the//#sourceMapURL
to rendezvous with that source map. Because the feature is opt-in, it is not enabled in our usage in Zoe or SwingSet controller. Where we useimportBundle
, we should, when possible, injectcomputeSourceMapLocation
.Description of the Design
Security Considerations
Scaling Considerations
Test Plan
Manually, adding a debugger statement to a contract that runs in the chain should show the source as it appeared in the developer’s working copy when it was bundled in a debugger like VSCode.
Upgrade Considerations