clerk

teodorlu 2024-06-18T15:04:04.256489Z

Hi ๐Ÿ™‚ Are there any known issues with Clerk and Java 22?

โœ… 1
teodorlu 2024-06-18T15:04:51.809109Z

I get an error importing nextjournal.clerk on openjdk version "22.0.1" 2024-04-16:

$ java -version && clj -e "(require 'nextjournal.clerk)"
openjdk version "22.0.1" 2024-04-16
OpenJDK Runtime Environment Temurin-22.0.1+8 (build 22.0.1+8)
OpenJDK 64-Bit Server VM Temurin-22.0.1+8 (build 22.0.1+8, mixed mode)
WARNING: Implicit use of clojure.main with options is deprecated, use -M
Execution error (NoSuchMethodError) at com.oracle.truffle.api.library.LibraryFactory/ensureLibraryInitialized (LibraryFactory.java:384).
'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'

Full report at:
/var/folders/_s/yj6rk2hj0llgly4hrb906z4c0000gn/T/clojure-14581169163391728761.edn
clj -e "(require 'nextjournal.clerk)"  7.09s user 0.23s system 347% cpu 2.107 total

teodorlu 2024-06-18T15:05:09.111039Z

no errors on java 21:

$ java -version && clj -e "(require 'nextjournal.clerk)"
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode)
WARNING: Implicit use of clojure.main with options is deprecated, use -M
clj -e "(require 'nextjournal.clerk)"  13.50s user 0.45s system 328% cpu 4.240 total

Andrea 2024-06-18T17:14:05.422639Z

yes, unfortunately itโ€™s known https://github.com/nextjournal/clerk/issues/642

๐Ÿ‘ 1
Andrea 2024-06-18T17:14:11.122859Z

see temporary workaround

mkvlr 2024-06-18T18:52:49.533789Z

heh @andrea712, fortunately thereโ€™s a known workaround!

๐Ÿ˜„ 1
teodorlu 2024-06-18T20:28:25.760399Z

Ok, thanks!