This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-04
Channels
- # arachne (108)
- # beginners (16)
- # boot (48)
- # cider (34)
- # cljs-dev (12)
- # clojure (237)
- # clojure-spec (50)
- # clojure-uk (5)
- # clojurescript (8)
- # cursive (1)
- # datascript (2)
- # datomic (6)
- # defnpodcast (1)
- # emacs (1)
- # fulcro (7)
- # hoplon (1)
- # keyboards (1)
- # off-topic (22)
- # re-frame (26)
- # reagent (2)
- # specter (16)
- # unrepl (6)
- # yada (1)
I have another question, it seems like I have embedded source maps in my files...is ClojureScript able to consume embedded ones out of the box? They are produced by self-host (of course 😄).
//# sourceURL=ep_cloud/event_store/stm.js?rel=1517713267835
//# sourceMappingURL=data:application/json;base64,
If not, would it be complicated to add support?On this: is the following comment referring to ffirst
not mapped? https://github.com/clojure/clojurescript/blob/9778b34d9e988a28c64133c4751d235bbbd3e966/src/main/cljs/cljs/js.cljs#L1335
@richiardiandrea In Planck, I have been ignoring the embedded source maps. Regardless, FWIW, source mapping is implemented in Planck with what is available in ClojureScript. For example
cljs.user=> (ffirst 1)
1 is not ISeqable
cljs.core/seq (cljs/core.cljs:4415:17)
cljs.core/first (cljs/core.cljs:4434:22)
cljs.core/ffirst (cljs/core.cljs:5860:39)
Uhm i will check Planck's code, thanks! The thing is that self host produces embedded only for things that are not core. The smaps for core are normal if you bundle them. So there is still some missing piece ?
Ok I checked and it seems like Planck creates and dumps its own source maps...`lumo` does not do that and let the self host machinery produce embedded ones
A part from that, it is consumption that does not work, because embedded and file are different and source-map-support
(JS lib used in cljs) needs some switch for embedded
@richiardiandrea Perhaps an improvement would be to somehow have source maps also provided in the callback, rather than only appended to the JS (or some more fine-grained control). If you add :source-map true
, they will be appended but can also be fished out from under the :source-maps
key of the state, which is the bit that could perhaps more simply be included in the callback.
yep that could work indeed, I just thought that inline maps would be supported ootb by cljs core because they are emitted directly instead of normal ones by cljs.js
...I am playing with source-map-support
right now to see if I can get a quick win
@U04VDQDDY funny, source-map-support
does exactly what you described above: https://github.com/evanw/node-source-map-support/blob/7aaf30b2c165c16b0f4c3849048e1a2d1899dc89/source-map-support.js#L502
@U04VDQDDY sorry for the ping, but do you remember you did something special for source maps under :source-maps
? I don't really see them there
ok I take it back, i seem to see them