Fork me on GitHub
#boot
<
2017-07-24
>
kommen12:07:34

@richiardiandrea would you consider pushing a new snapshot of boot-figreload?

richiardiandrea11:07:55

Done!

Deploying boot-figreload-0.1.1-SNAPSHOT.jar...
Retrieving maven-metadata.xml from 
Sending boot-figreload-0.1.1-20170725.111457-3.jar to  (13k)
Sending boot-figreload-0.1.1-20170725.111457-3.pom to  (2k)
Retrieving maven-metadata.xml from 
Sending maven-metadata.xml to  (1k)
Sending maven-metadata.xml to  (1k)

richiardiandrea14:07:08

Yes no problem, i am between flights so I need probably some little time but I will do it asap @kommen

djebbz15:07:06

Hello everyone. Is it possible to run a clojure web server and to compile cljs in the same task ?

(deftask run
         "Run the project."
         []
         (comp (serve :dir "target" :port 3000 :handler 'rum-bug-class.server/handler :reload true)
               (cljs :compiler-options {:main 'rum-bug-class.browser
                                        :optimizations :none
                                        :source-map true})
               (target :dir #{"target"})
               (wait)))

djebbz15:07:50

I keep having this error : "[...] Could not locate rum_bug_class/browser__init.class or rum_bug_class/browser.clj on classpath. [...]"

djebbz15:07:23

As if boot (or something) couldn't get my cljs namespace since boot is a clj file. No ?

djebbz15:07:25

My bad, perfectly feasible, i messed with namespace names...

gonewest81815:07:36

@andrea.crotti - this worked for me. In an emacs buffer:

#!/usr/bin/env boot
(set-env! :dependencies '[[com.rpl/specter "1.0.2"]])
(require '[com.rpl.specter :as specter])

(defn -main [& args]
  nil)
I had to M-x clojure-mode in that buffer too.

gonewest81816:07:14

Then from a shell boot repl, and then in emacs M-x cider-connect with whatever port the boot repl started on. Finally, in the emacs buffer you can C-c C-k to load the buffer into the repl, or equivalently (load-file "script-file")

gonewest81816:07:45

In the repl you have boot commands and proving specter symbols are there too:

boot.user> (doc boot)
-------------------------
boot.core/boot
([& argv])
  The REPL equivalent to the command line 'boot'. If all arguments are
  strings then they are treated as if they were given on the command line.
  Otherwise they are assumed to evaluate to task middleware.
nil
boot.user> (doc specter/collect)
-------------------------
com.rpl.specter/collect
  Adds the result of running select with the given path on the
          current value to the collected vals.
nil
boot.user>

andrea.crotti16:07:34

ah I see great thanks @gonewest818

andrea.crotti16:07:48

in the end I just created a project this time but I'll try that instead next time

gonewest81817:07:43

Cool. I half heartedly tried to find a way to cider-jack-in for extra convenience but ran out of time.