Fork me on GitHub
#boot
<
2015-11-24
>
fred13:11:20

hi, a hopefully simple question : I need to setup a clojure env. "offline" (I mean I am behind a proxy and can't install a local repo). So basically I would ike to manage the .jar dependency myself in lib/. I took a look at boot and it seems really nice and flexible, could it be the solution for me here?

martinklepsch13:11:55

@fred: how do you mean you can’t install a local repo?

martinklepsch13:11:21

do you mean you can’t write files to ~/.m2 or you that you cannot download things from clojars?

fred13:11:38

both unfortunately 😞

fred13:11:06

so I can import a .m2 but I would need to specify a custom path..

martinklepsch13:11:00

running out of battery …:) good luck

fred13:11:07

thanks 😉

micha14:11:45

@fred: you can also use the -cp java option

micha14:11:33

eg.

BOOT_JVM_OPTIONS='-cp lib/foo.jar:lib/bar.jar' boot repl

micha14:11:35

i think martin's solution is probably better than that though

alandipert14:11:51

@fred: another option is boot.pod/add-classpath, e.g. (boot.pod/add-classpath "lib/foo.jar")

fred15:11:52

thanks @micha @alandipert the thing is I am still struggling to start a simple boot.exe repl because I guess it needs to find everything he wants in .boot and .m2 The good news is now I have those two folders in my home directory (for some reason powershell were telling me I did not have the right but cmd.exe did not complain ??)

pleasetrythisathome16:11:14

morning everyone. i'm trying to get figwheel to run with boot, and i'm having a rather intractable dependency issue

pleasetrythisathome16:11:25

clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: cljs.closure/lib-rel-path, compiling:(figwheel_sidecar/build_middleware/javascript_reloading.clj:26:14)

pleasetrythisathome16:11:35

i see a Warning: version conflict detected: org.clojure/clojurescript version changes from 0.0-3165 to 1.7.170

martinklepsch16:11:41

sounds like a cljs compiler mismatch

pleasetrythisathome16:11:49

which seems to happen if i just include cljs 1.7.170 at all

pleasetrythisathome16:11:18

full block of version changes is

pleasetrythisathome16:11:28

Warning: version conflict detected: org.clojure/clojure version changes from 1.6.0 to 1.7.0
Warning: version conflict detected: org.clojure/google-closure-library version changes from 0.0-20140718-946a7d39 to 0.0-20151016-61277aea
Warning: version conflict detected: org.clojure/clojurescript version changes from 0.0-3165 to 1.7.170
Warning: version conflict detected: org.clojure/google-closure-library-third-party version changes from 0.0-20140718-946a7d39 to 0.0-20151016-61277aea
Warning: version conflict detected: com.google.javascript/closure-compiler version changes from v20150126 to v20151015
Warning: version conflict detected: org.clojure/tools.reader version changes from 0.9.2 to 0.10.0-alpha3

martinklepsch16:11:33

@pleasetrythisathome: does 3165 show up in boot show -d?

martinklepsch16:11:12

@pleasetrythisathome: besides all that, is there a reason you don’t use boot-reload? simple_smile

pleasetrythisathome16:11:26

i do currently. but i have 5 different cljs builds, and the compile time is pushing 10 seconds

pleasetrythisathome16:11:45

and my cljs repl broke sometime recently, so wanted to see if i could get figwheel to work

pleasetrythisathome16:11:47

ah i got it. it was a dependency in my profile.boot i was overlooking, not quite sure which yet

micha16:11:46

boot show -p

micha16:11:50

will explain

pleasetrythisathome16:11:38

woah what is the -p?

martinklepsch16:11:52

@pleasetrythisathome: for speed improvements you could try building boot from master, there are lots of performance improvements simple_smile

micha16:11:53

it explains how the deps you have got there

micha16:11:29

show -p prints out all your version conflicts and how the final deps were selected

pleasetrythisathome16:11:39

of course you guys thought about this already

pleasetrythisathome16:11:43

i should've asked earlier

pleasetrythisathome16:11:39

it seems to be a piggieback problem

micha16:11:39

if you build from master you can get deps reports for each pod individually also

micha16:11:51

in case the deps problem is in a worker pod

pleasetrythisathome16:11:05

excluding both clojure and clojurescript seems to fix the issue

micha16:11:32

you should specify your own clj and cljs deps in your bild.boot

