Fork me on GitHub
#clojure-uk
<
2017-07-17
>
thomas08:07:27

morning 😼 mogge

jonpither08:07:44

EuroClojure is fast approaching

jonpither08:07:48

who's going?

thomas09:07:51

Looking forward to it!

thomas09:07:22

@jonpither I assume the Juxt crew is going?

jonpither09:07:13

Got our pad sorted

thomas13:07:45

could this be used to create 'native' cljs apps? https://github.com/pmq20/node-compiler

thomas13:07:56

ok... just reading the Ruby version of the tool. they just package everything in on executable and don't actually do AOT compilation by the looks of it. still quite neat though IMHO

practicalli-johnny13:07:00

I'm looking for speakers for 1st August London Clojurians talk night, at SkillsMatter as usual. One caveat is that is a strike day by Aslef so if you are travelling by Southern you probably wont make it (I'm cycling in to London these days)

maleghast13:07:19

Hello All… I am not operating at 100% today - only just figured out that I was staring at a 1-1 conversation with @dominicm and wondering why there was no traffic on #clojure-uk today… facepalm

maleghast13:07:34

Sadly I am not going the make it to EuroClojure…

maleghast14:07:24

@thomas - I’ve had some… Am limping through the day on tea…

maleghast14:07:22

Oh, anyone know who won Wimbledon, men’s and women’s?

maleghast14:07:33

(I’ve been “disconnected” all weekend)

thomas14:07:46

federer won the mens I think

thomas14:07:00

eighth time I think it said.

thomas14:07:16

no idea who won the women's 'fraid

otfrom14:07:42

Muguruza won the women's

dominicm15:07:24

Goodbye 🌴

dominicm15:07:47

Time for UK briefly.

maleghast15:07:26

Why is this happening when I try to run - boot run -p prod:

[ec2-user@ip-172-31-32-147 platform-beta]$ boot run -p prod
                              java.lang.Thread.run                       Thread.java:  748
java.util.concurrent.ThreadPoolExecutor$Worker.run           ThreadPoolExecutor.java:  617
 java.util.concurrent.ThreadPoolExecutor.runWorker           ThreadPoolExecutor.java: 1142
               java.util.concurrent.FutureTask.run                   FutureTask.java:  266
                                               ...
               clojure.core/binding-conveyor-fn/fn                          core.clj: 2020
                                 boot.core/boot/fn                          core.clj: 1030
                                               ...
                         boot.core/construct-tasks                          core.clj:  992
                                clojure.core/apply                          core.clj:  657
                                               ...
                            boot.user/eval38018/fn  boot.user2796444862284606776.clj:   33
                                               ...
                            boot.user/eval37980/fn  boot.user2796444862284606776.clj:   31
java.lang.IllegalArgumentException: no value supplied for option :prod
        clojure.lang.ExceptionInfo: no value supplied for option :prod
    file: "/tmp/boot.user2796444862284606776.clj"
    line: 55

maleghast15:07:19

It’s like I am in touching distance of getting this thing work on my “prod” server, but I need the config profile for Aero to get picked up so that the app is connecting to the right DB and ES Cluster…

Sam H15:07:27

do you get the same error if you just do boot run?

Sam H15:07:05

actually you would get the same as it defaults to :prod

Sam H16:07:11

looks like it’s due to deftask -> clifn -> split-args blowing up in the boot (`cli.clj`) I’ve not got much experience in macros (which deftask and clifn are) but for some reason it’s expecting a key value pair somewhere

seancorfield16:07:25

@maleghast Can you share your run task for that project?

Sam H16:07:12

@seancorfield I think this function may have a bug https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/cli.clj#L165 When I run boot run -p prod, arg is '("-p" :prod)

seancorfield16:07:24

How Boot deals with arguments depends on how they are declared in tasks. That's why I wanted to see @maleghast 's runtask.

Sam H16:07:34

oh I see. I was able to replicate it a version of edge I have checked out. The task is:

(deftask run [p profile VAL kw "Profile"]
  (comp
   (repl :server true
         :port (case profile :prod 5601 :beta 5602 5600)
         :init-ns 'user)
   (run-system (or profile :prod))
   (wait)))

seancorfield16:07:58

(deftask run [p profile VAL kw "Profile"]
  (println "profile" profile)
  identity)
and boot run -p prod works just fine and prints profile :prod as expected.

Sam H16:07:51

Strange, so I did a fresh checkout of https://github.com/juxt/edge I ran boot run -p prod. That gave the exception.

boot -V  =>
#
#Mon Jul 17 17:55:53 BST 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0-alpha17
BOOT_VERSION=2.7.1

Sam H17:07:14

Interesting, if define a task like you did, that prints the profile fine

seancorfield17:07:08

The error is this line in edge's build.boot I believe:

(run-system (or profile :prod))
I think it should be
(run-system :profile (or profile :prod))

seancorfield16:07:10

What version of boot is in play?

seancorfield16:07:22

(and maybe this should shift to the #boot channel?)

seancorfield17:07:08

The error is this line in edge's build.boot I believe:

(run-system (or profile :prod))
I think it should be
(run-system :profile (or profile :prod))

seancorfield17:07:37

Well, almost. run-system expects a string so it needs to be (run-system :profile (name (or profile :prod)))

seancorfield17:07:02

Yup, with that last change, it actually runs now.