Fork me on GitHub
#boot
<
2016-03-31
>
kenbier20:03:42

What determines if a file should be recompiled for boot-reload? I am seeing cljs recompilation when I edit my clj files, which seems off.

kenbier20:03:55

Here is my boot task: (deftask dev-cljs-repl "Run a restartable system in the Repl" [] (comp (environ :env dev-env) (watch :verbose true) (speak) (system :sys #'dev-system :auto true :files ["handler.clj"]) (reload) (sass) (cljs-repl) (cljs :source-map true :compiler-options {:devcards true})))

juhoteperi21:03:49

@kenbier: Nothing, reload doesn't control what files are recompiled. Other tasks (sass, cljs) do that themselves. Cljs task always calls Cljs compiler which does incremental compilation which should be very fast if files didn't change.

juhoteperi21:03:15

So even if it ways "Compiling Cljs" it probably is not really compiling Cljs

iwillig21:03:19

hi channel.. i am having a hard time finding the options i can give the repl task. basically i just want to inject a couple of namespaces into my repl but i can’t seem to find the docs on this

juhoteperi21:03:38

@iwillig: boot repl --help

iwillig21:03:10

if it was a snake

juhoteperi21:03:48

All tasks have help. And the help is also accessible as in repl: (doc repl)

iwillig21:03:51

thanks @juhoteperi

juhoteperi21:03:56

Hmm, I got an idea for documentation site. List of short facts, about one sentence, and users could vote the best facts. That might give useful list for newcomers and give us better idea what documentation should be improved.

juhoteperi21:03:20

Kind of SO, but just the answers.

kenbier21:03:47

@juhoteperi: I see, that makes sense. Is there a good way to splitup the task to only call cljs task on a cljs file change? I.e. is it possible to know which file changed in the composition? Basically, I have a cljs and a clj directory, and I don’t want cljs recompilation to happen when I edit something in the clj dir.

juhoteperi21:03:11

Not currently. I have not seen this worth the complexity.

kenbier21:03:00

I see, thanks.

juhoteperi21:03:58

With a largeish project when I change a Cljs ns which causes multiple ns to be recompiled, the build triggered by watch takes 1.5s. After changing a clj file it is 0.7s.

juhoteperi21:03:52

Could be probably improved. But I am not sure how large percentage of that 0.7s is caused by calling Cljs compiler and which is just Boot.

juhoteperi21:03:43

Also, Cljs macros live in Clj files so it would not work if Cljs task was only ran when Cljs files change.

kenbier21:03:10

Oh good point. I see similar performance, which is fine for now. Thanks for the help.

currentoor22:03:26

Is that supposed to be the path to the cljs source directory?

juhoteperi22:03:10

Check the issues / PR, linked in changelog.

currentoor22:03:44

Got it, thanks.

kenzaburo22:03:43

Are there any examples out there on how to setup automated cross-browser testing for cljs projects with boot and services like Browserstack or Sauce Labs?