GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — feat: Embed source content and allow setting the source file name by Lms24 · Pull Request #104 · nodejs/orchestrion-js Conversation
|
Does this string live in memory for the life of the process? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Good point, thanks for raising! I'm unfortunately not a 100% familiar with Orchestrion but I believe for runtime instrumentation via tracing-hooks, this should be discarded from memory as soon as the transform ran. For runtime, the source maps don't get consumed. If I'm missing something here, or we generally want to err on the side of caution, I can also remove the embedding part from the PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
(reviewing, but just re the comments above @jsumners-nr and @Lms24) The map is always generated when
Suggestion: no change needed for this PR. As future work, runtime callers do not need a sourcemap at all. An option to skip map generation (or to generate it lazily) would save more than this PR adds, but I'd argue it's out of scope here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I like this. It keeps the change at the one place that builds the map, and adds an options object rather than a 5th positional argument, which leaves room for more options. The default source name does not change, so existing callers only see the new sourcesContent. Embedding the source is the safer of the two changes: it makes the map self-contained no matter what path the caller gives, and its cost is transient for the runtime hooks.
The weak point is the input-sourcemap path. The transform doesn't compose with an earlier map, and instead merges two maps in different coordinate systems. This PR isn't the cause of that, but it puts a real file path and the intermediate content on top of it.
I recommend fixing the composition with applySourceMap, handling null and '' options, and updating the README. With those, this is good to go, imo.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: isaacs <[email protected]>
Copying the input map's mappings into the generator mixed two coordinate systems and never resolved output positions back through the input map. Build a fresh generator for the transform and apply the input map to it, so positions resolve to the original source. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
#25772) closes #25329 closes [JS-3928](https://linear.app/getsentry/issue/JS-3928) ## Description This bumps `@apm-js-collab/code-transformer-bundler-plugins` to 0.7.5, which has the upstream fix (apm-js-collab/code-transformer-bundler-plugins#50, nodejs/orchestrion-js#104). The source map of an instrumented module now names its real file in `node_modules`, with `sourcesContent`. Before, Vite 8 and webpack builds had a `<package>/<file>` source that does not exist (for example `ioredis/built/Redis.js`), and source map flattening in `@sentry/sveltekit` failed for that chunk. ## Type decisions code-transformer 0.19.0 also allows a function in the `transform` field of an instrumentation. I cast `serializeInstrumentations` to our vendored types, so the public `transform` type stays `string`. The alternative is to also allow a function in the vendored type. --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Lukas Stracke <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.