Fork me on GitHub
#boot
<
2017-11-03
>
sinistral17:11:17

@samuel.perrouault make-repl-connect-file depends on @out-file, which seems to be set only by the cljs-repl task, and not cljs-repl-env.

Sam18:11:34

@sinistral Actually cljs-repl-env does reset out-file to (io/file src "adzerk" "boot_cljs_repl.cljs").

Sam18:11:33

In fact, if I cider-jack-in and then proceed to start a cljs repl from there it works fine

Sam18:11:59

Only the cider-jack-in-clojurescript function leads to the issue

Sam18:11:00

Actually saying this makes me realize I probably should discuss this with cider poeple rather than with boot poeple ^^

sinistral18:11:07

My apologies, I was looking at a very old fork of the repository 😞

ag23:11:55

can someone help me to run boot-cljs from within (with-pre-wrap block... something strange is happening

ag23:11:01

I've been trying to figure out why the hell it is taking so long to compile on our setup on incremental builds. And one of the things I wanted to do is to wrap a check around it so it would run only when .cljs and .cljc files change, otherwise it runs even when .scss files get modified.

ag23:11:19

Another thing I have noticed, every time it moves files from one temp folder to another folder, I don't know how to force it not to do that - because it's kinda of a bottleneck

juhoteperi23:11:44

The code inside with-pre-wrap is run each time watch runs, (cljs) creates new Cljs compiler each time

juhoteperi23:11:59

So, don't call (cljs) inside with-pre-wrap

ag23:11:31

no, I mean it's slow even when I don't run it within with-pre-wrap

ag23:11:58

I want to wrap it in with-pre-wrap so I can add a check with by-ext

juhoteperi23:11:03

Hmph, that is possible, but if the temp dirs are changing I don't know what else would cause that

ag23:11:23

This is my biggest problem with Boot.... Everything about boot is so cool and awesome, except when filesets get on the way - and everything just crumbles

juhoteperi23:11:06

If you want to control when cljs task is really run, based on the changed files, you need to build the middleware yourself instead of using with-pre-wrap

juhoteperi23:11:29

or maybe it could work with with-pre-wrap but I'd recommend just writing the functions

ag23:11:01

oh, right... I forgot about middleware... gonna try that

juhoteperi23:11:58

Maybe something like this:

(deftask wrap-cljs []
  (let [cljs-task (cljs :opts :here)]
    (fn [next-handler]
      (let [cljs-handler (cljs-task next-handler)]
        (fn [fileset]
          (if (cljs-files-changed? fileset)
            (cljs-handler fileset)
            (next-handler fileset)))))))

juhoteperi23:11:21

this will only create single cljs temp dirs per wrap-cljs task etc.

ag23:11:07

Thank you!