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

javascript sourcemaps #1273

Closed
awalterschulze opened this Issue Feb 1, 2016 · 8 comments

Comments

Projects
None yet
7 participants
@awalterschulze

awalterschulze commented Feb 1, 2016

I know you said in 2013 that you are not planning on adding sourcemaps
#208
But you are open to someone adding it.
Has there been any progress on this issue in the past few years?
Is it all possible?

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Feb 1, 2016

Contributor

Obviously this question is not directed to me. But as Evan does not currently have notifications enabled for this repository, let me at least provide a pointer so you don't wait indefinitely for an answer. Most recent discussion of source maps was, I think, this: http://elm-discuss.narkive.com/mALY9prW/source-maps-was-elm-dev-tools

Contributor

jvoigtlaender commented Feb 1, 2016

Obviously this question is not directed to me. But as Evan does not currently have notifications enabled for this repository, let me at least provide a pointer so you don't wait indefinitely for an answer. Most recent discussion of source maps was, I think, this: http://elm-discuss.narkive.com/mALY9prW/source-maps-was-elm-dev-tools

@awalterschulze

This comment has been minimized.

Show comment
Hide comment
@awalterschulze

awalterschulze Feb 1, 2016

Ok so basically its a prioritization issue.
I guess this issue is more important for me to be able to recommend elm to my team #873
But sourcemaps are important for me to be able to recommend it to other teams. Maybe I am wrong.

awalterschulze commented Feb 1, 2016

Ok so basically its a prioritization issue.
I guess this issue is more important for me to be able to recommend elm to my team #873
But sourcemaps are important for me to be able to recommend it to other teams. Maybe I am wrong.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Feb 12, 2016

Member

Having talked to pretty much all companies using Elm in production, I have never heard this feature requested from them.

If we were ClojureScript or TypeScript where you would see runtime errors in practice, this would make a ton more sense. For the existing production users of Elm, they just do not have Elm-related runtime errors, so they never find themselves in a position where they want this feature.

That said, it could be added, but I'm not sure it makes sense to make the compiler more complicated for a feature that Elm users do not want. It could maybe still be valuable just because people worry about it independent of how Elm works, but this kind of PR perspective would make it relatively low-priority for now.

Member

evancz commented Feb 12, 2016

Having talked to pretty much all companies using Elm in production, I have never heard this feature requested from them.

If we were ClojureScript or TypeScript where you would see runtime errors in practice, this would make a ton more sense. For the existing production users of Elm, they just do not have Elm-related runtime errors, so they never find themselves in a position where they want this feature.

That said, it could be added, but I'm not sure it makes sense to make the compiler more complicated for a feature that Elm users do not want. It could maybe still be valuable just because people worry about it independent of how Elm works, but this kind of PR perspective would make it relatively low-priority for now.

@evancz evancz closed this Feb 12, 2016

@awalterschulze

This comment has been minimized.

Show comment
Hide comment
@awalterschulze

awalterschulze Feb 13, 2016

Thank you for your reply. I am going to assume I am wrong about the need for sourcemaps until I find that I personally require them.

awalterschulze commented Feb 13, 2016

Thank you for your reply. I am going to assume I am wrong about the need for sourcemaps until I find that I personally require them.

@roman roman referenced this issue Mar 31, 2016

Closed

Elmx support? #39

@pghalliday

This comment has been minimized.

Show comment
Hide comment
@pghalliday

pghalliday Oct 21, 2016

Sorry to bump and old (closed) issue but I can think of a use case with respect to unit testing and code coverage. Note this discussion of a code coverage tool for Elm:

https://groups.google.com/forum/#!topic/elm-discuss/t3ENhYAFx2U

The suggestion is that a Javascript tool such as Istanbul could generate coverage for the generated JS and then use source maps to translate that and generate coverage for the original Elm source. I'm not sure how it would really translate though. A real coverage tool would be preferred.

pghalliday commented Oct 21, 2016

Sorry to bump and old (closed) issue but I can think of a use case with respect to unit testing and code coverage. Note this discussion of a code coverage tool for Elm:

https://groups.google.com/forum/#!topic/elm-discuss/t3ENhYAFx2U

The suggestion is that a Javascript tool such as Istanbul could generate coverage for the generated JS and then use source maps to translate that and generate coverage for the original Elm source. I'm not sure how it would really translate though. A real coverage tool would be preferred.

@jedwards1211

This comment has been minimized.

Show comment
Hide comment
@jedwards1211

jedwards1211 Nov 8, 2016

@evancz as an observer trying to learn more about Elm I'm not sure exactly what you mean. The question in my mind relating to source maps is, how does one set breakpoints, pause and step through the code in the browser debug tools if something isn't working right -- even if no errors are being thrown? Is the JS generated by Elm easy enough to recognize for the purpose of debugging?

jedwards1211 commented Nov 8, 2016

@evancz as an observer trying to learn more about Elm I'm not sure exactly what you mean. The question in my mind relating to source maps is, how does one set breakpoints, pause and step through the code in the browser debug tools if something isn't working right -- even if no errors are being thrown? Is the JS generated by Elm easy enough to recognize for the purpose of debugging?

@rudolfolah

This comment has been minimized.

Show comment
Hide comment
@rudolfolah

rudolfolah Nov 15, 2016

@jedwards1211 in a recent blog post about elm 0.18 it seems that the better alternative to the dev tools and source maps is just to build a better debugger made for elm.

from what I've seen of the JS generated, it is simple enough to follow along in most places...at least for me.

rudolfolah commented Nov 15, 2016

@jedwards1211 in a recent blog post about elm 0.18 it seems that the better alternative to the dev tools and source maps is just to build a better debugger made for elm.

from what I've seen of the JS generated, it is simple enough to follow along in most places...at least for me.

@radix

This comment has been minimized.

Show comment
Hide comment
@radix

radix Jan 24, 2017

Here I am trying to debug an infinite loop in my Elm code (a runtime bug!) wishing I had source maps. :)

radix commented Jan 24, 2017

Here I am trying to debug an infinite loop in my Elm code (a runtime bug!) wishing I had source maps. :)

@elm elm locked and limited conversation to collaborators Mar 10, 2017

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