Fork me on GitHub

@alexmiller It seems like the Clojure Spec 1 alpha JAR is compiled against Java 1.5 (class file version 49). Is that intentional? It seemed a bit odd now that Clojure itself targets Java 1.8 (class file version 52).

Alex Miller (Clojure team)01:04:39

Which version in particular?


this is what's on my class path: spec.alpha-0.2.176.jar


i took a look at the pom.xml ( file for spec.alpha and the absence of <target.version>1.8</target.version> in the <properties> section seems to confirm that.

Alex Miller (Clojure team)01:04:50

Iā€™m not at a computer but certainly older versions of the parent pom could have produced that


I see. I was experimenting with and noticed the following warning and figured I should at least let you know:

OpenJDK 64-Bit Server VM warning: Pre JDK 6 class not supported by CDS: 49.0 clojure/spec/alpha/Spec
Preload Warning: Cannot find clojure/spec/alpha/Spec

Alex Miller (Clojure team)01:04:14

There is a newer version that I suspect is newer bytecode. - 0.2.187

Alex Miller (Clojure team)02:04:14

Spec was introduced in the same release that bumped to java 1.8 bytecode and it took a while for the contrib libs to catch up


ah, i see. it appears that the release version 1.10.1 of the clojure.jar still depends on the version that i have:

Alex Miller (Clojure team)02:04:51

You can add an explicit dependency on the newer spec.alpha version to override


yep, i'll go with that. thank you.


ok, reporting back here. it turns out [org.clojure/spec.alpha "0.2.187"] is compiled against java 1.5 as well.


Confirmed, if I'm reading this right. class version 49 for spec.alpha 0.2.187, but class version 52 for clojure itself. The latter is Java 8.


spec version 1 or version 2, that is the question šŸ™‚ My default assuming is spec 1 I am starting a new project, which I will mainly use spec for data structures I design and pass to functions as arguments. Its a data science visualisation project so there is a lot of data. I will also write specs for the functions that for the API for each namespace. Just checking that I am not missing an obvious benefit of using spec 2. Thank you.


1 for sure. v2 seems still wip, especially fn annotations which apparently will be improved/modified

šŸ‘ 4

Spec 2 is experimental and subject to breaking change


So unless you are doing this for fun, go with Spec 1

šŸ‘ 4