This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


@richiardiandrea we could consume embedded ones and I don’t really have an issue with generating embedded ones - but it should be behind a flag


the only place where we support it I believe is the REPL, where we use them when compiling expressions


@richiardiandrea ah you’re talking specifically about self-hosted here


I have a small patch ready with source-map-inline = true. I need some time to check if it works properly


Yep I have a q: are source maps composed of multiple files usually? If a namespace requires clojure.string for instance, should I see it in the source maps? Because it does not seem to show up in my self-host source maps...


in self-host I though we always inline, so I’m not sure what you mean


@richiardiandrea If a namespace requires clojure.string, then, if :source-map is set to true, the source maps for clojure.string would be appended to the end of the generated JavaScript for the clojure.string namespace.


Oh the whole encoded file? ok that is not what I am seeing, will dig more. Thanks you both


Yeah, it is appended to the source via But to be honest, I never found that useful because it requires the JavaScript environment to do something with it. What seems to be more important, IMHO, is that source maps are included under the :source-maps key of the compiler state.


One thing that I wanted to document is that the name key to eval-str is used in the source maps so in lumo I was passing the namespace instead:


Don't know how correct this is but I have reverse engineered it by reading the piece of code you just linked :)


So folks here is what I get (`:verbose` on from the compiler, thanks for this feature!):

{"version" 3
                       "file" "repro/expound_tuple.js?rel=1517796376596"
                       "sources" ["expound_tuple.cljs?rel=1517796376596"]
                       "lineCount" 14
                       "names" ["repro.expound-tuple/lumo-prepare-stack-trace","error","stack","cljs.core/println","js/console.dir","repro.expound-tuple/test-sm","cljs.core/ffirst"]
                       "sourcesContent" ["(ns repro.expound-tuple\n ..."]}


the sources field is only one and not relative, which to me sounded strange and when I tried with source-map-explorer it was complaining that it is only one file (shouldn't be many?):


I (but I am not an expert by any means) expected cljs.core and clojure.string to be in sources.