Fork me on GitHub
#tools-deps
<
2018-10-18
>
pauld11:10:04

How can I debug the clj tool chain? clj hangs when I put org.openjfx/javafx-graphics {:mvn/version "11"} in the deps.edn file.

gfredericks11:10:28

did it successfully download the jar?

bronsa12:10:20

I see a massive cpu spike after clj finishes downloading the artifact

pauld12:10:09

I don't know. I can get it working it boot, so boot was able to download the jar.

pauld12:10:52

maybe I need to wait longer? Still it works just fine in boot, so there is some issue here with the clj tool.

bronsa12:10:45

it looks to me like there's some infinite loop during dependency resolution

mpenet12:10:10

The latest clj should fix that

mpenet12:10:26

At least there was an issue related to this

bronsa12:10:42

yeah I remember that, but I'm on latest tools.deps

mpenet12:10:50

TDEPS-79

✔️ 4
bronsa12:10:56

at clojure.lang.APersistentVector.hasheq(APersistentVector.java:162)
	at clojure.lang.Util.dohasheq(Util.java:177)
	at clojure.lang.Util.hasheq(Util.java:168)
	at clojure.lang.PersistentHashMap.hash(PersistentHashMap.java:120)
	at clojure.lang.PersistentHashMap.valAt(PersistentHashMap.java:152)
	at clojure.lang.PersistentHashMap.valAt(PersistentHashMap.java:156)
	at clojure.lang.RT.get(RT.java:753)
	at clojure.core$get.invokeStatic(core.clj:1492)
	at clojure.core$get.invoke(core.clj:1486)
	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
	at clojure.core$reduce1.invokeStatic(core.clj:934)
	at clojure.core$get_in.invokeStatic(core.clj:6062)
	at clojure.core$get_in.invoke(core.clj:6062)
	at clojure.tools.deps.alpha$excluded_QMARK_.invokeStatic(alpha.clj:87)
	at clojure.tools.deps.alpha$excluded_QMARK_.invoke(alpha.clj:83)
	at clojure.tools.deps.alpha$include_coord_QMARK_.invokeStatic(alpha.clj:113)
	at clojure.tools.deps.alpha$include_coord_QMARK_.invoke(alpha.clj:106)
	at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:180)
	at clojure.tools.deps.alpha$expand_deps.invoke(alpha.clj:165)
	at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:228)
	at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:210)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invokeStatic(make_classpath.clj:59)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invoke(make_classpath.clj:52)
	at clojure.tools.deps.alpha.script.make_classpath$run.invokeStatic(make_classpath.clj:70)
	at clojure.tools.deps.alpha.script.make_classpath$run.invoke(make_classpath.clj:64)
	at clojure.tools.deps.alpha.script.make_classpath$_main.invokeStatic(make_classpath.clj:109)
	at clojure.tools.deps.alpha.script.make_classpath$_main.doInvoke(make_classpath.clj:84)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)

bronsa12:10:09

here's a thread dump as clj hangs

bronsa12:10:02

oh that ticket hasn't been resolved yet @mpenet

bronsa12:10:09

so maybe it's exactly that

mpenet12:10:25

Patched was applied tho i think

pauld12:10:15

I'm using .397

bronsa12:10:27

it's been reverted @mpenet

Alex Miller (Clojure team)12:10:27

It was accidentally applied - I am working on alternate patch

👍 4
Alex Miller (Clojure team)13:10:41

@pauld can you drop a comment on TDEPS-79 with your deps.edn so I can double-check it is the same thing?

hlolli16:10:21

part java question, part tools.deps question. I'm trying to leverage the git/url dep functionality on this java repo my dep looks like this

com.kunstmusik/CsoundJNA {:git/url ""
                          :sha "a717dc3af6bf268b2962cac854d3fa9c0e2901a9"}
it's downloaded to ~/.gitlibs and is added onto the classpath, all good there. But the importing is the tricky part, knowing little about java, could it be that the pom.xml file is ignored or is missing some information, https://github.com/kunstmusik/CsoundJNA/blob/master/pom.xml or is my import on the java class wrong?
(:import [com.kunstmusik.csoundjna CsoundJNA])
in my deps.edn file I have this as well
org.clojure/tools.deps.alpha {:mvn/version "0.5.460"}

Alex Miller (Clojure team)16:10:02

you can’t use a Java dep like this as something has to compile the java file to a class file. For that, you either need a build tool or an artifact with compiled classes in it.

Alex Miller (Clojure team)16:10:32

git deps are only going to be useful with Clojure source only (which does not require a build)

hlolli16:10:38

ah, I understand now. Thanks @alexmiller! I'll ask my friend to just publish it to maven, probably easier 🙂

basti18:10:14

Is there a way to check for the latest version of dependencies defined in deps.edn?

dominicm18:10:51

Tool named depot by olical @basti

👌 4
basti18:10:41

Thanks I’ll check it out!

seancorfield19:10:03

Why does (reader/clojure-env) care about actually building a classpath?

seancorfield19:10:01

Background: we use an env var for CLJ_CONFIG so we have a known "baseline" for aliases and override-deps etc; but our actual deps require an alias -- -Adefaults -- to resolve since they all have {} for the coords and the actual versions are provided by the alias and :override-deps. So we can run

CLJ_CONFIG=../versions clojure -Adefaults -Sdescribe
but if we omit the alias, (reader/clojure-env) blows up with
Error building classpath. Coordinate type  not loaded for library selmer/selmer in coordinate {}
Because of course we can't pass the alias into the clojure-env shell call to clojure -Sdescribe

seancorfield19:10:06

@alexmiller Is there a reason that describe needs to build the classpath? If so, would you be open to a patch to allow additional arguments to be passed into clojure-env to support required aliases etc?

dominicm19:10:17

I think I was supposed to open a ticket for that, sorry

seancorfield19:10:18

Looks like it fails because it thinks it is "stale" and therefore runs the classpath generation code.

Alex Miller (Clojure team)19:10:32

@seancorfield there is a ticket for this already (and no, I don’t think so)

seancorfield19:10:15

Yup, confirmed. I modified my local clojure script to set stale=true when describe is true, and also set cp= to avoid loading the (possibly non-existent) .cpcache file, and then clojure-env runs as expected in my environment.

seancorfield21:10:24

I attached a patch to that ticket matching what I changed locally to make that work @alexmiller /cc @U09LZR36F

seancorfield16:10:42

@alexmiller Do you think TDEPS-82 will get fixed and released "soon"? We have an "outdated dependencies" step in our build chain that we'd like to run other places that just my dev machine so we'd need an updated clojure release for that.

Alex Miller (Clojure team)18:10:00

I would like to fix TDEPS-79 and would then be happy to pull 82 along with that into a release

4
Alex Miller (Clojure team)19:10:31

thx, I just modified that yesterday, will fix

ro619:10:43

Looks like maybe the code block was supposed to end after

<servers>
  ...
  <server>
    <id>my-private-repo</id>
    <username>AWS_ACCESS_KEY_HERE</username>
    <password>AWS_SECRET_ACCESS_KEY_HERE</password>
  </server>
  ...
</servers>
but didn't.