What's new in Clojure 1.7.0
Jul 6, 2015
- Error messages:
- CLJ-1261 Invalid defrecord results in exception attributed to consuming ns instead of defrecord ns
- CLJ-1297 Give more specific hint if namespace with "-" not found to check file uses "_"
- Documentation strings:
- CLJ-1417 clojure.java.io/input-stream has incorrect docstring
- CLJ-1357 Fix typo in gen-class doc-string
- CLJ-1479 Fix typo in filterv example
- CLJ-1480 Fix typo in defmulti docstring
- CLJ-1477 Fix typo in deftype docstring
- CLJ-1478 Fix typo in clojure.main usage
- CLJ-1738 Clarify usage on Java iterators in seq and iterator-seq
- Performance:
- CLJ-1430 Improve performance of partial with more unrolling
- CLJ-1384 clojure.core/set should use transients for better performance
- CLJ-1429 Cache unknown multimethod value default dispatch
- CLJ-1529 Reduce compile times by avoiding unnecessary calls to Class.forName()
- CLJ-1546 vec is now faster on almost all inputs
- CLJ-1618 set is now faster on almost all inputs
- CLJ-1695 Fixed reflection call in variadic vector-of constructor
- Other enhancements:
- CLJ-1191 Improve apropos to show some indication of namespace of symbols found
- CLJ-1378 Hints don't work with #() form of function
- CLJ-1498 Removes owner-thread check from transients - this check was preventing some valid usage of transients in core.async where a transient is created on one thread and then used again in another pooled thread (while still maintaining thread isolation).
- CLJ-803 Extracted IAtom interface implemented by Atom.
- CLJ-1315 Don't initialize classes when importing them
- CLJ-1330 Class name clash between top-level functions and defn'ed ones
- CLJ-1349 Update to latest test.generative and add dependency on test.check
- CLJ-1546 vec now works with things that only implement Iterable or IReduceInit
- CLJ-1618 set now works with things that only implement Iterable or IReduceInit
- CLJ-1633 PersistentList/creator doesn't handle ArraySeqs correctly
- CLJ-1589 Clean up unused paths in InternalReduce
- CLJ-1677 Add setLineNumber() to LineNumberingPushbackReader
- CLJ-1667 Change test to avoid using hard-coded socket port
- CLJ-1683 Change reduce tests to better catch reduce without init bugs
- Bug Fixes:
- CLJ-1362 Reduce broken on some primitive vectors
- CLJ-1388 Equality bug on records created with nested calls to map->record
- CLJ-1274 Unable to set compiler options via system properties except for AOT compilation
- CLJ-1241 NPE when AOTing overrided clojure.core functions
- CLJ-1185 reductions does not check for reduced value
- CLJ-1039 Using def with metadata {:type :anything} throws ClassCastException during printing
- CLJ-887 Error when calling primitive functions with destructuring in the arg vector
- CLJ-823 Piping seque into seque can deadlock
- CLJ-738
New in Clojure 1.7.0 Alpha 4 (Nov 26, 2014)
- NEW AND IMPROVED FEATURES:
- Transducers:
- Transducers is a new way to decouple algorithmic transformations from their application in different contexts. Transducers are functions that transform reducing functions to build up a "recipe" for transformation.
- Keyword and Symbol Construction:
- In response to issues raised in CLJ-1439, several changes have been made in symbol and keyword construction.
- update - like update-in for first level:
- update is a new function that is like update-in specifically for first-level keys: (update m k f args...)
- ENHANCEMENTS:
- Error messages:
- CLJ-1261 Invalid defrecord results in exception attributed to consuming ns instead of defrecord ns
- CLJ-1169 Report line,column, and source in defmacro errors
- CLJ-1297 Give more specific hint if namespace with "-" not found to check file uses "_"
- Documentation strings:
- CLJ-1417 clojure.java.io/input-stream has incorrect docstring
- CLJ-1357 Fix typo in gen-class doc-string
- CLJ-1479 Fix typo in filterv example
- CLJ-1480 Fix typo in defmulti docstring
- CLJ-1477 Fix typo in deftype docstring
- CLJ-1478 Fix typo in clojure.main usage
- Performance:
- CLJ-1430 Improve performance of partial with more unrolling
- CLJ-1384 clojure.core/set should use transients for better performance
- CLJ-1429 Cache unknown multimethod value default dispatch
- CLJ-1529 Reduce compile times by avoiding unnecessary calls to Class.forName()
- Other enhancements:
- CLJ-1191 Improve apropos to show some indication of namespace of symbols found
- CLJ-1378 Hints don't work with #() form of function
- CLJ-1498 Removes owner-thread check from transients - this check was preventing some valid usage of transients in core.async where a transient is created on one thread and then used again in another pooled thread (while still maintaining thread isolation).
- CLJ-803 Extracted IAtom interface implemented by Atom.
- CLJ-1315 Don't initialize classes when importing them
- CLJ-1330 Class name clash between top-level functions and defn'ed ones
- CLJ-1349 Update to latest test.generative and add dependency on test.check
- BUG FIXES:
- CLJ-1362 Reduce broken on some primitive vectors
- CLJ-1388 Equality bug on records created with nested calls to map->record
- CLJ-1274 Unable to set compiler options via system properties except for AOT compilation
- CLJ-1241 NPE when AOTing overrided clojure.core functions
- CLJ-1185 reductions does not check for reduced value
- CLJ-1039 Using def with metadata {:type :anything} throws ClassCastException during printing
- CLJ-887 Error when calling primitive functions with destructuring in the arg vector
- CLJ-823 Piping seque into seque can deadlock
- CLJ-738
New in Clojure 1.6.0 (Aug 7, 2014)
- COMPATIBILITY AND DEPENDENCIES:
- JDK Version Update:
- Clojure now builds with Java SE 1.6 and emits bytecode requiring Java SE 1.6 instead of Java SE 1.5. [CLJ-1268]
- ASM Library Update:
- The embedded version of the ASM bytecode library has been upgraded to ASM 4.1. [CLJ-713]
- Promoted "Alpha" Features:
- Watches - add-watch, remove-watch
- Transients - transient, persistent!, conj!, assoc!, dissoc!, pop!, disj!
- Exception data - ex-info, ex-data
- Promises - promise, deliver
- Records - defrecord
- Types - deftype
- Pretty-print tables - print-table
- NEW AND IMPROVED FEATURES:
- Java API:
- The clojure.java.api package provides a minimal interface to bootstrap Clojure access from other JVM languages. It does this by providing: 1. The ability to use Clojure's namespaces to locate an arbitrary var, returning the var's clojure.lang.IFn interface. 2. A convenience method read for reading data using Clojure's edn reader.
- Map destructuring extended to support namespaced keys:
- In the past, map destructuring with :keys and :syms would not work with maps containing namespaced keys or symbols. The :keys and :syms forms have been updated to allow them to match namespaced keys and bind to a local variable based on the name.
- New "some" operations:
- Many conditional functions rely on logical truth (where "falsey" values are nil or false). Sometimes it is useful to have functions that rely on "not nilness" instead.
- Hashing:
- Clojure 1.6 provides new hashing algorithms for primitives and collections, accessible via IHashEq/hasheq (in Java) or the clojure.core/hash function (in Clojure). In general, these changes should be transparent to users, except hash codes used inside hashed collections like maps and sets will have better properties.
- bitops:
- A new unsigned-bit-shift-right (Java's >>>) has been added to the core library. The shift distance is truncated to the least 6 bits (per the Java specification for long >>>).
- clojure.test:
- Added a new clojure.test/test-vars function that takes a list of vars, groups them by namespace, and runs them with their fixtures.
- ENHANCEMENTS:
- Printing:
- CLJ-908 Print metadata for functions when print-meta is true and remove errant space at beginning.
- CLJ-937 pprint cl-format now supports E, F, and G formats for ratios.
- Error messages:
- CLJ-1248 Include type information in reflection warning messages
- CLJ-1099 If non-seq passed where seq is needed, error message now is an ExceptionInfo with the instance value, retrievable via ex-data.
- CLJ-1083 Fix error message reporting for "munged" function names (like a->b).
- CLJ-1056 Handle more cases and improve error message for errors in defprotocol definitions.
- CLJ-1102 Better handling of exceptions with empty stack traces.
- CLJ-939 Exceptions thrown in the top level ns form are reported without file or line number.
- Documentation strings:
- CLJ-1164 Fix typos in clojure.instant/validated and other internal instant functions.
- CLJ-1143 Correct doc string for ns macro.
- CLJ-196 Clarify value of file is undefined in the REPL.
- CLJ-1228 Fix a number of spelling errors in namespace and doc strings.
- CLJ-835 Update defmulti doc to clarify expectations for hierarchy argument.
- CLJ-1304 Fix minor typos in documentation and comments
- CLJ-1302 Mention that keys and vals order are consistent with seq order
- Performance:
- CLJ-858 Improve speed of STM by removing System.currentTimeMillis.
- CLJ-669 clojure.java.io/do-copy: use java.nio for Files
- commit Reduce overhead of protocol callsites by removing unneeded generated cache fields.
- Other enhancements:
- CLJ-908 Make default-data-reader-fn set!-able in REPL, similar to data-readers.
- CLJ-783 Make clojure.inspector/inspect-tree work on sets.
- CLJ-896 Make browse-url aware of xdg-open.
- CLJ-1160 Fix clojure.core.reducers/mapcat does not stop on reduced? values.
- CLJ-1121 -> and ->> have been rewritten to work with a broader set of macros.
- CLJ-1105 clojure.walk now supports records.
- CLJ-949 Removed all unnecessary cases of sneakyThrow.
- CLJ-1238 Allow EdnReader to read foo// (matches LispReader behavior).
- CLJ-1264 Remove uses of _ as a var in the Java code (causes warning in Java 8).
- CLJ-394 Add record? predicate.
- CLJ-1200 ArraySeq dead code cleanup, ArraySeq_short support added.
- CLJ-1331 Primitive vectors should implement hasheq and use new hash algorithm
- CLJ-1354 Make APersistentVector.SubVector public so other collections can access
- CLJ-1353 Make awt run headless during the build process
- BUG FIXES:
- CLJ-1018 Make range consistently return infinite sequence of start with a step of 0.
- CLJ-863 Make interleave return () on 0 args and identity on 1 args.
- CLJ-1072 Update internal usages of the old metadata reader syntax to new syntax.
- CLJ-1193 Make bigint and biginteger functions work on double values outside long range.
- CLJ-1154 Make Compile.java flush but not close stdout so errors can be reported.
- CLJ-1161 Remove bad version.properties from sources jar.
- CLJ-1175 Fix invalid behavior of Delay/deref if an exception is thrown - exception will now be rethrown on subsequent calls and not enter a corrupted state.
- CLJ-1171 Fix several issues with instance? to make it consistent when used with apply.
- CLJ-1202 Protocol fns with dashes may get incorrectly compiled into field accesses.
- CLJ-850 Add check to emit invokePrim with return type of double or long if type-hinted.
- CLJ-1177 clojure.java.io URL to File coercion corrupts path containing UTF-8 characters.
- CLJ-1234 Accept whitespace in Record and Type reader forms (similar to data literals).
- CLJ-1233 Allow ** as a valid symbol name without triggering dynamic warnings.
- CLJ-1246 Add support to clojure.reflect for classes with annotations.
- CLJ-1184 Evaling #{do ...} or [do ...] is treated as do special form.
- CLJ-1090 Indirect function calls through Var instances fail to clear locals.
- CLJ-1076 pprint tests fail on Windows, expecting \n.
- CLJ-766 Make into-array work consistently with short-array and byte-array on bigger types.
- CLJ-1285 Data structure invariants are violated after persistent operations when collision node created by transients.
- CLJ-1222 Multiplication overflow issues around Long/MIN_VALUE
- CLJ-1118 Inconsistent numeric comparison semantics between BigDecimals and other numerics
- CLJ-1125 Clojure can leak memory in a servlet container when using dynamic bindings or STM transactions.
- CLJ-1082 Subvecs of primitve vectors cannot be reduced
- CLJ-1301 Case expressions use a mixture of hashCode and hasheq, potentially leading to missed case matches when these differ.
- CLJ-983 proxy-super does not restore original binding if call throws exception
- CLJ-1176 clojure.repl/source errors when read-eval bound to :unknown
- CLJ-935 clojure.string/trim uses different definition of whitespace than triml and trimr
- CLJ-1058 StackOverflowError on exception in reducef for PersistentHashMap fold
- CLJ-1328 Fix some tests in the Clojure test suite to make their names unique and independent of hashing order
- CLJ-1339 Empty primitive vectors throw NPE on .equals with non-vector sequential types
- CLJ-1363 Field access via .- in reflective case does not work
- CLJ-944 Compiler gives constant collections types which mismatch their runtime values
- CLJ-1387 reduce-kv on large hash maps ignores reduced result
New in Clojure 1.5.1 (Mar 19, 2013)
- Fix for leak caused by ddc65a96fdb1163b