You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd be interested in contributing sourcemap support, if you can give me some pointers in the right direction.
Reacted by Andre Carvalho, P.J. Henning, James Lal, nick, Vineet Ahuja, Bastien Gandouet, Bartosz Gościński, Stéphane Lavergne, Kristinn Svansson, Jeffrey Wescott and 62 more
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)
Reacted by Josh Abernathy, Vladislav Botvin, Jared Forsyth, Andre Carvalho, Vineet Ahuja, Michał Miszczyszyn, Stéphane Lavergne, Jeffrey Wescott, ELLIOTTCABLE, Cem Turan and 17 more
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.
Reacted by ELLIOTTCABLE, Eduard Bondarenko, Joachim Wester and Maxime
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!
Would also be cool for tracking errors using sentry.
Reacted by Rainer Dreyer, Scott Wang, Tomer Ohana, Jai S Mankoo, Sergey Samokhov, Tomas Chmelevskij, Sean Poulter, Amirali Esmaeili, tejesh014, Joachim Wester and 3 more
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?
Reacted by Sean Poulter, Sergey Samokhov, Bobby King, Joachim Wester, Artem Govorov, Andreas Heissenberger and Maxime
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.
Reacted by Joachim Wester, Artem Govorov, Gorka Cesium, Maxime and kpietraszko
Reacted by Sean Poulter, Sergey Zhukaev, Gorka Cesium, Artem Govorov and Maxime
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.
Reacted by Don Viszneki, John Haley, TL and Maxime
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.
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.
Activity
bobzhang commentedon Jun 12, 2017
what do you think of working in this direction: #151
jaredly commentedon Jun 12, 2017
That would also be a useful tool, but I think it's an entirely separate feature?
jaredly commentedon Jun 14, 2017
I've used sourcemaps in clojurescript (which is quite a different language), and they're super useful
lightsofapollo commentedon Jun 14, 2017
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)
alcarvalho commentedon Jun 17, 2017
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.
v-ahuja commentedon Aug 15, 2017
We've started showing integrations of bucklescript in
jsstacks at Bloomberg and source-maps is a recurring question.bobzhang commentedon Aug 16, 2017
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!
dvisztempacct commentedon Jul 22, 2018
Any movement on this? @jaredly asked for some direction but I don't see any (at least in this thread.)
hhugo commentedon Jul 22, 2018
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
aaronshaf commentedon Nov 30, 2018
Would be nice for test coverage
dawee commentedon Feb 19, 2019
Would also be cool for tracking errors using sentry.
texastoland commentedon May 17, 2019
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?
hoichi commentedon Dec 12, 2019
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.BlueHotDog commentedon Apr 2, 2020
Hi guys, any update on this? what are the blockers?
Starcounter-Jack commentedon Apr 10, 2020
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.
17 remaining items
sme-tuga001 commentedon Dec 20, 2023
Pls add Sourcemap for 12 version cc @chenglou
fhammerschmidt commentedon Feb 19, 2025
@DrSensor @r17x
I heard you are eager to contribute this feature.
fhammerschmidt commentedon Feb 19, 2025
https://github.com/flow/ocaml-sourcemaps might be of interest
fhammerschmidt commentedon Feb 19, 2025
RFC here: https://github.com/rescript-lang/rfcs/blob/sourcemaps/0002-sourcemaps.md
DrSensor commentedon Feb 20, 2025
absolutely! i think we need to address the compiler stages/pipeline on which one need to tackle first 🤔
fhammerschmidt commentedon Feb 20, 2025
Some more info from Cristiano:
I don't know if that would be ok for you but it makes the challenge we have here a bit clearer.
github-actions commentedon Feb 16, 2026
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.
BlueHotDog commentedon Feb 24, 2026
yes @fhammerschmidt thank you
mununki commentedon Apr 28, 2026
working on #8393