Fork me on GitHub
#boot
<
2016-09-30
>
onetom03:09:03

@alandipert: feels like it's silly song season... https://www.youtube.com/watch?v=d9TpRfDdyU0

levitanong04:09:54

@onetom omg this song

jmglov08:09:33

I'm trying to run JUXT's Edge sample product as per the yada manual, and I get the following exception:

: [email protected]; boot dev
     clojure.lang.ExceptionInfo: null
    data: {:file "boot.user5759732373140997558.clj", :line 13}
java.lang.NumberFormatException: null
                                           ...                                       
boot.user/deduce-version-from-git/invokeStatic  boot.user5759732373140997558.clj:   9
             boot.user/deduce-version-from-git  boot.user5759732373140997558.clj:   9

jmglov08:09:22

Does anyone know what's going on? This is my first ever Boot installation.

dominicm09:09:37

@jmglov Looks like you've hit this: https://github.com/juxt/edge/issues/19

dominicm09:09:39

@jmglov I've just attached a patch to that issue which should fix your issue for now.

dominicm09:09:59

@jmglov I should have a proper fix out later today. Just want to clarify some things before I push them.

jmglov13:09:01

@dominicm Thanks! I'll try it out. 🙂

borkdude14:09:53

if you want to have a random function executed by boot from the command like, deftask is very handy - but should you also then use with-pre-wrap if you don’t build a fileset?

martinklepsch14:09:09

@borkdude it's not necessary but if you want to compose it with other tasks, either use with-pre-wrap and return a fileset or make he deftask itself return identity

borkdude14:09:09

so (deftask foo [] (println “foo!”)) or?

martinklepsch14:09:24

(deftask foo [] (println "foo!") identity)

borkdude14:09:35

Is returning identity also needed when you don’t want to compose?

martinklepsch14:09:57

no, in that case it doesn't matter

martinklepsch14:09:03

but really, just return identity 🙂

dominicm14:09:57

Is it possible to run boot.pod/with-call-in with a macro?

alandipert15:09:31

@dominicm sure, you can call macros in macros. Just need to make sure the environment the generated code runs in was started via boot. Otherwise pods aren't there

dominicm15:09:41

@alandipert maybe I messed up then. I was getting an exception about argument count.

alandipert15:09:56

If you paste code I can look

dominicm15:09:01

(pod/with-call-worker
  (boot.jgit/with-repo (.. repo describe call)))
I'm trying to create a variation of https://github.com/boot-clj/boot/blob/2816a053e04f41347382d10af3d9e5622b6f877b/boot/worker/src/boot/jgit.clj#L28-L30

dominicm15:09:10

Gives me:

clojure.lang.Compiler$CompilerException: clojure.lang.ArityException: Wrong number of args (1) passed to: jgit/with-repo, compiling:(:16:1)                 
            clojure.lang.ArityException: Wrong number of args (1) passed to: jgit/with-repo

alandipert15:09:22

Ah yes, I think you want woth-call-in

alandipert15:09:43

That one needs the first elem of list to be function, not macro

dominicm15:09:50

Oh, is with-call-worker different?

alandipert15:09:15

Yeah it's a special one for calling functions in the worker pod, vs running arbitrary code

dominicm15:09:41

Do you mean with-eval-in / with-eval-worker btw?

alandipert15:09:43

The error is because macros are functions of at least 2 args, &env and &form

dominicm15:09:18

Ah, that makes a lot of sense, never knew that. Thanks for your help. Onto git parsing madness!

dominicm15:09:07

Gah, the option I wanted is in JGit 4.0, and boot uses 3.7.

dominicm15:09:22

Nevermind, long way round we go

alandipert15:09:33

You can use your own pod

dominicm15:09:04

I can do it manually with 2/3 calls instead - seems fast still. Clj-jgit uses 3.7, and I don't fancy wrestling with updating / other libraries. If I package this up for others, I might try something like that though.

alandipert16:09:35

Cool. Yeah the pod is only really necessary if you're making a task to share

adamfrey16:09:26

I think this has been answered before, but If I have a boot task with a ...(serve)(watch)… in it running in my repl and stored in a future, how can I send an interrupt to that task in a way that the server gets shut down correctly

martinklepsch16:09:42

@adamfrey I think derefing the future and hitting ctrl+c should do that

adamfrey16:09:42

for some reason when I do that and then try starting a new server I always get "Address Already in Use” which seems like my server isn’t stopping correctly

adamfrey16:09:40

I am doing it from within cider, so that could be something

dominicm17:09:42

It might be interrupting the deref?

dominicm17:09:58

There is a kill future function, might be worth trying

dominicm17:09:09

Might be too forceful though

dominicm17:09:33

Sorry guys. Go home. I'm cancelling the future.

adamfrey18:09:09

I tried simplifying the problem a bit, and I can’t get it to work under basic circumstances. 1) Run boot repl from the terminal 2) eval a boot task with (serve)(watch) from the REPL 3) Type CTRL-C in the REPL 4) my server is still running

alandipert19:09:18

@onetom great song

martinklepsch20:09:04

@adamfrey have you tried any other tasks like serve to exclude that this behaviour is a bug in the serve task?

adamfrey20:09:18

no, is there another task you can think of that I can cancel and check if it’s still running?