weavejester / hashp

A better "prn" for debugging
MIT License
439 stars 23 forks source link

JDK 11 + lein: ClassNotFoundException and NoClassDefFoundError due to ffip.ednize in standalone repl #5

Open j-cr opened 4 years ago

j-cr commented 4 years ago

Version: [hashp "0.1.0"]

~> lein version
Leiningen 2.9.1 on Java 11.0.5 OpenJDK 64-Bit Server VM
~> lein repl
<...>
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
<...>
user=> (require 'hashp.core)
Syntax error (ClassNotFoundException) compiling at (ednize.clj:1:1).
java/sql/Timestamp
user=> (require 'hashp.core)
Syntax error (NoClassDefFoundError) compiling at (ednize.clj:1:1).
Could not initialize class clojure.instant__init

Note that I can't reproduce it without lein:

~> clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0"} hashp {:mvn/version "0.1.0"}}}'
Clojure 1.10.0
user=> (require 'hashp.core)
nil
user=> #p 42
#p[user/eval1865:] 42
42

Or when repl is run from a project dir:

~/in/project/dir> lein repl
<...> 
user=> (require 'hashp.core)
nil
user=> #p 42
#p[user/eval3255:1] 42
42
j-cr commented 4 years ago

Correction: actually, the clojure version doesn't matter. The issue is only present in standalone repl. The issue isn't present if lein repl is run from a project dir.

weavejester commented 4 years ago

Possible duplicate of #3.

j-cr commented 4 years ago

I thought it might be related too, but bumping the dependency didn't help with this issue.