{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/219","labels_url":"https://api.github.com/repos/riot/riot/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/219/comments","events_url":"https://api.github.com/repos/riot/riot/issues/219/events","html_url":"https://github.com/riot/riot/issues/219","id":55598064,"number":219,"title":"compiler feature: source maps","user":{"login":"n3wm1nd","id":445268,"avatar_url":"https://avatars.githubusercontent.com/u/445268?v=3","gravatar_id":"","url":"https://api.github.com/users/n3wm1nd","html_url":"https://github.com/n3wm1nd","followers_url":"https://api.github.com/users/n3wm1nd/followers","following_url":"https://api.github.com/users/n3wm1nd/following{/other_user}","gists_url":"https://api.github.com/users/n3wm1nd/gists{/gist_id}","starred_url":"https://api.github.com/users/n3wm1nd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n3wm1nd/subscriptions","organizations_url":"https://api.github.com/users/n3wm1nd/orgs","repos_url":"https://api.github.com/users/n3wm1nd/repos","events_url":"https://api.github.com/users/n3wm1nd/events{/privacy}","received_events_url":"https://api.github.com/users/n3wm1nd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/riot/riot/labels/low%20priority","name":"low priority","color":"f9f9f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-27T10:07:23Z","updated_at":"2015-08-10T12:07:31Z","closed_at":null,"body":"source maps (as described [here](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)) would really help making error messages easier to look up, especially if the errors are thrown in the inlined sections in the html part of the tag. See also the [specifications](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#heading=h.zhn1phd7ocnp) and the [library](https://github.com/mozilla/source-map) to generate them."},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/129423765","html_url":"https://github.com/riot/riot/issues/219#issuecomment-129423765","issue_url":"https://api.github.com/repos/riot/riot/issues/219","id":129423765,"user":{"login":"nippur72","id":2598443,"avatar_url":"https://avatars.githubusercontent.com/u/2598443?v=3","gravatar_id":"","url":"https://api.github.com/users/nippur72","html_url":"https://github.com/nippur72","followers_url":"https://api.github.com/users/nippur72/followers","following_url":"https://api.github.com/users/nippur72/following{/other_user}","gists_url":"https://api.github.com/users/nippur72/gists{/gist_id}","starred_url":"https://api.github.com/users/nippur72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nippur72/subscriptions","organizations_url":"https://api.github.com/users/nippur72/orgs","repos_url":"https://api.github.com/users/nippur72/repos","events_url":"https://api.github.com/users/nippur72/events{/privacy}","received_events_url":"https://api.github.com/users/nippur72/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T12:07:31Z","updated_at":"2015-08-10T12:07:31Z","body":"Source maps for `{expressions}` are not possible to achieve because expressions in Riot are generated dynamically (I think with `globalEval()` but I am not sure as I don't know much of Riot source code).\r\n\r\nSource maps require a static source javascript file, they are basically a 1-to-1 correspondence between compiled and source. \r\n\r\nOf course the compiler could output the expressions too (e.g. as an array of functions), which would be good because `riot.tag()` could load them instantly without the need to calculate them, gaining a little speed increase. \r\n\r\nWhat I mean is:\r\n\r\n.tag:\r\n```HTML\r\n<mytag>Hello {name}, {greet} to you!</mytag>\r\n```\r\n.js (compiled):\r\n```JavaScript\r\nriot.tag('<mytag>','Hello {0}, {1} to you!', ... ,\r\n[\r\n   /* expr #0 */ function(d) { return d.name; },  \r\n   /* expr #1 */ function(d) { return d.greet; },   \r\n]\r\n, function(opts) { ...})\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}