Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to Java commit 970346e (2012.12.11): changefile for 1.5

  • Loading branch information...
commit e2eec2962cd5a884b47f7e84c3473c339645a486 1 parent 86fcfe5
David Miller dmiller authored
Showing with 387 additions and 258 deletions.
  1. +387 −258 changes.md
645 changes.md
View
@@ -1,345 +1,474 @@
<!-- -*- mode: markdown ; mode: visual-line ; coding: utf-8 -*- -->
-# Changes to Clojure in Version 1.4
+
+
+# Changes to Clojure in Version 1.5
## CONTENTS
<pre>
1 Deprecated and Removed Features
- 1.1 Fields that Start With a Dash Can No Longer Be Accessed Using Dot Syntax
- 2 New/Improved Features
- 2.1 Reader Literals
- 2.2 clojure.core/mapv
- 2.3 clojure.core/filterv
- 2.4 clojure.core/ex-info and clojure.core/ex-data
- 2.5 clojure.core/reduce-kv
- 2.6 clojure.core/contains? Improved
- 2.7 clojure.core/min and clojure.core/max prefer NaN
- 2.8 clojure.java.io/as-file and clojure.java.io/as-url Handle URL-Escaping Better
- 2.9 New Dot Syntax for Record and Type Field Access
- 2.10 Record Factory Methods Available Inside defrecord
- 2.11 assert-args Displays Namespace and Line Number on Errors
- 2.12 File and Line Number Added to Earmuff Dynamic Warning
- 2.13 require Can Take a :refer Option
- 2.14 *compiler-options* Var
- 2.15 Improved Reporting of Invalid Characters in Unicode String Literals
- 2.16 clojure.core/hash No Longer Relies on .hashCode
- 2.17 Java 7 Documentation
- 2.18 loadLibrary Loads Library Using System ClassLoader
- 2.19 Java int is boxed as java.lang.Integer
+ 1.1 Clojure 1.5 reducers library requires Java 6 or later
+ 2 New and Improved Features
+ 2.1 Reducers
+ 2.2 Reader Literals improved
+ 2.3 clojure.core/set-agent-send-executor!, set-agent-send-off-executor!, and send-via
+ 2.4 New threading macros
+ 2.5 Column metadata captured by reader
+ 2.6 gen-class improvements
+ 2.7 Support added for marker protocols
+ 2.8 clojure.pprint/print-table output compatible with Emacs Org mode
+ 2.9 clojure.string/replace and replace-first handle special characters more predictably
+ 2.10 Set and map constructor functions allow duplicates
+ 2.11 More functions preserve metadata
3 Performance Enhancements
- 4 Bug Fixes
+ 4 Improved error messages
+ 5 Improved documentation strings
+ 6 Bug Fixes
</pre>
## 1 Deprecated and Removed Features
-### 1.1 Record and Type Fields that Start With a Dash Can No Longer Be Accessed Using Dot Syntax
+### 1.1 Clojure 1.5 reducers library requires Java 6 or later
-Clojure 1.4 introduces a field accessor syntax for the dot special form that aligns Clojure field lookup syntax with ClojureScript's.
+The new reducers library (see below) requires Java 6 plus a ForkJoin
+library, or Java 7 or later. Clojure 1.5 can still be compiled and
+run with Java 5. The only limitations with Java 5 are that the new
+reducers library will not work, and building Clojure requires skipping
+the test suite (e.g. by using the command "ant jar").
-For example, in Clojure 1.3, one can declare a record with a field starting with dash and access it like this:
- (defrecord Bar [-a]) ;=> user.Bar
- (.-a (Bar. 10)) ;=> 10
-
-In 1.4, the above code results in `IllegalArgumentException No matching field found: a for class user.Bar`
+## 2 New and Improved Features
-However, the field may still be accessed as a keyword:
+### 2.1 Reducers
- (:-a (Bar. 10)) ;=> 10
+Reducers provide a set of high performance functions for working with collections. The actual fold/reduce algorithms are specified via the collection being reduced. This allows each collection to define the most efficient way to reduce its contents.
-## 2 New and Improved Features
+The implementation details of reducers are available at the [Clojure blog](http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html) and therefore won't be repeated in these change notes. However, as a summary:
+
+* There is a new namespace: clojure.core.reducers
+* It contains new versions of map, filter etc based upon transforming reducing functions - reducers
+* It contains a new function, fold, which is a parallel reduce+combine
+fold uses fork/join when working with (the existing!) Clojure vectors and maps
+* Your new parallel code has exactly the same shape as your existing seq-based code
+* The reducers are composable
+* Reducer implementations are primarily functional - no iterators
+* The model uses regular data structures, not 'parallel collections' or other OO malarkey
+* It's fast, and can become faster still
+* This is work-in-progress
+
+Examples:
+
+ user=> (require '[clojure.core.reducers :as r])
+ user=> (reduce + (r/filter even? (r/map inc [1 1 1 2])))
+ ;=> 6
+
+
+ ;;red is a reducer awaiting a collection
+ user=> (def red (comp (r/filter even?) (r/map inc)))
+ user=> (reduce + (red [1 1 1 2]))
+ ;=> 6
+
+ user=> (into #{} (r/filter even? (r/map inc [1 1 1 2])))
+ ;=> #{2}
-### 2.1 Reader Literals
+### 2.2 Reader Literals improved
-Clojure 1.4 supports reader literals, which are data structures tagged
-by a symbol to denote how they will be read.
+* [CLJ-1034](http://dev.clojure.org/jira/browse/CLJ-1034)
+ "Conflicting data-reader mapping" should no longer be thrown where there really isn't a conflict. Until this patch, having data_readers.clj on the classpath twice would cause the above exception.
-When Clojure starts, it searches for files named `data_readers.clj`
-at the root of the classpath. Each such file must contain a Clojure
-map of symbols, like this:
+* [CLJ-927](http://dev.clojure.org/jira/browse/CLJ-927)
+ Added `*default-data-reader-fn*` to clojure.core. When no data reader is found for a tag and `*default-data-reader-fn*`is non-nil, it will be called with two arguments, the tag and the value. If `*default-data-reader-fn*` is nil (the default), an exception will be thrown for the unknown tag.
- {foo/bar my.project.foo/bar
- foo/baz my.project/baz}
+### 2.3 clojure.core/set-agent-send-executor!, set-agent-send-off-executor!, and send-via
-The key in each pair is a tag that will be recognized by
-the Clojure reader. The value in the pair is the
-fully-qualified name of a Var which will be invoked by the reader to
-parse the form following the tag. For example, given the
-data_readers.clj file above, the Clojure reader would parse this
-form:
+Added two new functions:
- #foo/bar [1 2 3]
+* clojure.core/set-agent-send-executor!
-by invoking the Var `#'my.project.foo/bar` on the vector `[1 2 3]`. The
-data reader function is invoked on the form AFTER it has been read
-as a normal Clojure data structure by the reader.
+ Allows the user to set the `java.util.concurrent.Executor` used when calling `clojure.core/send`. Defaults to a fixed thread pool of size: (numCores + 2)
-Reader tags without namespace qualifiers are reserved for Clojure. Default
-reader tags are defined in `clojure.core/default-data-readers` but may be
-overridden in `data_readers.clj` or by rebinding `*data-readers*`.
+* clojure.core/set-agent-send-off-executor!
-#### 2.1.1 Instant Literals
+ Allows the user to set the `java.util.concurrent.Executor` used when calling `clojure.core/send-off`. Defaults to a cached thread pool.
-Clojure supports literals for instants in the form
-`#inst "yyyy-mm-ddThh:mm:ss.fff+hh:mm"`. These literals are parsed as `java.util.Date`s
-by default. They can be parsed as `java.util.Calendar`s or `java.util.Timestamp`s
-by binding `*data-readers*` to use `clojure.instant/read-instant-calendar` or
-`clojure.instant/read-instant-timestamp`.
+* clojure.core/send-via
- (def instant "#inst \"@2010-11-12T13:14:15.666\"")
-
- ; Instants are read as java.util.Date by default
- (= java.util.Date (class (read-string instant)))
- ;=> true
-
- ; Instants can be read as java.util.Calendar or java.util.Timestamp
-
- (binding [*data-readers* {'inst read-instant-calendar}]
- (= java.util.Calendar (class (read-string instant))))
- ;=> true
+ Like `send`, and `send-off`, except the first argument to this function is an executor to use when sending.
- (binding [*data-readers* {'inst read-instant-timestamp}]
- (= java.util.Timestamp (class (read-string instant))))
- ;=> true
-#### 2.1.2 UUID Literals
-Clojure supports literals for UUIDs in the form `#uuid "uuid-string"`. These
-literals are parsed as `java.util.UUID`s.
-### 2.2 clojure.core/mapv
+### 2.4 New threading macros
-`mapv` takes a function `f` and one or more collections and returns a
-vector consisting of the result of applying `f` to the set of first items of
-each collection, followed by applying `f` to the set of second items in each
-collection, until any one of the collections is exhausted. Any remaining
-items in other collections are ignored. `f` should accept a number of arguments
-equal to the number of collections.
+* clojure.core/cond-> [expr & clauses]
- (= [1 2 3] (mapv + [1 2 3]))
- ;=> true
+ Takes an expression and a set of test/form pairs. Threads the expression (via ->) through each form for which the corresponding test expression (not threaded) is true.
- (= [2 3 4] (mapv + [1 2 3] (repeat 1)))
- ;=> true
+Example:
-### 2.3 clojure.core/filterv
+ user=> (cond-> 1
+ true inc
+ false (* 42)
+ (= 2 2) (* 3))
+ 6
-`filterv` takes a predicate `pred` and a collection and returns a vector
-of the items in the collection for which `(pred item)` returns true. `pred`
-must be free of side-effects.
+* clojure.core/cond->> [expr & clauses]
- (= [] (filterv even? [1 3 5]))
- ;=> true
+ Takes an expression and a set of test/form pairs. Threads expr (via ->>)
+ through each form for which the corresponding test expression (not threaded) is true.
- (= [2 4] (filter even? [1 2 3 4 5]))
- ;=> true
+Example:
-### 2.4 clojure.core/ex-info and clojure.core/ex-data
+ user=> (def d [0 1 2 3])
+ #'user/d
+ user=> (cond->> d
+ true (map inc)
+ (seq? d) (map dec)
+ (= (count d) 4) (reduce +)) ;; no threading in the test expr
+ ;; so d must be passed in explicitly
+ 10
-`ex-info` creates an instance of `ExceptionInfo`. `ExceptionInfo` is a
-`RuntimeException` subclass that takes a string `msg` and a map of data.
- (ex-info "Invalid use of robots" {:robots false})
- ;=> #<ExceptionInfo clojure.lang.ExceptionInfo: Invalid use of robots {:robots false}>
+* clojure.core/as-> [expr name & forms]
-`ex-data` is called with an exception and will retrieve that map of data
-if the exception is an instance of `ExceptionInfo`.
+Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form
- (ex-data (ex-info "Invalid use of robots" {:robots false}))
- ;=> {:robots false}
+Note: this form does not actually perform any threading. Instead it allows the user to assign a name and lexical context to a value created by a parent threading form.
-### 2.5 clojure.core/reduce-kv
+Example:
-`reduce-kv` reduces an associative collection. It takes a function `f`,
-an initial value `init` and an associative collection `coll`. `f` should
-be a function of 3 arguments. Returns the result of applying `f` to `init`,
-the first key and the first value in `coll`, then applying `f` to that result
-and the 2nd key and value, etc. If `coll` contains no entries, returns `init`
-and f is not called. Note that `reduce-kv` is supported on vectors,
-where the keys will be the ordinals.
+ user=> (-> 84
+ (/ 4)
+ (as-> twenty-one ;; uses the value from ->
+ (* 2 twenty-one))) ;; no threading here
+ 42
- (reduce-kv str "Hello " {:w \o :r \l :d \!})
- ;=> "Hello :rl:d!:wo"
- (reduce-kv str "Hello " [\w \o \r \l \d \!])
- ;=> "Hello 0w1o2r3l4d5!"
+* clojure.core/some-> [expr & forms]
-### 2.6 clojure.core/contains? Improved
-`contains?` now works with `java.util.Set`.
+When expr is not nil, threads it into the first form (via ->),
+ and when that result is not nil, through the next etc.
-### 2.7 clojure.core/min and clojure.core/max prefer NaN
+Example:
-`min` and `max` now give preference to returning NaN if either of their
-arguments is NaN.
+ user=> (defn die [x] (assert false))
+ #'user/die
+ user=> (-> 1 inc range next next next die)
+ AssertionError Assert failed: false user/die (NO_SOURCE_FILE:65)
+ user=> (some-> 1 inc range next next next die)
+ nil
-### 2.8 clojure.java.io/as-file and clojure.java.io/as-url Handle URL-Escaping Better
-`as-file` and `as-url` now handle URL-escaping in both directions.
-### 2.9 New Dot Syntax for Record and Type Field Access
+* clojure.core/some->> [expr & forms]
-Clojure 1.4 introduces a field accessor syntax for the dot special
-form that aligns Clojure field lookup syntax with ClojureScript's.
+ When expr is not nil, threads it into the first form (via ->>),
+ and when that result is not nil, through the next etc.
-In 1.4, to declare a record type and access its property `x`, one can
-write:
+ Same as some-> except the value is threaded as the last argument in each form.
- (defrecord Foo [x]) ;=> user.Foo
- (.-x (Foo. 10)) ;=> 10
-
-This addition makes it easier to write code that will run as expected
-in both Clojure and ClojureScript.
+### 2.5 Column metadata captured by reader
-### 2.10 Record Factory Methods Available Inside defrecord
+* [CLJ-960](http://dev.clojure.org/jira/browse/CLJ-960)
+ Data read by the clojure reader is now tagged with :column in addition to :line.
-Prior to 1.4, you could not use the factory functions (`->RecordClass`
-and `map->RecordClass`) to construct a new record from inside a
-`defrecord` definition.
-The following example did not work prior to 1.4, but is now
-valid. This example makes use of `->Mean` which would have not yet
-been available.
+### 2.6 gen-class improvements
- (defrecord Mean [last-winner]
- Player
- (choose [_] (if last-winner last-winner (random-choice)))
- (update-strategy [_ me you] (->Mean (when (iwon? me you) me))))
+* [CLJ-745](http://dev.clojure.org/jira/browse/CLJ-745)
+ It is now possible to expose protected final methods via `:exposes-methods` in `gen-class`. This allows Clojure classes created via gen-class to access protected methods of its parent class.
-### 2.11 assert-args Displays Namespace and Line Number on Errors
+Example:
-`assert-args` now uses &form to report the namespace and line number where
-macro syntax errors occur.
+ (gen-class :name clojure.test_clojure.genclass.examples.ProtectedFinalTester
+ :extends java.lang.ClassLoader
+ :main false
+ :prefix "pf-"
+ :exposes-methods {findSystemClass superFindSystemClass})
-### 2.12 File and Line Number Added to Earmuff Dynamic Warning
+* [CLJ-948](http://dev.clojure.org/jira/browse/CLJ-948)
+ It is now possible to annotate constructors via `gen-class`.
-When a variable is defined using earmuffs but is not declared dynamic,
-Clojure emits a warning. That warning now includes the file and line
-number.
+Example:
-### 2.13 require Can Take a :refer Option
+ (gen-class :name foo.Bar
+ :extends clojure.lang.Box
+ :constructors {^{Deprecated true} [Object] [Object]}
+ :init init
+ :prefix "foo")
-`require` can now take a `:refer` option. `:refer` takes a list of symbols
-to refer from the namespace or `:all` to bring in all public vars.
+### 2.7 Support added for marker protocols
-### 2.14 \*compiler-options\* Var
+* [CLJ-966](http://dev.clojure.org/jira/browse/CLJ-966)
+ `defprotocol` no longer requires that at least one method be given in the definition of the protocol. This allows for marker protocols, whose sole reason of existence is to allow `satisfies?` to be true for a given type.
-The dynamic var `*compiler-options*` contains a map of options to send
-to the Clojure compiler.
-Supported options:
+Example:
-* `:elide-meta`: Have certain metadata elided during compilation. This
-should be set to a collection of keywords.
-* `:disable-locals-clearing`: Set to true to disable clearing. Useful for
-using a debugger.
+ user=> (defprotocol P (hi [_]))
+ P
+ user=> (defprotocol M) ; marker protocol
+ M
+ user=> (deftype T [a] M P (hi [_] "hi there"))
+ user.T
+ user=> (satisfies? P (T. 1))
+ true
+ user=> (satisfies? M (T. 1))
+ true
+ user=> (hi (T. 1))
+ "hi there"
+ user=> (defprotocol M2 "marker for 2") ; marker protocol again
+ M2
+ user=> (extend-type T M2)
+ nil
+ user=> (satisfies? M2 (T. 1))
+ true
-The main function of the Clojure compiler sets the
-`*compiler-options*` from properties prefixed by `clojure.compiler`,
-e.g.
- java -Dclojure.compiler.elide-meta='[:doc :file :line]'
+### 2.8 clojure.pprint/print-table output compatible with Emacs Org mode
-### 2.15 Improved Reporting of Invalid Characters in Unicode String Literals
+For the convenience of those that use Emacs Org mode,
+`clojure.pprint/print-table` now prints tables in the form used by
+that mode. Emacs Org mode has features to make it easy to edit such
+tables, and even to do spreadsheet-like calculations on their
+contents. See the [Org mode documentation on
+tables](http://orgmode.org/manual/Tables.html) for details.
-When the reader finds an invalid character in a Unicode string literal, it
-now reports the character instead of its numerical representation.
+ user=> (clojure.pprint/print-table [:name :initial-impression]
+ [{:name "Rich" :initial-impression "rock star"}
+ {:name "Andy" :initial-impression "engineer"}])
+ | :name | :initial-impression |
+ |-------+---------------------|
+ | Rich | rock star |
+ | Andy | engineer |
-### 2.16 clojure.core/hash No Longer Relies on .hashCode
-`hash` no longer directly uses .hashCode() to return the hash of a Clojure
-data structure. It calls `clojure.lang.Util.hasheq`, which has its own implementation
-for Integer, Short, Byte, and Clojure collections. This ensures that the hash code
-returned is consistent with `=`.
+### 2.9 clojure.string/replace and replace-first handle special characters more predictably
-### 2.17 Java 7 Documentation
+`clojure.string/replace` and `clojure.string/replace-first` are now
+consistent in the way that they handle the replacement strings: all
+characters in the replacement strings are treated literally, including
+backslash and dollar sign characters.
-`*core-java-api*` will now return the URL for the Java 7 Javadoc when you are
-running Java 7.
+ user=> (require '[clojure.string :as s])
-### 2.18 loadLibrary Loads Library Using System ClassLoader
+ user=> (s/replace-first "munge.this" "." "$")
+ ;=> "munge$this"
-A static method, `loadLibrary`, was added to `clojure.lang.RT` to load a
-library using the system ClassLoader instead of Clojure's class loader.
+ user=> (s/replace "/my/home/dir" #"/" (fn [s] "\\"))
+ ;=> "\\my\\home\\dir"
-### 2.19 Java int is Boxed As java.lang.Integer
+There is one exception, which is described in the doc strings. If you
+call these functions with a regex to search for and a string as the
+replacement, then dollar sign and backslash characters in the
+replacement string are treated specially. Occurrences of `$1` in the
+replacement string are replaced with the string that matched the first
+parenthesized subexpression of the regex, occurrences of `$2` are
+replaced with the match of the second parenthesized subexpression,
+etc.
+
+ user=> (s/replace "x12, b4" #"([a-z]+)([0-9]+)" "$1 <- $2")
+ ;=> "x <- 12, b <- 4"
+
+Individual occurrences of `$` or `\` in the replacement string that
+you wish to be treated literally can be escaped by prefixing them with
+a `\`. If you wish your replacement string to be treated literally
+and its contents are unknown to you at compile time (or you don't wish
+to tarnish your constant string with lots of backslashes), you can use
+the new function `clojure.string/re-quote-replacement` to do the
+necessary escaping of special characters for you.
+
+ user=> (s/replace "x12, b4" #"([a-z]+)([0-9]+)"
+ (s/re-quote-replacement "$1 <- $2"))
+ ;=> "$1 <- $2, $1 <- $2"
+
+
+### 2.10 Set and map constructor functions allow duplicates
+
+All of the functions that construct sets such as `set` and
+`sorted-set` allow duplicate elements to appear in their arguments,
+and they are documented to treat this case as if by repeated uses of
+`conj`.
+
+Similarly, all map constructor functions such as `hash-map`,
+`array-map`, and `sorted-map` allow duplicate keys, and are documented
+to treat this case as if by repeated uses of `assoc`.
+
+As before, literal sets, e.g. `#{1 2 3}`, do not allow duplicate
+elements, and while elements can be expressions evaluated at run time
+such as `#{(inc x) (dec y)}`, this leads to a check for duplicates at
+run time whenever the set needs to be constructed, throwing an
+exception if any duplicates are found.
+
+Similarly, literal maps do not allow duplicate keys. New to Clojure
+1.5 is a performance optimization: if all keys are compile time
+constants but one or more values are expressions requiring evaluation
+at run time, duplicate keys are checked for once at compile time only,
+not each time a map is constructed at run time.
+
+* [CLJ-1065](http://dev.clojure.org/jira/browse/CLJ-1065)
+ Allow duplicate set elements and map keys for all set and map constructors
+
+
+### 2.11 More functions preserve metadata
+
+Most functions that take a collection and return a "modified" version
+of that collection preserve the metadata that was on the input
+collection, e.g. `conj`, `assoc`, `dissoc`, etc. One notable
+exception was `into`, which would return a collection with metadata
+`nil` for several common types of input collections.
+
+Now the functions `into`, `select-keys`, `clojure.set/project`, and
+`clojure.set/rename` return collections with the same metadata as
+their input collections.
-Java `int`s are now boxed as `java.lang.Integer`s. See
-[the discussion on clojure-dev](https://groups.google.com/forum/#!msg/clojure/7-hARL5c1lI/ntnnOweEGfUJ)
-for more information.
## 3 Performance Enhancements
-* `(= char char)` is now optimized
-* `equiv` is inlined in variadic =
-* `toString` cached on keywords and symbols
-* [CLR] Completely rewrote the code generation phase of the compiler
-
-## 4 Bug Fixes
-
-* [CLJ-829](http://dev.clojure.org/jira/browse/CLJ-829)
- Transient hashmaps mishandle hash collisions
-* [CLJ-773](http://dev.clojure.org/jira/browse/CLJ-773)
- Macros that are expanded away still have their vars referenced in the emitted byte code
-* [CLJ-837](http://dev.clojure.org/jira/browse/CLJ-837)
- java.lang.VerifyError when compiling deftype or defrecord with argument name starting with double underscore characters
-* [CLJ-369](http://dev.clojure.org/jira/browse/CLJ-369)
- Check for invalid interface method names
-* [CLJ-845](http://dev.clojure.org/jira/browse/CLJ-845)
- Unexpected interaction between protocol extension and namespaced method keyword/symbols
- * Ignoring namespace portion of symbols used to name methods in extend-type and extend-protocol
-* [CLJ-852](http://dev.clojure.org/jira/browse/CLJ-852)
- IllegalArgumentException thrown when defining a var whose value is calculated with a primitive fn
-* [CLJ-855](http://dev.clojure.org/jira/browse/CLJ-855)
- catch receives a RuntimeException rather than the expected checked exception
-* [CLJ-876](http://dev.clojure.org/jira/browse/CLJ-876)
- #^:dynamic vars declared in a nested form are not immediately dynamic
-* [CLJ-886](http://dev.clojure.org/jira/browse/CLJ-886)
- java.io/do-copy can garble multibyte characters
-* [CLJ-895](http://dev.clojure.org/jira/browse/CLJ-895)
- Collection.toArray implementations do not conform to Java API docs
- * obey contract for toArray return type
-* [CLJ-898](http://dev.clojure.org/jira/browse/CLJ-898)
- Agent sends consume heap
- * Only capture a shallow copy of the current Frame in binding-conveyor-fn, so that sends in agent actions don't built infinite Frame stacks
-* [CLJ-928](http://dev.clojure.org/jira/browse/CLJ-928)
- Instant literal for Date and Timestamp should print in UTC
-* [CLJ-931](http://dev.clojure.org/jira/browse/CLJ-933)
- Syntactically broken clojure.test/are tests succeed
-* [CLJ-933](http://dev.clojure.org/jira/browse/CLJ-933)
- Compiler warning on clojure.test-clojure.require-scratch
-* CLJCLR-???
- Removed RhinoMocks dependency, get NUnit from NuGet, update tests
-* CLJCLR-???
- Removed superfluous NUnit and RHino.Mocks license files
-* CLJCLR-???
- Output compiled assemblies to current working directory.
-* CLJCLR-???
- Restructured DLR conversion code, enabled generic method type inferencing
-* CLJCLR-???
- Fixed one-off bug in arg gen in GenClass
-* CLJCLR-???
- Extend conversions to IEnumerable<T>, IList<T>, IDictionary<K,V>
-* CLJCLR-???
- Fixed a small bug in extended conversions
-* CLJCLR-???
- Added assembly-load-with-partial-name
-* CLJCLR-???
- Added |-escapting to print-dup on symbols
-* CLJCLR-???
- Promoted fp-str to public
-* CLJCLR-???
- Fix lookup for generic types
-* CLJCLR-???
- Fix letfn init and bug in objmethod compile with primitive hint in params
-* CLJCLR-???
- Make certain convert operations culture-invariant
-* CLJCLR-???
- Make assemblies output from compiling respect *compile-path*
-* CLJCLR-???
- Extend printf to handle DateTimeOffsets
-* CLJCLR-???
- Fix printf handling of tz for DateTimeOffsets
-* CLJCLR-???
- Fix infinite recursion on generic type lookup when type name is bad
-
+* [CLJ-988](http://dev.clojure.org/jira/browse/CLJ-988)
+ Multimethod tables are now protected by a read/write lock instead of a synchronized method. This should result in a performance boost for multithreaded code using multimethods.
+* [CLJ-1061](http://dev.clojure.org/jira/browse/CLJ-1061)
+ `when-first` now evaluates its expression only once.
+* [CLJ-1084](http://dev.clojure.org/jira/browse/CLJ-1084)
+ `PersistentVector$ChunkedSeq` now implements `Counted` interface, to avoid some cases where vector elements were being counted by iterating over their elements.
+* [CLJ-867](http://dev.clojure.org/jira/browse/CLJ-867)
+ Records with same fields and field values, but different types, now usually hash to different values.
+
+
+## 4 Improved error messages
+
+* [CLJ-103](http://dev.clojure.org/jira/browse/CLJ-103)
+ Improved if-let error message when form has a improperly defined body.
+* [CLJ-897](http://dev.clojure.org/jira/browse/CLJ-897)
+ Don't use destructuring in defrecord/deftype arglists to get a slightly better error message when forgetting to specify the fields vector
+* [CLJ-788](http://dev.clojure.org/jira/browse/CLJ-788)
+ Add source and line members and getters to CompilerException
+* [CLJ-157](http://dev.clojure.org/jira/browse/CLJ-157)
+ Better error messages for syntax errors w/ defn and fn
+* [CLJ-940](http://dev.clojure.org/jira/browse/CLJ-940)
+ Passing a non-sequence to refer :only results in uninformative exception
+* [CLJ-1024](http://dev.clojure.org/jira/browse/CLJ-1024)
+ Check for invalid varargs/destructuring uses.
+* [CLJ-1052](http://dev.clojure.org/jira/browse/CLJ-1052)
+ `assoc` now throws an exception if the last key argument is missing a value.
+
+
+## 5 Improved documentation strings
+
+* [CLJ-893](http://dev.clojure.org/jira/browse/CLJ-893)
+ Document that vec will alias Java arrays
+* [CLJ-892](http://dev.clojure.org/jira/browse/CLJ-892)
+ Clarify doc strings of sort and sort-by: they will modify Java array arguments
+* [CLJ-1019](http://dev.clojure.org/jira/browse/CLJ-1019)
+ ns-resolve doc has a typo
+* [CLJ-1038](http://dev.clojure.org/jira/browse/CLJ-1038)
+ Docstring for deliver doesn't match behavior
+* [CLJ-1055](http://dev.clojure.org/jira/browse/CLJ-1055)
+ "be come" should be "become"
+* [CLJ-917](http://dev.clojure.org/jira/browse/CLJ-917)
+ clojure.core/definterface is not included in the API docs
+
+
+## 6 Bug Fixes
+
+* [CLJ-962](http://dev.clojure.org/jira/browse/CLJ-962)
+ Vectors returned by subvec allow access at negative indices
+* [CLJ-952](http://dev.clojure.org/jira/browse/CLJ-952)
+ bigdec does not properly convert a clojure.lang.BigInt
+* [CLJ-975](http://dev.clojure.org/jira/browse/CLJ-975)
+ inconsistent destructuring behaviour when using nested maps
+* [CLJ-954](http://dev.clojure.org/jira/browse/CLJ-954)
+ TAP support in clojure.test.tap Needs Updating
+* [CLJ-881](http://dev.clojure.org/jira/browse/CLJ-881)
+ exception when cl-format is given some ~f directive/value combinations
+* [CLJ-763](http://dev.clojure.org/jira/browse/CLJ-763)
+ Do not check for duplicates in destructuring map creation
+* [CLJ-667](http://dev.clojure.org/jira/browse/CLJ-667)
+ Allow loops fully nested in catch/finally
+* [CLJ-768](http://dev.clojure.org/jira/browse/CLJ-768)
+ cl-format bug in ~f formatting
+* [CLJ-844](http://dev.clojure.org/jira/browse/CLJ-844)
+ NPE calling keyword on map from bean
+* [CLJ-934](http://dev.clojure.org/jira/browse/CLJ-934)
+ disj! Throws exception when attempting to remove multiple items in one call
+* [CLJ-943](http://dev.clojure.org/jira/browse/CLJ-943)
+ When load-lib fails, a namespace is still created
+* [CLJ-981](http://dev.clojure.org/jira/browse/CLJ-981)
+ clojure.set/rename-keys deletes keys when there's a collision
+* [CLJ-961](http://dev.clojure.org/jira/browse/CLJ-961)
+ with-redefs loses a Var's root binding if the Var is thread-bound
+* [CLJ-1032](http://dev.clojure.org/jira/browse/CLJ-1032)
+ seque leaks threads from the send-off pool
+* [CLJ-1041](http://dev.clojure.org/jira/browse/CLJ-1041)
+ reduce-kv on sorted maps should stop on seeing a Reduced value
+* [CLJ-1011](http://dev.clojure.org/jira/browse/CLJ-1011)
+ clojure.data/diff should cope with null and false values in maps
+* [CLJ-977](http://dev.clojure.org/jira/browse/CLJ-977)
+ (int \a) returns a value, (long \a) throws an exception
+* [CLJ-964](http://dev.clojure.org/jira/browse/CLJ-964)
+ test-clojure/rt.clj has undeclared dependency on clojure.set
+* [CLJ-923](http://dev.clojure.org/jira/browse/CLJ-923)
+ Reading ratios prefixed by + is not working
+* [CLJ-1012](http://dev.clojure.org/jira/browse/CLJ-1012)
+ partial function should also accept 1 arg (just f)
+* [CLJ-932](http://dev.clojure.org/jira/browse/CLJ-932)
+ contains? Should throw exception on non-keyed collections
+* [CLJ-730](http://dev.clojure.org/jira/browse/CLJ-730) Create test suite for functional fns (e.g. juxt, comp, partial, etc.)
+* [CLJ-757](http://dev.clojure.org/jira/browse/CLJ-757)
+ Empty transient maps/sets return wrong value for .contains
+* [CLJ-828](http://dev.clojure.org/jira/browse/CLJ-828)
+ clojure.core/bases returns a cons when passed a class and a Java array when passed an interface
+* [CLJ-1062](http://dev.clojure.org/jira/browse/CLJ-1062)
+ CLJ-940 breaks compilation of namespaces that don't have any public functions
+* [CLJ-1070](http://dev.clojure.org/jira/browse/CLJ-1070)
+ PersistentQueue's hash function does not match its equality
+* [CLJ-987](http://dev.clojure.org/jira/browse/CLJ-987)
+ pprint doesn't flush the underlying stream
+* [CLJ-963](http://dev.clojure.org/jira/browse/CLJ-963)
+ Support pretty printing namespace declarations under code-dispatch
+* [CLJ-902](http://dev.clojure.org/jira/browse/CLJ-902)
+ doc macro broken for namespaces
+* [CLJ-909](http://dev.clojure.org/jira/browse/CLJ-909) Make LineNumberingPushbackReader's buffer size configurable
+* [CLJ-910](http://dev.clojure.org/jira/browse/CLJ-910) Allow for type-hinting the method receiver in memfn
+* [CLJ-1048](http://dev.clojure.org/jira/browse/CLJ-1048) add test.generative to Clojure's tests
+* [CLJ-1071](http://dev.clojure.org/jira/browse/CLJ-1071) ExceptionInfo does no abstraction
+* [CLJ-1085](http://dev.clojure.org/jira/browse/CLJ-1085) clojure.main/repl unconditionally refers REPL utilities into `*ns*`
+* (no ticket) Rich Hickey fix: syntax-quote was walking records, returning maps
+
+
+# Changes to ClojureCLR in Version 1.5
+
+We have made all the changes, bug fixes, etc., listed above that are relevant to ClojureCLR,
+_except_ for the change to use test.generative. The test.generative lib is used only in the
+test suite. We plan to make that change in the future when we have a more robust build system
+that facilitates pulling in clojure libs.
+
+## 1 New and improved features
+
+### 1.1 Clojure 1.5 reducers library dependency
+
+The new reducers library (see above) in ClojureCLR also has a version
+dependency. In .Net 4.0 and later, the fork/join capability required
+by the reducers library is implemented using System.Threading.Tasks.Task.
+in .Net 3.5 and earlier, we use our own minimal implmenentation of Task named
+clojure.lang.Task35 to provide the needed functionality for this use.
+This should be invisible to the user.
+
+### 1.2 Mono
+
+The build process has been cleaned up and enhancements made to allow builds to work using Mono.
+
+### Primitive type hints
+
+We now allow type hints such as ^System.Double to work the same as ^double. This was required
+in order to allow extend-protocol to extend to primitive types. (And also to meet user expectations.)
+
+## 2 Bug fixes specific to ClojureCLR
+
+* Updated arr with ^objects type information so the aget function will be properly resolved
+* Make re-groups.direct (clojure.string) private
+* Fix RT.nth problem with infinite LazySeqs
+* Fix clojure.repl proxy of PushbackTextReader problem under .Net 4.5
+* Add IDisposable type hint in with-open
+
Please sign in to comment.
Something went wrong with that request. Please try again.