Fork me on GitHub
#boot
<
2017-08-29
>
richiardiandrea17:08:51

@juhoteperi I am working on a patch for @anmonteiro's lumo and was wondering if there is a way to disable source maps now, given the bit here https://github.com/boot-clj/boot-cljs/blob/a182013465bcd36504f48b9bf4a950b656cbf851/docs/compiler-options.md#source-map

richiardiandrea17:08:20

in lumo we have :optimizations :simple

richiardiandrea17:08:51

but we don't want the js.map file...I know I could filter it out

juhoteperi17:08:57

just set :source-map to false?

richiardiandrea18:08:29

yes that's the right answer, but it does not seem to work:

richiardiandrea18:08:43

Released java.util.concurrent.Semaphore@163424e3[Permits = 1]...
• lumo.js
CLJS options:
{:output-dir
 "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/lumo/47a/3gucn3/lumo.out",
 :closure-defines
 {cljs.core/*target* "nodejs", lumo.core/*lumo-version* "1.7.0"},
 :static-fns true,
 :dump-core false,
 :optimize-constants false,
 :cache-analysis true,
 :optimizations :simple,
 :parallel-build true,
 :verbose true,
 :output-to
 "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/lumo/47a/3gucn3/lumo.js",
 :asset-path "lumo.out",
 :fn-invoke-direct true,
 :source-map
 "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/lumo/47a/3gucn3/lumo.js.map",
 :compiler-stats true,
 :main boot.cljs.main2673}

juhoteperi18:08:10

hmm true, the logic on boot-cljs is competely nonsense

juhoteperi18:08:41

If there is :source-map option provided, but the not doing simple optimization, source-map is always enabled

juhoteperi18:08:03

well, I think you can remove the source-map task option, and instead just set source-map on the compiler-options instead

juhoteperi18:08:11

then boot-cljs doesn't do any additional logic

richiardiandrea18:08:16

it is there already

richiardiandrea18:08:56

probably it is merged upstream that function

juhoteperi18:08:24

aha, the source-map logic is done after merging compiler-options

juhoteperi18:08:40

this will need fix in boot-cljs, no workaround for now

richiardiandrea18:08:07

ok, I can patch that, should I put if (:source-map opts) on that line

richiardiandrea18:08:04

it seems that the contains only would not be a good check there

juhoteperi18:08:25

There is probably some reason why it is written like that

richiardiandrea18:08:55

yep true, it was an tentative patch 😄

juhoteperi18:08:07

I'll add tests for the source-map logic and see how it can be fixed

richiardiandrea18:08:37

k cool, let me know what I can do there

richiardiandrea18:08:31

looks perfect now:

• main.js
CLJS options:
{:output-dir
 "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/lumo/7xd/-pr3thn/main.out",
 :closure-defines
 {cljs.core/*target* "nodejs", lumo.core/*lumo-version* "1.7.0"},
 :static-fns true,
 :dump-core false,
 :optimize-constants false,
 :cache-analysis true,
 :optimizations :simple,
 :parallel-build true,
 :verbose true,
 :output-to
 "/home/arichiardi/.boot/cache/tmp/home/arichiardi/git/lumo/7xd/-pr3thn/main.js",
 :asset-path "main.out",
 :fn-invoke-direct true,
 :source-map false,
 :compiler-stats true,
 :main boot.cljs.main2675}

richiardiandrea18:08:45

yes looks good, and I will try that locally

juhoteperi18:08:03

I'll push a new release