micha16:11:49

otherwise you'll end up with issues like this all the time

pleasetrythisathome16:11:26

this is the first time it's been an issue. i don't really understand why my top level override didn't prevent the issue

onetom16:11:42

@micha: what's your opinion on https://github.com/stuartsierra/component ? as i recall u were not a fan, but i might remember wrong

micha16:11:03

@onetom: i've always just used boot tasks for that

micha16:11:48

the info the various services needs that have to be configured per environment come from environment variables

micha16:11:51

danielsz made a cool boot setup for system

micha16:11:00

you should check that out

onetom16:11:29

but that builds on stuartsierra/component 😕

dm316:11:29

I recall the term "coconut lisp" being used - sounded intriguing simple_smile

dm316:11:35

what's the definition?

alandipert16:11:55

@dm3: have you seen "gilligan's island", the TV show?

alandipert16:11:14

it is a US tv show from the 60s

dm316:11:21

make a nuclear reactor from a couple of coconuts

alandipert16:11:22

anyway, the premise is a group of people are stranded on an island

alandipert16:11:43

one of them, "the professor", is always inventing things in attempts to get them off the island

alandipert17:11:07

and he is successfull at inventing things... all kinds of crazy things. flying machines, boats, electricity generators... all made from coconuts and bamboo and lashings

alandipert17:11:19

but he is never successful in actually getting them off the island

alandipert17:11:59

so something that is "coconut" could be impressive and complex, but doesn't actually get us off the island

micha17:11:13

@onetom: yes, you were asking about Component, danielsz's library lookspretty great for trying it out simple_smile

onetom17:11:36

im not super convinced that i want to try it out, but im afraid if i want some test coverage and fast test runtimes i better structure our app using component

onetom17:11:27

i guess u r getting by without it, just with boot tasks on their own because u dont have a lot of integration and/or unit tests, or do u?

micha17:11:12

yeah probably not as many as you have

onetom17:11:01

well, we still don't have much, but we are reaching that size when we can't go fast reliably without tests, especially having 3 pairs working in parallel

donmullen17:11:37

@onetom: This is worth investigating I think : http://www.dotkam.com/2015/11/12/managing-clojure-app-state-since-reset/ (article describing why mount - https://github.com/tolitius/mount - was built)

onetom17:11:11

and that size is actually only 2.5kLoC backend & 7kLoC frontend

donmullen17:11:20

I have not used it - but intuitively feels better than full-on component

onetom17:11:34

donmullen: thx

pleasetrythisathome17:11:28

well i abandoned getting figwheel to work, but fixing that dep issue fixed my cljs repl

pleasetrythisathome17:11:41

so everything's swell now

martinklepsch17:11:56

@pleasetrythisathome: if you have a few spare minutes give master a try, would be curious how it affects your build times

martinklepsch17:11:27

@pleasetrythisathome: also are you calling the cljs task multiple times or do you just have multiple .cljs.edn files?

pleasetrythisathome17:11:23

multiple .cljs.edn

pleasetrythisathome17:11:00

i'll try master at some point today

pleasetrythisathome17:11:40

still, the difference between a few seconds and sub second is rather large....and i've always been over a second with boot vs figwheel (or cljsbuild)

martinklepsch17:11:02

@pleasetrythisathome: performance has been a problem admittedly. In my experience though things are pretty close most of the time. I’d guess in your case with multiple builds boot-cljs might even be faster than figwhell/lein-cljsbuild

pleasetrythisathome20:11:49

@martinklepsch: yea possible. it'd be great to have a white/blacklist of cljs.edn builds passed into the build task. generally when developing i'm only really working on one at a time

martinklepsch20:11:48

id is always path of the .cljs.edn file in classpath/fileset minus extension

pleasetrythisathome20:11:52

and that overrides the set of .cljs.edn files?

jaen20:11:49

Hmm, I'm getting a #object[RangeError RangeError: Maximum call stack size exceeded] error when I a) require something in clsj repl, b) disconnect, c) reload page, d) connect again. Is this a known issue?

danielsz23:11:30

I was so busy with work that I missed two boot-clj releases simple_smile

danielsz23:11:48

Upgraded to 2.4.2. So happy with this fix https://github.com/boot-clj/boot/issues/298

juhoteperi23:11:54

Oh, nice. Haven't tried Cider snapshot yet but good to know that that problem has been fixed.