Clojurians
#dirac
<
2016-01-28
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

frank15:01:38

does anything special need to be done to upgrade to 0.1.2?

frank15:01:42

my code no longer compiles :confused:

darwin15:01:14

I’m not aware of anything

frank15:01:27

0.1.1 doesn't work for me either

darwin15:01:06

just what I wrote into release notes, you don’t have to specify all deps dirac needs, they are bundled in the jar

darwin15:01:16

but that was the case since beginning

frank15:01:17

removing the dependencies didn't help :confused:

frank15:01:33

23:54:06 figwheel.1 | Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Tuple, compiling:(cljs/repl.cljc:1:1)
23:54:06 figwheel.1 | 	at clojure.lang.Compiler.load(Compiler.java:7239)
23:54:06 figwheel.1 | 	at clojure.lang.RT.loadResourceScript(RT.java:371)
23:54:06 figwheel.1 | 	at clojure.lang.RT.loadResourceScript(RT.java:362)
23:54:06 figwheel.1 | 	at clojure.lang.RT.load(RT.java:446)
23:54:06 figwheel.1 | 	at clojure.lang.RT.load(RT.java:412)
23:54:06 figwheel.1 | 	at clojure.core$load$fn__5448.invoke(core.clj:5866)
23:54:06 figwheel.1 | 	at clojure.core$load.doInvoke(core.clj:5865)
23:54:06 figwheel.1 | 	at clojure.lang.RestFn.invoke(RestFn.java:408)
23:54:06 figwheel.1 | 	at clojure.core$load_one.invoke(core.clj:5671)
23:54:06 figwheel.1 | 	at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
23:54:06 figwheel.1 | 	at clojure.core$load_lib.doInvoke(core.clj:5710)
23:54:06 figwheel.1 | 	at clojure.lang.RestFn.applyTo(RestFn.java:142)
23:54:06 figwheel.1 | 	at clojure.core$apply.invoke(core.clj:632)
23:54:06 figwheel.1 | 	at clojure.core$load_libs.doInvoke(core.clj:5749)
23:54:06 figwheel.1 | 	at clojure.lang.RestFn.applyTo(RestFn.java:137)
23:54:06 figwheel.1 | 	at clojure.core$apply.invoke(core.clj:632)
23:54:06 figwheel.1 | 	at clojure.core$require.doInvoke(core.clj:5832)
23:54:06 figwheel.1 | 	at clojure.lang.RestFn.invoke(RestFn.java:3204)
23:54:06 figwheel.1 | 	at figwheel_sidecar.repl$eval9$loading__5340__auto____10.invoke(repl.clj:1)
23:54:06 figwheel.1 | 	at figwheel_sidecar.repl$eval9.invoke(repl.clj:1)
23:54:06 figwheel.1 | 	at clojure.lang.Compiler.eval(Compiler.java:6782)
23:54:06 figwheel.1 | 	at clojure.lang.Compiler.eval(Compiler.java:6771)
23:54:06 figwheel.1 | 	at clojure.lang.Compiler.load(Compiler.java:7227)
...

frank15:01:57

I realize it says figwheel, but this doesn't happen on dirac 0.1.0

darwin15:01:21

did you upgrade to the latest figwheel? with that dependency fix I linked?

darwin15:01:52

also make sure you don’t have mixed Clojure 1.7 and 1.8 deps, that Tuple thing could be confusion between clojure versions

frank15:01:36

does 0.1.2 require clojure 1.8?

darwin15:01:55

yes, I think

darwin15:01:28

yes, it has scope “provided”

darwin15:01:24

I wonder why you are having problems with figwheel_sidecar, do you include dirac agent in your figwheel repl?

frank15:01:21

I don't think so

darwin16:01:15

where does that figwheel_sidecar come from? this is not dirac agent, is it your code?

frank16:01:47

this is me trying to compile the code with the lein figwheel command

frank16:01:05

anyhow, it looks like upgrading to clojure 1.8 solved the problem

frank16:01:24

although I'm not sure if I can safely upgrade the clojure version on the project :disappointed:

darwin16:01:55

dirac has scope “provided” so it should inherit your clojure version, if specified

darwin16:01:14

try lein deps :tree

darwin16:01:33

and see who is depending on what and what version wins

frank16:01:54

I don't see clojure 1.8 anywhere in the output :confused:

frank16:01:01

not sure what this bit of the output means:

