Fork me on GitHub
#boot
<
2015-07-11
>
petrus08:07:47

@micha: hahaha

meow17:07:14

aaarrrrgggghhhhhh!!!!!

meow17:07:41

so I'm trying to use a cljs library and it messed up my project

meow17:07:01

it's developed using lein

meow17:07:08

and it looks to me like lein added into the pom.xml file all the dependencies that existed in :profiles :dev, none of which are actually needed

micha17:07:14

it's going to be all right simple_smile

meow17:07:52

so now my project is forced to download and use all these old versions that conflict with my project

micha17:07:58

you can use :exclusions there

micha17:07:44

(set-env! :dependencies '[[some/bad-dependency "1.2.3" :exclusions [some/other-dep some/other-other-dep]]])

meow17:07:46

am I understanding this situation correctly? its a mess!

meow17:07:53

@micha: I don't feel like I should have to work around this other library's requirements

meow17:07:15

so frustrating

meow17:07:52

unless I'm being stupid this feels like a royal pita

meow17:07:32

is mr. garden around?

micha17:07:53

which deps are a problem tere?

meow17:07:41

nrepl, piggieback, weasel

meow17:07:31

piggieback is failing

meow17:07:37

Adding :require adzerk.boot-reload to app.cljs.edn...
clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No single method: _setup of interface: cljs
.repl.IJavaScriptEnv found for function: -setup of protocol: IJavaScriptEnv, compiling:(cemerick/piggieback.clj:148:5)
     java.lang.IllegalArgumentException: No single method: _setup of interface: cljs.repl.IJavaScriptEnv found for funct
ion: -setup of protocol: IJavaScriptEnv

meow17:07:57

@noprompt: got a minute? I'm having trouble with phalanges

meow17:07:36

joel isn't online right now 😞

meow17:07:42

phalanges is just a simple cljs library - it shouldn't be requiring all that other stuff

meow17:07:17

but I guess that's just the way it works

micha18:07:02

i don't see dependencies in phalanges really

micha18:07:11

they're all :scope test

micha18:07:23

so they won't be pulled in transitively

micha18:07:30

pkobrien: ^^

meow18:07:02

I guess what I don't understand it this. I've been working on this code for days with no problems. Now I added phalanges and suddenly when I compile I see old versions of lots of libraries being downloaded from clojars and my compile fails.

meow18:07:55

I just deleted my entire local maven repo, compiled poly with the phalanges dependency, compiled my app, same error

micha18:07:57

you can try boot show -p before and after adding the phalanges dep

micha18:07:26

that will show you which transitive deps are in contention

micha18:07:45

and which project dep is pulling the transitive ones in

micha18:07:36

but i don't see what the problem could be because the 1.6.0 release has only one dependency as far as i can see in the pom, a dep on org.clojure/clojure

micha18:07:48

which you probably already have as a dep in your project

micha18:07:53

oh, there is also a dep on com.cemerick/austin

micha18:07:59

that could be the problem

micha18:07:22

austin would be interfering with piggyback i bet

meow18:07:53

not sure how to interpret boot show -p

micha18:07:16

the top level is the contended transitive dep

meow18:07:24

for poly it is small:

[!] org.clojure/clojure
    ? 1.5.1
      spellhouse/phalanges
    ? 1.4.0
      org.clojure/core.async

micha18:07:34

the next level are the different versions that could be candidates

micha18:07:49

the one that's checked is the one that was chosen

micha18:07:14

the deps under the version are the depenedncies of your project that pull that version in transitively

micha18:07:36

you don't see an actual ? there do you?

meow18:07:18

yes, in my windows shell there is a ?

micha18:07:36

oh that's lame

micha18:07:56

windows shell doesn't do unicode?

micha18:07:34

try [spellhouse/phalanges "1.6.0" :exclusions [com.cemerick/austin]] in your deps

meow18:07:59

yep. that fixed it

meow18:07:22

@micha: you rock - here's yer 🍻

micha18:07:54

that dependency should probably be :scope test in phalanges

micha18:07:06

or :scope provided if it needs it at runtime

meow18:07:51

all of the dependencies should be :scope test

micha18:07:10

yeah unless they're needed to compile

meow18:07:57

what is there to compile? its a cljs library

meow18:07:04

so its just source code, right?

micha18:07:21

it could depend on cljs namespaces in austin for example

meow18:07:28

the only true dependency it has is on goog closure

micha18:07:33

or a cljs macro could depend on a clojure function in austin

meow18:07:36

which is builtin

meow18:07:49

no, it has none of that

micha18:07:01

in that case definitely :scope test

meow18:07:06

that's just there to support the use of figwheel as a dev

micha18:07:49

joel would be receptive to pull request i'm sure

meow18:07:54

that's why I found it so frustrating - its complecting the library with the developer's work environment

micha18:07:08

yeah an oversight probably

meow18:07:45

I agree and if I was more comfortable with lein I'd probably do a PR

micha18:07:06

it actually looks like a bug in lein maybe

meow18:07:13

I also notice that even garden doesn't scope out its dependencies properly

meow18:07:40

or, yeah, a lein bug that it puts those dev profile dependencies into the pom.xml as regular deps

meow18:07:10

seems odd that I'd be the first person to complain about such things, though

micha18:07:31

it did the right thing with all the other deps though

micha18:07:44

somehow it left off the test scope for austin

meow18:07:10

oh, did it? I didn't look close enough I guess

micha18:07:21

probably one of the lein plugins messed with the project map and added austin

micha18:07:36

my money is on piggieback or figwheel for that

micha18:07:19

actually who knows lol

meow18:07:33

ok, now I see the <scope>test</scope> in the pom.xml file

micha18:07:50

all but austin, pretty weird

micha18:07:05

and the project.clj only has one dependency

micha18:07:15

so i don't think you can fix it by changing project.clj

meow18:07:29

so I need to apologize for jumping on @noprompt - sorry, Joel!!!

meow18:07:58

yeah, austin in garden 1.2.5 is <scope>test</scope>

meow19:07:58

testing key events in the browser is fun, especially when you hit the wrong keys and close the browser...

martinklepsch19:07:53

Someone used boot at ClojureBridge Berlin!

micha19:07:19

looks like fun!

meow19:07:40

I use boot to solve all my problems

meow19:07:57

(with lots of help from micha and co.)

micha19:07:13

hahaha 🍻

meow19:07:24

cheers 🍻