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

Where is the source of mappings.wasm? #387

Closed
wylieconlon opened this issue Apr 24, 2019 · 5 comments
Closed

Where is the source of mappings.wasm? #387

wylieconlon opened this issue Apr 24, 2019 · 5 comments

Comments

@wylieconlon
Copy link

I was just looking at this library in comparison to other libraries that do sourcemap manipulation, and found it confusing to get started because of the extra requirement that the library is initialized with web assembly. It seems like much of the explanation of the workings was done in a blog post: https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/

Specifically, I think the documentation is incomplete because:

  • It does not explain where the source of mappings.wasm is defined- it appears to be a separate package, but there is also a version checked into the repo.
  • While there is mention of initializing via ArrayBuffer Add option to initialize mappings wasm via ArrayBuffer #339, there is no example.
  • The blog post I read defines mapping_callback as the key interface for the .wasm code- this seems like an important part to include in a README
@knilink
Copy link

knilink commented May 27, 2019

I think this is the repo.
https://github.com/fitzgen/source-map-mappings

@adjenks
Copy link

adjenks commented Jun 18, 2020

Seems pretty out of place and disconnected. They should either be in the same repo, or this project should reference the other library in the package.json

@guimard
Copy link

guimard commented Jan 31, 2022

Hi,
https://github.com/fitzgen/source-map-mappings seems not to be exactly the source repo: when trying to use it, I got 👍

  ✗ Errored » Asynchronous Error
      in source-map
      in test/source-map-test.js/<<PKGBUILDDIR>>/lib/reader/input-source-map-tracker.js:34
    originalPosition = maps[source].originalPositionFor(position);
                                    ^

TypeError: maps[source].originalPositionFor is not a function
    at originalPositionFor (/<<PKGBUILDDIR>>/lib/reader/input-source-map-tracker.js:34:37)
    at originalMetadata (/<<PKGBUILDDIR>>/lib/tokenizer/tokenize.js:532:43)
    at intoTokens (/<<PKGBUILDDIR>>/lib/tokenizer/tokenize.js:278:75)
    at tokenize (/<<PKGBUILDDIR>>/lib/tokenizer/tokenize.js:77:10)
    at fromStyles (/<<PKGBUILDDIR>>/lib/reader/read-sources.js:147:12)
    at fromString (/<<PKGBUILDDIR>>/lib/reader/read-sources.js:48:10)
    at doReadSources (/<<PKGBUILDDIR>>/lib/reader/read-sources.js:33:12)
    at readSources (/<<PKGBUILDDIR>>/lib/reader/read-sources.js:24:10)
    at /<<PKGBUILDDIR>>/lib/clean.js:115:12
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

@ochameau
Copy link
Contributor

I'll move wasm sources in this repo via #465, hopefully this will clarify and simply contribution to wasm sources!

@ochameau
Copy link
Contributor

ochameau commented Nov 8, 2022

The PR landed. See my two comments over #451 (comment).

@ochameau ochameau closed this as completed Nov 8, 2022
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

6 participants