Fork me on GitHub
#cljs-dev
<
2020-01-11
>
darwin15:01:12

hi, just playing with CLJS-1902 in some real-world scenarion, it works fine but I seem to be unable to make cljs.core namespace compile with inlined sourcemaps, all other namespaces work as expected even under cljs.* except cljs.core

darwin15:01:43

tried setting :aot-cache false, clear varios caches I know about, without success

darwin15:01:16

isn’t there a special codepath compiling cljs.core which would ignore sourcemaps settings from build options?

darwin15:01:56

ok, I think I found the problem: https://github.com/clojure/clojurescript/blob/dcc8e61c79bfc701fe9e1414fe5db93edf6f1853/src/main/clojure/cljs/compiler.cljc#L1614-L1615 cached-core function decides that core is cached and emits it from cache, regardless of :inline-source-maps flag

darwin15:01:57

I guess :inline-source-maps should be added into build-affecting-options and that cached-core should consult that as well

darwin15:01:47

FYI, I just built custom version of clojurescript with cached-core always returning false and I got properly inlined sourcemap in generated cljs/core.js

darwin15:01:34

when I think about it, I would say cached-core not respecting :aot-cache false compiler option is a bug, independent on CLJS-1902