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

Do we support Multi-level mapping source map lookups for final source map consumption #11

Open
littledan opened this issue Mar 5, 2018 · 4 comments

Comments

@littledan
Copy link
Member

For multilevel source maps, This solution is proposed in the v3 source map spec, in the "Multi-level Mapping Notes" section for maps between languages which don't have built-in syntactic support (which is just JS and CSS, now with Wasm added). Should we do this?

@tromey
Copy link

tromey commented Mar 6, 2018

This bug is referring to the text here: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.e8hx254xu4sa

@jkup jkup changed the title Consider HTTP header for source maps Multi-level mapping discussion Aug 9, 2023
@jkup jkup changed the title Multi-level mapping discussion Do we support Multi-level mapping source map lookups for final source map consumption Aug 9, 2023
@jridgewell
Copy link
Member

I maintain @ampproject/remapping, which traces multi-level source maps to generate a flattened output. It has a (bad) test suite of fixture outputs from build tools, and a few unit tests.

There are a few complexities when remapping, eg:

  • What happens if the output map points to an unmapped region in the transitive map?
  • What happens if the output map points to a "generated" mapping in the transitive map?
  • What happens if the output map has a named mapping, but the transitive map doesn't?
  • What happens if the output map has a source mapping, but the transitive map has a named mapping?

@petebacondarwin
Copy link

I also spent some time building a similar tool for Angular.

https://github.com/angular/angular/tree/1eda1bdfccc09426ea8d8dd8cfbd8f521cc15f14/packages/compiler-cli/src/ngtsc/sourcemaps

I wrote a doc on what we found and built.

https://docs.google.com/document/d/1x1laiDVFgJtpiw49ozwr91LG7hqohytWDiptJ93nJcE/edit#heading=h.9gb628qxj3gl

In case this is useful here.

@Jack-Works
Copy link
Member

Is a multi-level source map ever supported in any debugger? e.g. Chrome doesn't support it (https://bugs.chromium.org/p/chromium/issues/detail?id=1086380)

I think this feature is useful when there is multiple-level transformation of the code.

nicolo-ribaudo pushed a commit to nicolo-ribaudo/source-map-rfc that referenced this issue Mar 13, 2024
Update grammar, styling an some wording
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants