The official changelog tracks deltas between major stable versions. This page gathers the interim dev release announcements during development.
-
Alpha - new feature work and enhancements in development
-
Beta - bug fixing only, no new feature work is expected
-
RC - a release candidate, which will be released as a final release unless critical issues are found
Note: All dev releases are subject to breaking changes for new work since the prior release.
-
CLJ-2924 - LazySeq - fix visibility issues with non-volatile reads
-
CLJ-2919 - Compiler - fix nested compilation emitting for keyword and protocol call sites
-
CLJ-2914 - Compiler - syntax error if qualified instance method expression is missing instance
-
CLJ-1798 - Refs - avoid creating RetryEx in LockingTransaction on every transaction
-
CLJ-2916 - LazySeq - realize before serializing and do not serialize IFn
-
CLJ-2917 - Iterate - de/serialization no longer supported, throw
-
CLJ-2899 - Revert change in semantics of qualified symbol in invocation position if field and method of same name
-
CLJ-2898 - Objects that are both IFn and FunctionalInterface unnecessarily get converted to FI
-
CLJ-2888 - gen-class - did not support new array class symbol syntax
-
CLJ-2886 - add-libs - send only procurer keys to tool invocation
-
CLJ-2906 - Add missing :added metadata to 1.12 functions
-
CLJ-2853 Reflection error incorrectly reported target object type, not qualifying class
-
CLJ-2859 Expand scope of FI adapting to include Supplier (and other 0 arg FI)
-
CLJ-2858 Fix encoding of FnInvoker method for prim-returning FIs with arity > 2
-
CLJ-2864 Stop using truthy return logic in FI adapters
-
CLJ-2863 Reflective FI dynamic proxy should use runtime classloader
-
CLJ-2770
invoke-tool- remove external process name parameter (this is a runtime property)
Enhancements:
Features:
-
CLJ-2799 - Conversion of IFn to Java functional interfaces
Fixes:
-
CLJ-2717 -
nthrestnow returns rest output on n=0 or past end of seq
Enhancements:
-
CLJ-2852 - Updated all deps, test deps, and plugin versions to latest
Reverted:
-
CLJ-2803 - #inst printer - no longer uses a ThreadLocal formatter
Features:
Fixes:
-
CLJ-2843 - Reflective calls to Java methods that take primitive long or double now work when passed a narrower boxed number at runtime (Integer, Short, Byte, Float). Previously, these methods were not matched during reflection and an error was thrown.
-
CLJ-2841 - IDeref should also implement DoubleSupplier
Fix for CVE CVE-2024-22871 detailed in GHSA-vr64-r9qj-h27f:
-
CLJ-2839 -
iterate,cycle,repeat- infinite seqs have infinite hashCode()
Features:
Enhancements:
-
CLJ-2777 -
clojure.java.process/start- add:clear-envoption to clear env vars from parent environment -
CLJ-2828 -
clojure.java.process/capture- removed, useslurpinstead -
CLJ-1162 -
deref- improve error message when called on non IDRef -
CLJ-2225 -
assertandassert- improve docstrings to add context -
CLJ-2290 -
into- add 0- and 1-arity to docstring -
CLJ-2552 -
reify- improve docstring and fix example -
CLJ-2640 -
ex-info- now handles nil data map -
CLJ-2783 - replace calls to deprecated URL constructor
Bug fixes:
-
CLJ-2804 lazy-seq, delay - To avoid running user code under synchronized blocks, replace synchronized with ReentrantLock
Bug fixes:
Fixes from work in prior 1.12.0 alpha releases:
-
CLJ-2772 drop, nthrest, nthnext - Fix regression in behavior when n != positive integer
-
CLJ-2741 drop - fix meta inappropriately retained for StringSeq
-
CLJ-2767 add-libs - Fix repl check always allows use
-
CLJ-2769 add-libs - Fix line limit issues by using stdin
-
CLJ-2773 c.j.process/[from,to]-file - fix mismatch in param and docstring
-
CLJ-2776 c.j.process/exec - fix incorrect use of redirectErrorStream
-
CLJ-2774 c.j.process/exec - fix merge order of options to allow overriding
-
CLJ-2778 c.j.process/capture - fix typo in docstring
-
CLJ-2779 c.j.process/start - remove validation checks covered by defaults
-
CLJ-2521 Reverted this fix from alpha2 as it seems to change where another bug (CLJ-2743) is seen, will revisit these in tandem
New:
Fixes in 1.12.0-alpha1 work:
Bug fixes and enhancements:
-
CLJ-2521 Compiler - Fix invalid class when nesting try/loop/try
-
CLJ-2739 ArityException - Fix message when function incorrectly called with >20 args
-
CLJ-2726 #uuid data reader - Fix exception on invalid input so it flows through reader
-
CLJ-2709 range - Use optimized range for int args
-
CLJ-2721 range - Fix invalid arg order when adding meta to non-optimized range
-
CLJ-2683 with-open - Fix to not qualify .close method on expansion
-
CLJ-2724 clojure.java.io/do-copy - Fix incorrect type hint
New:
-
CLJ-2713 Efficient drop and partition for persistent or algorithmic collections
-
CLJ-1327 Pin serialVersionUID for Clojure types to 1.10.3 values
-
CLJ-2711 Implements namespace interning policy such that interned vars in own ns cannot be replaced by refer or intern
-
CLJ-2712 Revert CLJ-1604 fix AOT bug preventing overriding of clojure.core functions
Enhancements:
-
CLJ-1872 Extend
empty?tocounted?colls that aren’t seqable, such as transients
-
CLJ-2843 - Reflective calls to Java methods that take primitive long or double now work when passed a narrower boxed number at runtime (Integer, Short, Byte, Float). Previously, these methods were not matched during reflection and an error was thrown.
Fix for CVE CVE-2024-22871 detailed in GHSA-vr64-r9qj-h27f:
-
CLJ-2839 -
iterate,cycle,repeat- infinite seqs have infinite hashCode()
-
CLJ-2701 Pin serialVersionUID for Keyword and ArraySeq back to 1.10.3 values to retain binary serialization
-
CLJ-2690 Improve
iterationdocstring and arg names -
CLJ-2689 Fix clojure.math tests to be more tolerant of floating point comparisons
-
CLJ-2685 Fix
iterationgenerative test failure -
CLJ-2529 Fix incorrect reporting of runtime errors as compiler errors in calls through
Compiler.load() -
CLJ-2620 Fix asymmetric handling of
:exception`:val`s in prepl -
CLJ-1180 Fix resolution of class type hints in
defprotocol -
CLJ-1973 Make order of emitted protocol methods in generated classes reproducible
-
Rolled back prior change for CLJ-2493
-
CLJ-2493 clojure.java.browse - Fix
browse-urlhanging on call to xdg-open (new change is more targeted and addresses more cases)
-
CLJ-2673 Add
abs, and updateminandmaxto use Math impls when possible -
CLJ-2555 Add
iterationgenerator function -
CLJ-2621 Fix unnecessary boxing of unused return in statement context for instance method expr
-
CLJ-2663 Fix vector
=not terminating when called with infinite sequence -
CLJ-2679 Fix hash collisions in
caseexpressions on symbols -
CLJ-2670 Use Math.exact… methods for checked long math ops for performance
-
CLJ-2680 Fix type hinting a primitive local with matching type hint to not error
-
CLJ-2234 Fix multimethod preferences using only global hierarchy
-
CLJ-2556 Fix
intocompletion sohalt-whenworks -
CLJ-2665 Fix require with :as and :as-alias to load
-
CLJ-2677 clojure.math - fix method reflection in bodies and inlines, fix docstrings, renamed
-
CLJ-1379 clojure.test - Fix quoting of :actual form in :pass maps
-
CLJ-2493 clojure.java.browse - Fix
browse-urlhanging on call to xdg-open -
CLJ-2611 clojure.xml - Stop processing XXE expansions by default
-
CLJ-2684 Update contrib deps to latest (spec.alpha, test.check, test.generative)
-
CLJ-2667 Add functions to parse a single long/double/uuid/boolean from a string
-
CLJ-2668 Add NaN? and infinite? predicates
-
CLJ-1925 Add random-uuid
-
CLJ-2664 Add clojure.java.math namespace, wrappers for java.lang.Math
-
CLJ-2666 Make Clojure Java API javadoc text match the example
-
CLJ-1360 Update clojure.string/split docstring regarding trailing empty parts
-
CLJ-2249 Clarify clojure.core/get docstring regarding sets, strings, arrays, ILookup
-
CLJ-2488 Add definition to reify docstring
-
CLJ-1808 map-invert should use reduce-kv and transient
-
CLJ-2065 Support IKVReduce on SubVector
-
Update dep to spec.alpha (0.3.214)
-
CLJ-2123 Add :as-alias option to require like :as but not load
-
CLJ-1959 Add implementation of update-keys
-
CLJ-2651 Add implementation of update-vals
-
CLJ-1908 Add clojure.test api run-test and run-test-var to run single test with fixtures and report
-
CLJ-1879 IKVReduce - make old slow path (IPersistentMap) faster and extend to Object, detaching it from any fully enumerable set of types
-
CLJ-2600 Don’t block realized? of delay on pending result
-
CLJ-2649 Fix order of checks in some-fn and every-pred for 3 predicate case to match other unrollings
-
CLJ-2636 Get rid of reflection on java.util.Properties when defining *clojure-version*
-
CLJ-2350 Improve keyword arity exception message
-
CLJ-2444 Fix typo in test-vars docstring
-
CLJ-1509 AOT compile more Clojure namespaces
-
CLJ-2387 Fix off-by-one in socket server port validation
-
Update dep to core.specs.alpha (0.2.62)
-
CLJ-2602 Make printing test changes platform-independent
-
CLJ-1005 Use transient map in zipmap
-
CLJ-2585 nth with not-found on regex matcher returns not-found on last group index
-
CLJ-1445 pprint doesn’t print collection metadata when
*print-meta*is true -
CLJ-2495 prepl docstring is incorrect
-
CLJ-2169 conj has out-of-date :arglists
-
CLJ-2459 ExceptionInInitializerError if jars executed with java -jar
-
CLJ-2587 Fix reflection warning in gvec from CLJ-1364
-
CLJ-2571 Add Throwable return type hint to ex-cause
-
CLJ-2572 Avoid reflection in clojure.data
-
CLJ-2295 Eliminate duplicate doc string printing for special forms
-
CLJ-2564 Improve error message for
case -
CLJ-2580 Fix case expression branch analysis that resulted in compilation error
-
CLJ-2469 Fix errors in printing some maps with namespace syntax
-
CLJ-2504 Provide more options for error reporting in clojure.main
-
CLJ-2454 - fix IllegalAccessException from invoking matching reflective call
-
CLJ-2449 - make serialized-require private
-
CLJ-2435 - include root cause class name in compilation and macroexpansion errors
Changes in 1.10.0-beta6:
-
The metadata protocol extension added in 1.10.0-beta5 now requires opt-in when the protocol is defined, using :extend-via-metadata.
-
The JavaReflector under clojure.reflect has been datafied
-
CLJ-2432 - Added clojure.core/requiring-resolve which is like
resolvebut willrequirethe symbol’s namespace if needed. -
CLJ-2427 - fix bug in CompilerException.toString() that could cause a secondary exception to be thrown while making the exception string, obscuring the original exception.
-
CLJ-2430 - more work on error phases, ex-triage, and allowing prepl to better use the new error reporting infrastructure
Changes in 1.10.0-beta5:
-
In addition to prior methods of extension, values can now extend protocols by adding metadata where keys are fully-qualified symbols naming protocol functions and values are function implementations. Protocol implementations are checked first for direct definitions (defrecord, deftype, reify), then metadata definitions, then external extensions (extend, extend-type, extend-protocol). datafy has been updated to use this mechanism.
-
symbolcan now be passed vars or keywords to obtain the corresponding symbol -
CLJ-2420 - error reporting enhancements - more refined phase reporting, new clojure.main/ex-triage split out of clojure.main/ex-str, execution errors now report the top user line in the stack trace omitting frames from core, enhancements to providing file and line via meta on a form
-
CLJ-2425 add java 11 javadoc url
1.10.0-beta4 includes the following changes since 1.10.0-beta3:
-
CLJ-2417 sort and sort-by should retain meta
1.10.0-beta3 includes the following changes since 1.10.0-RC1:
-
datafy - add :name to datafied classes and namespaces, :class to meta of all if datafied
-
CLJ-1079 - Reader should retain rather than overwrite :line :column meta on lists and seqs. Also make clojure.main bind *file* based on :file meta.
1.10.0-RC1 is the same code as 1.10.0-beta2 (just minor changelog updates).
1.10.0-beta2 includes the following changes since 1.10.0-beta1:
-
CLJ-2414 - Regression in reflectively finding default methods
-
CLJ-2415 - Error cause should always be on 2nd line of error message
-
Added clojure.datafy:
-
clojure.datafy is a facility for object to data transformation. The
datafyandnavfunctions can be used to transform and (lazily) navigate through object graphs. The data transformation process can be influenced by consumers using protocols or metadata. datafy is alpha and subject to change.
-
1.10.0-beta1 includes the following changes since 1.10.0-alpha9:
1.10.0-alpha9 includes the following changes since 1.10.0-alpha8:
-
CLJ-2374 - Add type hint to address reflection ambiguity in JDK 11
-
CLJ-1209 - Print ex-data in clojure.test error reports
-
CLJ-1120 - Add ex-cause and ex-message as in CLJS for portabile error handling
-
CLJ-2385 - Delay start of tap-loop thread (addresses graal native-image issue)
-
CLJ-2407 - Fix errors in unit tests
-
CLJ-2066 - Add reflection fallback for --illegal-access warnings in Java 9+
-
CLJ-2375 - Fix usage of deprecated JDK apis
-
CLJ-2358 - Fix invalid arity of read+string
1.10.0-alpha8 includes the following changes since 1.10.0-alpha7:
-
CLJ-2297 - PersistentHashMap leaks memory when keys are removed with
without -
CLJ-1587 - PersistentArrayMap’s assoc doesn’t respect HASHTABLE_THRESHOLD
-
CLJ-2050 - Remove redundant key comparisons in HashCollisionNode
-
CLJ-2349 - report correct line number for uncaught ExceptionInfo in clojure.test
-
CLJ-1403 - ns-resolve might throw ClassNotFoundException but should return nil
-
CLJ-1654 - Reuse seq in some
-
CLJ-1764 - partition-by runs infinite loop when one element of infinite partition is accessed
-
CLJ-2044 - add arglist meta for functions in clojure.instant
-
CLJ-1797 - Mention cljc in error when require fails
-
CLJ-1832 - unchecked-* functions have different behavior on primitive longs vs boxed Longs
-
CLJ-1366 - The empty map literal is read as a different map each time
-
CLJ-1550 - Classes generated by deftype and defrecord don’t play nice with .getPackage
-
CLJ-2031 - clojure.walk/postwalk does not preserve MapEntry type objects
-
CLJ-1435 - 'numerator and 'denominator fail to handle integral values (i.e. N/1)
-
CLJ-2257 - docstring: fix typo in
proxy -
CLJ-2332 - docstring: fix repetition in
remove-tap -
CLJ-2122 - docstring: describe result of
flattenas lazy
Clojure 1.10.0-alpha7 is now available.
1.10.0-alpha7 includes the following changes since 1.10.0-alpha6:
-
Update deps to latest spec.alpha (0.2.176) and core.specs.alpha (0.2.44)
-
CLJ-2373 - categorize and overhaul printing of exception messages at REPL
-
CLJ-1279 - report correct arity count for function arity errors inside macros
-
CLJ-2386 - omit ex-info construction stack frames
-
CLJ-2394 - warn in pst that stack trace for syntax error failed before execution
-
CLJ-2396 - omit :in clauses when printing spec function errors if using default explain printer
Clojure 1.10.0-alpha6 is now available.
1.10.0-alpha6 includes the following changes since 1.10.0-alpha5:
-
CLJ-2367 - Incorporate fix for ASM regression and add case tests - thanks Sean Corfield for the patch and Daniel Sutton and Ghadi Shayban for the help in tracking it down.
Clojure 1.10.0-alpha5 is now available.
1.10.0-alpha5 includes the following changes since 1.10.0-alpha4:
-
CLJ-2363 - make Java 8 the minimum requirement for Clojure (also bumps embedded ASM to latest) - thanks Ghadi Shayban!
-
CLJ-2284 - fix invalid bytecode generation for static interface method calls in Java 9+ - thanks Ghadi Shayban!
-
CLJ-2330 - fix brittle test that fails on Java 10 build due to serialization drift
-
CLJ-2362 - withMeta() should return identity when new meta is identical to prior
-
CLJ-1130 - when unable to match static method, improve error messages
-
CLJ-2089 - sorted colls with default comparator don’t check that first element is Comparable
-
CLJ-2163 - add test for var serialization
-
Bump dependency version for spec.alpha to latest, 0.2.168 (see changes)
-
Bump dependency version for core.specs.alpha to latest, 0.2.36 (see changes)
|
Note
|
1.10.0-alpha5 drops support for Java 6 and 7 and makes Java 8 the minimum requirement. Compilation will produce Java 8 level bytecode (which will not run on earlier versions of Java). This is the first change in bytecode version since Clojure 1.6. We would greatly appreciate it if you tried this release with your library or project and provided feedback about errors, performance differences (good or bad), compatibility, etc. |
When using the clj tool and deps.edn, we recommend adding an alias to your ~/.clojure/deps.edn:
{:aliases
{:clj/next
{:override-deps
{org.clojure/clojure {:mvn/version "1.10.0-alpha5"}}}}}You can then run any of your projects with the latest Clojure dev release by activating the alias with clj:
clj -A:clj/next-
CLJ-2313 - Fix for string capture mode
1.9.0-RC2 (Nov 27, 2017)
-
There is a new Maven profile and Ant target in the build to build an executable Clojure jar with deps included (and test.check). This can be useful for doing dev on Clojure itself or for just cloning the repo and doing a quick build to get something runnable.
-
The readme.txt has been updated to include information about how to create and run a local jar.
-
Stopped publishing the clojure-VERSION.zip file as part of the release.
1.9.0-RC1 (Nov 7, 2017)
-
Same as 1.9.0-beta4
1.9.0-beta4 (Oct 31, 2017)
-
CLJ-2259 - Remove unnecessary bigdec? predicate added in 1.9
-
Bumped spec.alpha dependency to 0.1.143
1.9.0-beta3 (Oct 25, 2017)
-
CLJ-2254 - add System property clojure.spec.skip-macros (default=false) that can be used to turn off spec checking in macros
1.9.0-beta2 (Oct 6, 2017)
1.9.0-beta2 includes the following changes since 1.9.0-beta1:
1.9.0-beta1 (Sep 18, 2017)
1.9.0-beta1 includes the following changes since 1.9.0-alpha20:
-
CLJ-2077 - Clojure can’t be loaded from the boot classpath under java 9
1.9.0-alpha20 (Sep 7, 2017)
1.9.0-alpha20 includes the following changes since 1.9.0-alpha19:
-
CLJ-1074 - (new) add new ## reader macro for symbolic values, and read/print support for double vals ##Inf, ##-Inf, ##NaN
-
CLJ-1454 - (new) add swap-vals! and reset-vals! that return both old and new values
-
CLJ-2184 - (errors) propagate meta in doto forms to improve error reporting
-
CLJ-2210 - (perf) cache class derivation in compiler to improve compiler performance
-
CLJ-2070 - (perf) clojure.core/delay - improve performance
-
CLJ-1917 - (perf) reducing seq over string should call String/length outside of loop
-
CLJ-1901 - (perf) amap - should call alength only once
-
CLJ-99 - (perf) min-key and max-key - evaluate k on each arg at most once
-
CLJ-2188 - (perf) slurp - mark return type as String
-
CLJ-2108 - (startup time) delay loading of spec and core specs (still more to do on this)
-
CLJ-2204 - (security) disable serialization of proxy classes to avoid potential issue when deserializing
-
CLJ-2048 - (fix) specify type to avoid ClassCastException when stack trace is elided by JVM
-
CLJ-1887 - (fix) IPersistentVector.length() - implement missing method
-
CLJ-1841 - (fix) bean - iterator was broken
-
CLJ-1714 - (fix) using a class in a type hint shouldn’t load the class
-
CLJ-1398 - (fix) clojure.java.javadoc/javadoc - update doc urls
-
CLJ-1371 - (fix) Numbers.divide(Object, Object) - add checks for NaN
-
CLJ-1358 - (fix) doc - does not expand special cases properly (try, catch)
-
CLJ-1705 - (fix) vector-of - fix NullPointerException if given unrecognized type
-
CLJ-2170 - (doc) fix improperly located docstrings
-
CLJ-2156 - (doc) clojure.java.io/copy - doc char[] support
-
CLJ-2051 - (doc) clojure.instant/validated docstring - fix typo
-
CLJ-2104 - (doc) clojure.pprint docstring - fix typo
-
CLJ-2028 - (doc) filter, filterv, remove, take-while - fix docstrings
-
CLJ-1873 - (doc) require,
*data-readers*- add .cljc files to docstrings -
CLJ-1159 - (doc) clojure.java.io/delete-file - improve docstring
-
CLJ-2039 - (doc) deftype - fix typo in docstring
-
CLJ-1918 - (doc) await - improve docstring re shutdown-agents
-
CLJ-1837 - (doc) index-of, last-index-of - clarify docstrings
-
CLJ-1826 - (doc) drop-last - fix docstring
-
CLJ-1859 - (doc) zero?, pos?, neg? - fix docstrings
1.9.0-alpha19 (Aug 24, 2017)
-
Make the default import set public in RT
1.9.0-alpha18 (Aug 23, 2017)
-
Can now bind
*reader-resolver*to an impl of LispReader$Resolver to control the reader’s use of namespace interactions when resolving autoresolved keywords and maps. -
Tighten autoresolved keywords and autoresolved namespace map syntax to support only aliases, as originally intended
-
Updated to use core.specs.alpha 0.1.24
1.9.0-alpha17 (May 26, 2017)
-
CLJ-1793 - Clear 'this' before calls in tail position
-
CLJ-2091 clojure.lang.APersistentVector#hashCode is not thread-safe
-
CLJ-1860 Make -0.0 hash consistent with 0.0
-
CLJ-2141 Return only true/false from qualified-* predicates
-
CLJ-2142 Fix check for duplicate keys with namespace map syntax
-
CLJ-2128 spec error during macroexpand no longer throws compiler exception with location
-
Updated to use spec.alpha 0.1.123
1.9.0-alpha16 (Apr 27, 2017)
1.9.0-alpha16 includes the following changes since 1.9.0-alpha15:
-
The namespaces clojure.spec, clojure.spec.gen, clojure.spec.test have been moved to the external library spec.alpha which Clojure includes via dependency
-
These namespaces have been changed and now have an appended ".alpha": clojure.spec.alpha, clojure.spec.gen.alpha, clojure.spec.test.alpha
-
All keyword constants in clojure.spec (like :clojure.spec/invalid) follow the same namespace change (now :clojure.spec.alpha/invalid)
-
spec-related system properties related to assertions did NOT change
-
The specs for clojure.core itself in namespace clojure.core.specs have been moved to the external library core.specs.alpha which Clojure now depends on
-
The clojure.core.specs namespace has changed to clojure.core.specs.alpha. All qualified spec names in that namespace follow the same namespace change (most people were not using these directly)
In most cases, you should be able to update your usage of Clojure 1.9.0-alphaX to Clojure 1.9.0-alpha16 by:
-
Updating your Clojure dependency to [org.clojure/clojure "1.9.0-alpha16"] - this will automatically pull in the 2 additional downstream libraries
-
Changing your namespace declarations in namespaces that declare or use specs to:
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.spec.test.alpha :as stest])1.9/spec split (Apr 26, 2017)
We are moving spec out of the Clojure repo/artifact and into a library to make it easier to evolve spec independently from Clojure. While we consider spec to be an essential part of Clojure 1.9, there are a number of design concerns to resolve before it can be finalized. This allows us to move towards a production Clojure release (1.9) that depends on an alpha version of spec. Users can also pick up newer versions of the spec alpha library as desired. Additionally, this is a first step towards increased support for leveraging dependencies within Clojure.
We will be creating two new contrib libraries that will contain the following (renamed) namespaces:
org.clojure/spec.alpha
clojure.spec.alpha (previously clojure.spec)
clojure.spec.gen.alpha (previously clojure.spec.gen)
clojure.spec.test.alpha (previously clojure.spec.test)
org.clojure/core.specs.alpha
clojure.core.specs.alpha (previously clojure.core.specs)
In most cases, we expect that users have aliased their reference to the spec namespaces and updating to the changed namespaces will only require a single change at the point of the require.
How will ClojureScript’s spec implementation change?
ClojureScript will also change namespace names to match Clojure. Eventually, the ClojureScript implementation may move out of ClojureScript and into the spec.alpha library - this is still under discussion.
Why do the libraries and namespaces end in alpha?
The "alpha" indicates that the spec API and implementation is still subject to change.
What will happen when the spec api is no longer considered alpha?
At that point we expect to release a non-alpha version of the spec library (with non-alpha namespaces). Users may immediately begin to use that version of spec along with whatever version of Clojure it depends on. Clojure itself will depend on it at some later point. Timing of all these actions is TBD.
Will the library support Clojure 1.8 or older versions?
No. spec uses new functions in Clojure 1.9 and it has never been a goal to provide spec for older versions. Rather, we are trying to accelerate the release of a stable Clojure 1.9 so that users can migrate forward to a stable production release with access to an alpha version of spec, and access to ongoing updated versions as they become available.
1.9.0-alpha15 (Mar 14, 2017)
1.9.0-alpha15 includes the following changes since 1.9.0-alpha14:
Specs:
Infrastructure:
-
CLJ-2113 - Clojure maven build updated
1.9.0-alpha14 (Oct 28, 2016)
1.9.0-alpha14 includes the following changes since 1.9.0-alpha13:
-
NEW
intonow has a 0-arity (returns []) and 1-arity (returns the coll you pass) -
NEW
halt-whenis a transducer that ends transduction when pred is satisfied. It takes an optional fn that will be invoked with the completed result so far and the input that triggered the predicate. -
CLJ-2042 - clojure.spec/form of clojure.spec/? now resolves pred
-
CLJ-2024 - clojure.spec.test/check now fully resolves aliased fspecs
-
CLJ-2032 - fixed confusing error if fspec is missing :args spec
-
CLJ-2027 - fixed 1.9 regression with printing of
beaninstances -
CLJ-1790 - fixed error extending protocols to Java arrays
-
CLJ-1242 - = on sorted sets or maps with incompatible comparators now returns false rather than throws
1.9.0-alpha13 (Sept 26, 2016)
1.9.0-alpha13 includes the following changes since 1.9.0-alpha12:
-
s/conform of nilable was always returning the passed value, not the conformed value
-
s/nilable now creates a generator that returns nil 10% of the time (instead of 50% of the time)
-
s/nilable now delays realizing the predicate spec until first use (better for creating recursive specs)
-
clojure.spec.gen now provides a dynload version of clojure.test.check.generators/frequency
1.9.0-alpha12 (Sept 7, 2016)
1.9.0-alpha12 includes the following changes since 1.9.0-alpha11:
-
spec performance has been improved for many use cases
-
spec explain printer is now pluggable via the dynamic var
clojure.spec/*explain-out*which should be a function that takes an explain-data and prints to*out* -
when a macro spec fails during macroexpand, throw ex-info with explain-data payload rather than IllegalArgumentException
-
pprint prints maps with namespace literal syntax when
*print-namespace-maps*is true -
CLJ-1988 - coll-of, every extended to conform sequences properly
-
CLJ-2004 - multi-spec form was missing retag
-
CLJ-2006 - fix old function name in docstring
-
CLJ-2008 - omit macros from checkable-syms
-
CLJ-2012 - fix ns spec on gen-class signatures to allow class names
-
CLJ-1224 - record instances now cache hasheq and hashCode like maps
-
CLJ-1673 - clojure.repl/dir-fn now works on namespace aliases
1.9.0-alpha11 (Aug 19, 2016)
1.9.0-alpha11 includes the following changes since 1.9.0-alpha10:
Clojure now has specs for the following clojure.core macros: let, if-let, when-let, defn, defn-, fn, and ns. Because macro specs are checked during macroexpansion invalid syntax in these macros will now fail at compile time whereas some errors were caught at runtime and some were not caught at all.
-
CLJ-1914 - Fixed race condition in concurrent range realization
-
CLJ-1870 - Fixed reloading a defmulti removes metadata on the var
-
CLJ-1744 - Clear unused locals, which can prevent memory leaks in some cases
-
CLJ-1423 - Allow vars to be invoked with infinite arglists (also, faster)
-
CLJ-1993 - Added
*print-namespace-maps*dynamic var that controls whether to use namespace map syntax for maps with keys from the same namespace. The default is false, but standard REPL bindings set this to true. -
CLJ-1985 - Fixed with-gen of conformer losing unform fn
-
Fixed clojure.spec.test/check to skip spec’ed macros
-
Fixed regression from 1.9.0-alpha8 where type hints within destructuring were lost
-
Fixed clojure.spec/merge docstring to note merge doesn’t flow conformed values
-
Fixed regex ops to use gen overrides if they are used
1.9.0-alpha10 (Jul 11, 2016)
1.9.0-alpha10 includes the following changes since 1.9.0-alpha9:
-
NEW clojure.core/any? - a predicate that matches anything. any? has built-in gen support. The :clojure.spec/any spec has been removed. Additionally, gen support has been added for some?.
-
keys* will now gen
-
gen overrides (see c.s/gen, c.s./exercise, c.s.t/check, c.s.t/instrument) now expect no-arg functions that return gens, rather than gens
-
CLJ-1977 - fix regression from alpha9 in data conversion of Throwable when stack trace is empty
1.9.0-alpha9 (Jul 5, 2016)
1.9.0-alpha9 includes the following changes since 1.9.0-alpha8:
-
NEW clojure.spec/assert - a facility for adding spec assertions to your code. See the docs for
*compile-asserts*and assert for more details. -
clojure.spec/merge - now merges rather than flows in conform/unform
-
clojure.spec.test/instrument now reports the caller that caused an :args spec failure and ignores spec’ed macros
-
clojure.spec.test -
test,test-fn,testable-symsrenamed tocheck,check-fn, andcheckable-symsto better reflect their purpose. Additionally, some of the return value structure ofcheckhas been further improved. -
clojure.core/Throwable→map formerly returned StackTraceElements which were later handled by the printer. Now the StackTraceElements are converted to data such that the return value is pure Clojure data, as intended.
1.9.0-alpha8 (Jun 28, 16)
1.9.0-alpha8 includes the following changes since 1.9.0-alpha7:
The collection spec support has been greatly enhanced, with new controls for conforming, generation, counts, distinct elements and collection kinds. See the docs for every, every-kv, coll-of and map-of for details.
instrumenting and testing has been streamlined and made more composable, with powerful new features for spec and gen overrides, stubbing, and mocking. See the docs for these functions in clojure.spec.test: instrument, test, enumerate-ns and summarize-results.
Namespaced keyword reader format, printing and destructuring have been enhanced for lifting namespaces up for keys, supporting more succinct use of fully-qualified keywords. Updated docs will be added to clojure.org soon.
Many utilities have been added, for keys spec merging, fn exercising, Java 1.8 timestamps, bounded-count and more.
Changelog:
clojure.spec:
-
[changed] map-of - now conforms all values and optionally all keys, has additional kind, count, gen options
-
[changed] coll-of - now conforms all elements, has additional kind, count, gen options. No longer takes init-coll param.
-
[added] every - validates a collection by sampling, with many additional options
-
[added] every-kv - validates a map by sampling, with many additional options
-
[added] merge
-
[changed] gen overrides can now be specified by either name or path
-
[changed] fspec generator - creates a function that generates return values according to the :ret spec and ignores :fn spec
-
[added] explain-out - produces an explain output string from an explain-data result
-
[changed] explain-data - output is now a vector of problems with a :path element, not a map keyed by path
-
[added] get-spec - for looking up a spec in the registry by keyword or symbol
-
[removed] fn-spec - see get-spec
-
[added] exercise-fn - given a spec’ed function, returns generated args and the return value
-
All instrument functions moved to clojure.spec.test
clojure.spec.test:
-
[changed] instrument - previously took a var, now takes either a symbol, namespace symbol, or a collection of symbols or namespaces, plus many new options for stubbing or mocking. Check the docstring for more info.
-
[removed] instrument-ns - see instrument
-
[removed] instrument-all - see instrument
-
[changed] unstrument - previously took a var, now takes a symbol, namespace symbol, or collection of symbol or namespaces
-
[removed] unstrument-ns - see unstrument
-
[removed] unstrument-all - see unstrument
-
[added] instrumentable-syms - syms that can be instrumented
-
[added] with-instrument-disabled - disable instrument’s checking of calls within a scope
-
[changed] check-var renamed to test and has a different signature, check docs
-
[changed] run-tests - see test
-
[changed] run-all-tests - see test
-
[changed] check-fn - renamed to test-fn
-
[added] abbrev-result - returns a briefer description of a test
-
[added] summarize-result - returns a summary of many tests
-
[added] testable-syms - syms that can be tested
-
[added] enumerate-namespace - provides symbols for vars in namespaces
clojure.core:
-
[changed] - inst-ms now works with java.time.Instant instances when Clojure is used with Java 8
-
[added] bounded-count - if coll is counted? returns its count, else counts at most first n elements of coll using its seq
1.9.0-alpha7 (Jun 15, 2016)
1.9.0-alpha7 includes the following changes since 1.9.0-alpha6 (all BREAKING vs alpha5/6):
clojure.core: - long? ⇒ int? - now checks for all Java fixed precision integer types (byte,short,integer,long) - pos-long? ⇒ pos-int? - neg-long? ⇒ neg-int? - nat-long? ⇒ nat-int?
clojure.spec: - long-in-range? ⇒ int-in-range? - long-in ⇒ int-in
If you are interested in checking specifically for long?, please use #(instance? Long %).
Sorry for the switcheroo and welcome to alphatown!
1.9.0-alpha6 (Jun 14, 2016)
1.9.0-alpha6 includes the following changes since 1.9.0-alpha5:
-
& regex op now fails fast when regex passes but preds do not
-
returns from alt/or are now map entries (supporting key/val) rather than 2-element vector
-
[BREAKING] fn-specs was renamed to fn-spec and returns either the registered fspec or nil
-
fspec now accepts ifn?, not fn?
-
fspec impl supports keyword lookup of its :args, :ret, and :fn specs
-
fix fspec describe which was missing keys and improve describe of :args/ret/fn specs
-
instrument now checks only the :args spec of a var - use the clojure.spec.test functions to test :ret and :fn specs
-
Added generator support for bytes? and uri? which were accidentally left out in alpha5
1.9.0-alpha5 (Jun 7, 2016)
1.9.0-alpha5 includes the following changes since 1.9.0-alpha4:
Fixes: - doc was printing "Spec" when none existed - fix ? explain
New predicates in core (all also now have built-in generator support in spec): - seqable? - boolean? - long?, pos-long?, neg-long?, nat-long? - double?, bigdec? - ident?, simple-ident?, qualified-ident? - simple-symbol?, qualified-symbol? - simple-keyword?, qualified-keyword? - bytes? (for byte[]) - indexed? - inst? (and new inst-ms) - uuid? - uri?
New in spec: - unform - given a spec and a conformed value, returns the unconformed value - New preds: long-in-range?, inst-in-range? - New specs (with gen support): long-in, inst-in, double-in
1.9.0-alpha4 (May 31, 2016)
1.9.0-alpha4 includes the following changes since 1.9.0-alpha3:
-
fix describe empty cat
-
improve update-in perf
-
optimize seq (&) destructuring
1.9.0-alpha3 (May 26, 2016)
1.9.0-alpha3 includes the following changes since 1.9.0-alpha2:
-
Macro fdef specs should no longer spec the implicit &form or &env [BREAKING CHANGE]
-
multi-spec includes dispatch values in path
-
multi-spec no longer requires special default method
-
fix for rep* bug
-
added explain-str (explain that returns a string)
-
improved s/+ explain
-
explain output tweaked
-
fix test reporting
1.9.0-alpha2 (May 25, 2016)
1.9.0-alpha2 includes the following changes since 1.9.0-alpha1:
-
Better describe for s/+
-
Capture recursion-limit on gen call
-
explain-data now contains :in key for the input path
-
CLJ-1931 - with-gen throws AbstractMethodError
1.9.0-alpha1 (May 24, 2016)
1.9.0-alpha1 includes the first release of clojure.spec.
A usage guide for spec is now available: https://clojure.org/guides/spec.