[org.clojure/clojure "1.7.0" :exclusions [[org.clojure/clojurescript] [org.clojure/clojure]]]

frank16:01:37

looking at the history, I'm inclined to believe that the clojure version change is causing this

frank16:01:56

since that change was made between 0.1.0 and 0.1.1

frank16:01:02

which is the same point where this is breaking for me :disappointed:

darwin16:01:55

ok, where you include dirac, try to put org.clojure/clojure into :exclusions

darwin16:01:17

so you don’t bring dirac’s clojure and you use your own

frank16:01:20

I seem to be able to reproduce this on the demo project when I change the clojure version to 1.7.0 as well

frank16:01:35

I tried putting org.clojure/clojure into exclusions but that didn't seem to work :disappointed:

darwin16:01:59

ok, I’m going to try it here

darwin16:01:03

on the demo project

jaen16:01:39

@frank: a shot in the dark, but are you sure you have the appropriate Chrome plugin version?

jaen16:01:15

When I updated dirac to 0.1.2 but I forgot about plugin the REPL was hanging on connect and I later noticed NPEs in logs.

jaen16:01:03

Also Tuple? I thought it had been rejected.

frank16:01:40

I haven't had the chance to test the chrome plugin yet since upgrading

frank16:01:56

still at the point where I'm trying to compile the cljs

darwin16:01:19

I’m able to reproduce it here

frank16:01:42

ah ok good to know I'm not crazy :simple_smile:

darwin16:01:19

how the hell can I figure out what is introducing a dependency displayed in lein deps :tree

jaen16:01:22

Doesn't what's it child of introduce it? Though it's been a while since I've used lein deps tree

darwin16:01:37

I think this has to do something with how dirac bundles all deps into “uberjar” althought I never told lein to do that

darwin16:01:13

it looks the code is AOTed wiht Clojure 1.8 or something and it crashes when included into environment with Clojure 1.7 (my theory)(

darwin16:01:42

I will try to prepare a new release with dirac sources only, didn’t have energy yesterday to investigate this

darwin16:01:18

I used lein jar and lein deploy clojars which works just fine in my other projects

darwin17:01:35

that :main causes bundling all dependencies and AOTing them inside dirac.jar

darwin17:01:15

that is why 0.1.0 worked for your @frank, and 0.1.1 does not

darwin17:01:31

I’m going to cut a new release without all the crap,

darwin17:01:16

I did spot the huge jar files size of 0.1.2, but I compared it only to 0.1.1, not to 0.1.0 - otherwise I would spot the difference

frank17:01:23

looking forward to it!

darwin17:01:11

just pushed it to clojars, bump dirac version to 0.1.3 and it should work

darwin17:01:50

works for me in the demo project with both 1.7 and 1.8

darwin17:01:23

now when I think about it more, it makes sense, AOTed code is probably fragile (I can imagine, I’m not a java guy)

darwin17:01:18

a side note: in the demo I noticed something it bringing in dependency [org.clojure/tools.nrepl “0.2.10”], lein deps :tree does not tell me who

darwin17:01:51

there is newer version 0.2.12 (referenced by dirac) but that 0.2.10 wins for some reason

darwin17:01:13

btw. @jaen yesterday I almost switched to boot, because of inconsistency how lein deals with “checkouts” dependencies, I needed to read my project version during runtime and it is non-trivial task to achieve, and impossible when you want to use checkouts dependencies

darwin17:01:08

but then I realized rewriting all my project.clj files would take me several hours, maybe days with learning boot, so I decided to do it dirty way: have version in multiple places and use some bash scripts to keep them in sync: https://github.com/binaryage/dirac/blob/master/scripts/update-versions.sh

jaen17:01:59

Hah, I think it's for example what Clojurescript does as well - just has a script to update versions when building.

jaen17:01:51

But yeah, rewriting the project file into a boot build script might have taken a while, but if you feel compelled to try it now, then Modern Cljs series is a really good introduction.

darwin17:01:57

I will switch eventually. boot’s design is great.

darwin17:01:44

also I like how they deal with “checkouts deps” feature, you can watch dependency project and continuously install it into local maven repo on every change, other boot watch task can trigger rebuild when that dependency changes

darwin17:01:00

this way you get exact behaviour like it would be installed by hand or from clojars

darwin17:01:25

not some “emulation” by parsing dependencies’ project.clj files like lein does

jaen17:01:07

I think they are not 100% satisfied with that, since I remember some talk about making checkout deps better, but not sure what's the plan exactly.