cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
2020-01-11T15:19:12.006300Z

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

2020-01-11T15:19:43.007Z

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

2020-01-11T15:20:16.007700Z

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

2020-01-11T15:43:56.008500Z

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

2020-01-11T15:44:57.009600Z

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

2020-01-11T15:50:47.011Z

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

2020-01-11T15:54:34.012100Z

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