liquidz / antq

Point out your outdated dependencies.
Other
403 stars 25 forks source link

Execution error (ClassCastException) in java.clj #174

Closed scarytom closed 2 years ago

scarytom commented 2 years ago

I am getting the following intermittent failure:

Execution error (ClassCastException) at antq.diff.java/eval13264$fn$fn (java.clj:87).
class clojure.lang.ExceptionInfo cannot be cast to class java.lang.CharSequence (clojure.lang.ExceptionInfo is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')

I am running antq through deps.edn with the following alias definition:

:outdated {:replace-deps {}
           :extra-deps   {com.github.liquidz/antq {:mvn/version "1.9.863"}
                          org.slf4j/slf4j-simple  {:mvn/version "1.7.36"}}
           :main-opts    ["-m" "antq.core" "--upgrade" "--force"]}
:eastwood {:extra-paths ["src/test/clojure" "src/dev/clojure"]

I'm sorry that I don't have a reproducible test case for this yet, but I will update the issue if I discover anything more.

scarytom commented 2 years ago

Looking at the code, it seems that the latest-version variable must contain an ExceptionInfo instead of a String. I presume something earlier on is failing intermittently, leading to this exception being generated -- it probably shouldn't have been allowed to propagate this far though.

liquidz commented 2 years ago

@scarytom Sorry for late reply. I've reproduced the problem with ANTQ_MAVEN_TIMEOUT=1. cf. https://github.com/liquidz/antq/blob/main/doc/timeout.adoc

As you said latest-version had a timed out exception, so I fixed it in dev branch. Could you try?

scarytom commented 2 years ago

I have tried this out and it appear to fix the issue, thanks.

scarytom commented 2 years ago

I just bought you a coffee on ko-fi.com, hope you enjoy it.

liquidz commented 2 years ago

@scarytom Thank you so much! Just released v1.9.867.