Skip to content

Sourcemap support? #1699

Open
Open

Description

@jaredly

I'd be interested in contributing sourcemap support, if you can give me some pointers in the right direction.

Activity

  1. bobzhang commented on Jun 12, 2017

    @bobzhang
    Member

    what do you think of working in this direction: #151

  2. jaredly commented on Jun 12, 2017

    @jaredly
    ContributorAuthor

    That would also be a useful tool, but I think it's an entirely separate feature?

  3. jaredly commented on Jun 14, 2017

    @jaredly
    ContributorAuthor

    I've used sourcemaps in clojurescript (which is quite a different language), and they're super useful

  4. lightsofapollo commented on Jun 14, 2017

    @lightsofapollo

    My 2c- when trying to convince my past teams and companies to use some X compile-to-js technology it was very, very difficult to win this argument without sourcemap support (particularly when doing some interop /w another JS only source)

  5. alcarvalho commented on Jun 17, 2017

    @alcarvalho
    Contributor

    I had my boss demoing for me how clojurescript could be debugged from the browser, how you could use the REPL to connect to it and write clojurescript to inspect and change values on the fly.

    IMHO having source maps is the very first step in the direction of having something that's easily hackable like clojurescript.

  6. v-ahuja commented on Aug 15, 2017

    @v-ahuja
    Contributor

    We've started showing integrations of bucklescript in js stacks at Bloomberg and source-maps is a recurring question.

  7. bobzhang commented on Aug 16, 2017

    @bobzhang
    Member

    hi @vahuja13 , it is great to hear your progress, can you share with more a bit more about detail, or you can find me on discord and chat offline, thanks!

  8. dvisztempacct commented on Jul 22, 2018

    @dvisztempacct

    Any movement on this? @jaredly asked for some direction but I don't see any (at least in this thread.)

  9. hhugo commented on Jul 22, 2018

    @hhugo
    Contributor

    You can have a look at the sourcemap implementation in js_of_ocaml
    here https://github.com/ocsigen/js_of_ocaml/blob/master/compiler/lib/source_map_yojson.ml.in

  10. aaronshaf commented on Nov 30, 2018

    @aaronshaf

    Would be nice for test coverage

  11. dawee commented on Feb 19, 2019

    @dawee

    Would also be cool for tracking errors using sentry.

  12. texastoland commented on May 17, 2019

    @texastoland

    Regardless whether it's useful for debugging, it's necessary for runtime tooling support like Quokka and blocking wallabyjs/quokka#153. @jaredly Did you already have a look how much work would be required? Has anyone attempted it?

  13. hoichi commented on Dec 12, 2019

    @hoichi

    Chiming in to say that Wallaby.js introduced a Time Travel Debugger, so if we want to be on par with Elm*, we need source maps for the custom Wallaby compiler 😀.

    Any news yet?

    * I know it’s not the same time travel: in Elm’s case what changes through time is the state; in Wallaby’s, execution point.

  14. BlueHotDog commented on Apr 2, 2020

    @BlueHotDog

    Hi guys, any update on this? what are the blockers?

  15. Starcounter-Jack commented on Apr 10, 2020

    @Starcounter-Jack

    I love Bucklescript, but it is pretty much the only compiler/transpiler for Javascript that doesn't generate source maps. The alternatives such as Purescript, Typescript and Elm all do this for a good reason. It is not just for debugging. Scratchpads such as Quokka are really useful for functional languages. Code coverage tools such as Wallaby. Browsers let's you experience the language as a first class citizen. It really makes sense to tap in to the tooling ecosystem of Javascript in this way.

    I appreciate that you have register line numbers from the original source file via the Ocaml/Reason AST, through to the internal representation and all the way to the code graph read by the Javascript code emitter and that there are two teams involved, but none the less, source maps is a must for a modern Javascript code emitter in 2020.

  16. 17 remaining items

  17. sme-tuga001 commented on Dec 20, 2023

    @sme-tuga001

    Pls add Sourcemap for 12 version cc @chenglou

  18. fhammerschmidt commented on Feb 19, 2025

    @fhammerschmidt
    Member

    @DrSensor @r17x
    I heard you are eager to contribute this feature.

  19. fhammerschmidt commented on Feb 19, 2025

    @fhammerschmidt
    Member
  20. fhammerschmidt commented on Feb 19, 2025

    @fhammerschmidt
    Member
  21. DrSensor commented on Feb 20, 2025

    @DrSensor

    @DrSensor @r17x
    I heard you are eager to contribute this feature.

    absolutely! i think we need to address the compiler stages/pipeline on which one need to tackle first 🤔

  22. fhammerschmidt commented on Feb 20, 2025

    @fhammerschmidt
    Member

    Some more info from Cristiano:

    Basically, from lambda onwards, most location information is not kept. Perhaps one possibility for an estimate is to take something much smaller, such as adding source maps only for function definitions being emitted. Or symbols.

    I don't know if that would be ok for you but it makes the challenge we have here a bit clearer.

  23. github-actions commented on Feb 16, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  24. added
    stale
    on Feb 16, 2026
  25. BlueHotDog commented on Feb 24, 2026

    @BlueHotDog

    yes @fhammerschmidt thank you

  26. removed
    stale
    on Feb 25, 2026
  27. self-assigned this
    on Apr 25, 2026
  28. mununki commented on Apr 28, 2026

    @mununki
    Member

    working on #8393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions