Skip to content

Commit 21a7603

Browse files
puredangerstuarthalloway
authored andcommitted
CLJ-1345 - update changelog for 1.6
Signed-off-by: Stuart Halloway <stu@cognitect.com>
1 parent 22b0c0a commit 21a7603

File tree

1 file changed

+147
-31
lines changed

1 file changed

+147
-31
lines changed

changes.md

+147-31
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66

77
## 1 Compatibility and Dependencies
88

9-
## 1.1 JDK Version Updates
9+
## 1.1 JDK Version Update
1010

11-
Clojure now builds with Java SE 1.6 and emits bytecode requiring Java SE 1.6 instead of Java SE 1.5. [CLJ-1268]
11+
Clojure now builds with Java SE 1.6 and emits bytecode requiring Java
12+
SE 1.6 instead of Java SE 1.5. [CLJ-1268]
1213

13-
## 1.2 Promoted "Alpha" Features
14+
## 1.2 ASM Library Update
15+
16+
The embedded version of the ASM bytecode library has been upgraded to
17+
ASM 4.1. [CLJ-713]
18+
19+
## 1.3 Promoted "Alpha" Features
1420

1521
The following features are no longer marked Alpha in Clojure:
1622

@@ -26,53 +32,123 @@ The following features are no longer marked Alpha in Clojure:
2632

2733
### 2.1 Java API
2834

29-
The clojure.api package provides a minimal interface to bootstrap Clojure access from other JVM languages. It does this by providing:
30-
1. The ability to use Clojure's namespaces to locate an arbitrary var, returning the var's clojure.lang.IFn interface.
31-
2. A convenience method read for reading data using Clojure's edn reader
35+
The clojure.java.api package provides a minimal interface to bootstrap
36+
Clojure access from other JVM languages. It does this by providing:
37+
1. The ability to use Clojure's namespaces to locate an arbitrary var,
38+
returning the var's clojure.lang.IFn interface.
39+
2. A convenience method read for reading data using Clojure's edn
40+
reader.
3241

33-
IFns provide complete access to Clojure's APIs. You can also access any other library written in Clojure, after adding either its source or compiled form to the classpath.
42+
IFns provide complete access to Clojure's APIs. You can also access
43+
any other library written in Clojure, after adding either its source
44+
or compiled form to the classpath.
3445

3546
The public Java API for Clojure consists of the following classes and interfaces:
3647

37-
* clojure.api.API
48+
* clojure.java.api.Clojure
3849
* clojure.lang.IFn
3950

40-
All other Java classes should be treated as implementation details, and applications should avoid relying on them.
51+
All other Java classes should be treated as implementation details,
52+
and applications should avoid relying on them.
4153

42-
To lookup and call a Clojure function:
54+
To look up and call a Clojure function:
4355

44-
IFn plus = API.var("clojure.core", "+");
56+
IFn plus = Clojure.var("clojure.core", "+");
4557
plus.invoke(1, 2);
4658

47-
Functions in clojure.core are automatically loaded. Other namespaces can be loaded via require:
59+
Functions in clojure.core are automatically loaded. Other namespaces
60+
can be loaded via require:
4861

49-
IFn require = API.var("clojure.core", "require");
50-
require.invoke(API.read("clojure.set"));
62+
IFn require = Clojure.var("clojure.core", "require");
63+
require.invoke(Clojure.read("clojure.set"));
5164

52-
IFns can be passed to higher order functions, e.g. the example below passes plus to read:
65+
IFns can be passed to higher order functions, e.g. the example below
66+
passes plus to read:
67+
68+
IFn map = Clojure.var("clojure.core", "map");
69+
IFn inc = Clojure.var("clojure.core", "inc");
70+
map.invoke(inc, Clojure.read("[1 2 3]"));
71+
72+
Most IFns in Clojure refer to functions. A few, however, refer to
73+
non-function data values. To access these, use deref instead of fn:
74+
75+
IFn printLength = Clojure.var("clojure.core", "*print-length*");
76+
Clojure.var("clojure.core", "deref").invoke(printLength);
77+
78+
### 2.2 Map destructuring extended to support namespaced keys
79+
80+
* [CLJ-1318](http://dev.clojure.org/jira/browse/CLJ-1318)
81+
82+
In the past, map destructuring with :keys and :syms would not work
83+
with maps containing namespaced keys or symbols. The :keys and :syms
84+
forms have been updated to allow them to match namespaced keys and
85+
bind to a local variable based on the name.
86+
87+
Examples:
5388

54-
IFn map = API.var("clojure.core", "map");
55-
IFn inc = API.var("clojure.core", "inc");
56-
map.invoke(inc, API.read("[1 2 3]"));
89+
(let [m {:x/a 1, :y/b 2}
90+
{:keys [x/a y/b]} m]
91+
(+ a b))
5792

58-
Most IFns in Clojure refer to functions. A few, however, refer to non-function data values. To access these, use deref instead of fn:
93+
(let [m {'x/a 1, 'y/b 2}
94+
{:syms [x/a y/b]} m]
95+
(+ a b))
5996

60-
IFn printLength = API.var("clojure.core", "*print-length*");
61-
API.var("clojure.core", "deref").invoke(printLength);
97+
Additionally, the :keys form can now take keywords instead of symbols.
98+
This provides support specifically for auto-resolved keywords:
6299

63-
### 2.2 bitops
100+
(let [m {:x/a 1, :y/b 2}
101+
{:keys [:x/a :y/b]} m]
102+
(+ a b))
103+
104+
(let [m {::x 1}
105+
{:keys [::x]} m]
106+
x)
107+
108+
### 2.3 New "some" operations
109+
110+
Many conditional functions rely on logical truth (where "falsey"
111+
values are nil or false). Sometimes it is useful to have functions
112+
that rely on "not nilness" instead. These functions have been added to
113+
support these cases [CLJ-1343]:
114+
115+
* some? - same as (not (nil? x))
116+
* if-some - like if-let, but checks (some? test) instead of test
117+
* when-some - like when-let, but checks (some? test) instead of test
118+
119+
### 2.4 Hashing
120+
121+
Clojure 1.6 provides new hashing algorithms for primitives and
122+
collections, accessible via IHashEq/hasheq (in Java) or the
123+
clojure.core/hash function (in Clojure). In general, these changes
124+
should be transparent to users, except hash codes used inside hashed
125+
collections like maps and sets will have better properties.
126+
127+
Hash codes returned by the Java .hashCode() method are unchanged and
128+
continue to match Java behavior or conform to the Java specification
129+
as appropriate.
130+
131+
Any collections implementing IHashEq or wishing to interoperate with
132+
Clojure collections should conform to the hashing algorithms specified
133+
in http://clojure.org/data_structures#hash and use the new function
134+
`mix-collection-hash` for the final mixing operation. Any details of
135+
the current hashing algorithm not specified on that page should be
136+
considered subject to future change.
137+
138+
### 2.5 bitops
64139

65140
* [CLJ-827](http://dev.clojure.org/jira/browse/CLJ-827) - unsigned-bit-shift-right
66141

67-
A new unsigned-bit-shift-right (Java's >>>) has been added to the core library. The shift distance
68-
is truncated to the least 6 bits (per the Java specification for long >>>).
142+
A new unsigned-bit-shift-right (Java's >>>) has been added to the core
143+
library. The shift distance is truncated to the least 6 bits (per the
144+
Java specification for long >>>).
69145

70146
Examples:
71147
(unsigned-bit-shift-right 2r100 1) ;; 2r010
72148
(unsigned-bit-shift-right 2r100 2) ;; 2r001
73149
(unsigned-bit-shift-right 2r100 3) ;; 2r000
74150

75-
### 2.3 clojure.test
151+
### 2.6 clojure.test
76152

77153
* [CLJ-866](http://dev.clojure.org/jira/browse/CLJ-866) - test-vars
78154

@@ -108,20 +184,27 @@ runs them *with their fixtures*.
108184
* [CLJ-1143](http://dev.clojure.org/jira/browse/CLJ-1143)
109185
Correct doc string for ns macro.
110186
* [CLJ-196](http://dev.clojure.org/jira/browse/CLJ-196)
111-
Clarify value of *file* is undefined in the REPL.
187+
Clarify value of *file* is undefined in the REPL.
112188
* [CLJ-1228](http://dev.clojure.org/jira/browse/CLJ-1228)
113189
Fix a number of spelling errors in namespace and doc strings.
114190
* [CLJ-835](http://dev.clojure.org/jira/browse/CLJ-835)
115191
Update defmulti doc to clarify expectations for hierarchy argument.
192+
* [CLJ-1304](http://dev.clojure.org/jira/browse/CLJ-1304)
193+
Fix minor typos in documentation and comments
194+
* [CLJ-1302](http://dev.clojure.org/jira/browse/CLJ-1302)
195+
Mention that keys and vals order are consistent with seq order
116196

117197
### 3.4 Performance
118198

119199
* [CLJ-858](http://dev.clojure.org/jira/browse/CLJ-858)
120200
Improve speed of STM by removing System.currentTimeMillis.
121201
* [CLJ-669](http://dev.clojure.org/jira/browse/CLJ-669)
122202
clojure.java.io/do-copy: use java.nio for Files
203+
* [commit](https://github.com/clojure/clojure/commit/0b73494c3c855e54b1da591eeb687f24f608f346)
204+
Reduce overhead of protocol callsites by removing unneeded generated
205+
cache fields.
123206

124-
### 3.5 Other improvements
207+
### 3.5 Other enhancements
125208

126209
* [CLJ-908](http://dev.clojure.org/jira/browse/CLJ-908)
127210
Make *default-data-reader-fn* set!-able in REPL, similar to *data-readers*.
@@ -141,6 +224,12 @@ runs them *with their fixtures*.
141224
Allow EdnReader to read foo// (matches LispReader behavior).
142225
* [CLJ-1264](http://dev.clojure.org/jira/browse/CLJ-1264)
143226
Remove uses of _ as a var in the Java code (causes warning in Java 8).
227+
* [CLJ-394](http://dev.clojure.org/jira/browse/CLJ-394)
228+
Add record? predicate.
229+
* [CLJ-1200](http://dev.clojure.org/jira/browse/CLJ-1200)
230+
ArraySeq dead code cleanup, ArraySeq_short support added.
231+
* [CLJ-1331](http://dev.clojure.org/jira/browse/CLJ-1331)
232+
Primitive vectors should implement hasheq and use new hash algorithm
144233

145234
## 4 Bug Fixes
146235

@@ -157,7 +246,8 @@ runs them *with their fixtures*.
157246
* [CLJ-1161](http://dev.clojure.org/jira/browse/CLJ-1161)
158247
Remove bad version.properties from sources jar.
159248
* [CLJ-1175](http://dev.clojure.org/jira/browse/CLJ-1175)
160-
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.
249+
Fix invalid behavior of Delay/deref if an exception is thrown - exception will
250+
now be rethrown on subsequent calls and not enter a corrupted state.
161251
* [CLJ-1171](http://dev.clojure.org/jira/browse/CLJ-1171)
162252
Fix several issues with instance? to make it consistent when used with apply.
163253
* [CLJ-1202](http://dev.clojure.org/jira/browse/CLJ-1202)
@@ -179,14 +269,40 @@ runs them *with their fixtures*.
179269
* [CLJ-1076](http://dev.clojure.org/jira/browse/CLJ-1076)
180270
pprint tests fail on Windows, expecting \n.
181271
* [CLJ-766](http://dev.clojure.org/jira/browse/CLJ-766)
182-
Make into-array work consistently with short-array and byte-array on bigger types.
272+
Make into-array work consistently with short-array and byte-array on
273+
bigger types.
183274
* [CLJ-1285](http://dev.clojure.org/jira/browse/CLJ-1285)
184-
Data structure invariants are violated after persistent operations when collision node created by transients.
275+
Data structure invariants are violated after persistent operations when
276+
collision node created by transients.
185277
* [CLJ-1222](http://dev.clojure.org/jira/browse/CLJ-1222)
186278
Multiplication overflow issues around Long/MIN_VALUE
187279
* [CLJ-1118](http://dev.clojure.org/jira/browse/CLJ-1118)
188280
Inconsistent numeric comparison semantics between BigDecimals and other numerics
189-
281+
* [CLJ-1125](http://dev.clojure.org/jira/browse/CLJ-1125)
282+
Clojure can leak memory in a servlet container when using dynamic
283+
bindings or STM transactions.
284+
* [CLJ-1082](http://dev.clojure.org/jira/browse/CLJ-1082)
285+
Subvecs of primitve vectors cannot be reduced
286+
* [CLJ-1301](http://dev.clojure.org/jira/browse/CLJ-1301)
287+
Case expressions use a mixture of hashCode and hasheq, potentially
288+
leading to missed case matches when these differ.
289+
* [CLJ-983](http://dev.clojure.org/jira/browse/CLJ-983)
290+
proxy-super does not restore original binding if call throws exception
291+
* [CLJ-1176](http://dev.clojure.org/jira/browse/CLJ-1176)
292+
clojure.repl/source errors when *read-eval* bound to :unknown
293+
* [CLJ-935](http://dev.clojure.org/jira/browse/CLJ-935)
294+
clojure.string/trim uses different definition of whitespace than
295+
triml and trimr
296+
* [CLJ-935](http://dev.clojure.org/jira/browse/CLJ-935)
297+
StackOverflowError on exception in reducef for PersistentHashMap
298+
fold
299+
* [CLJ-1328](http://dev.clojure.org/jira/browse/CLJ-1328)
300+
Fix some tests in the Clojure test suite to make their names unique
301+
and independent of hashing order
302+
* [CLJ-1328](http://dev.clojure.org/jira/browse/CLJ-1328)
303+
Empty primitive vectors throw NPE on .equals with non-vector
304+
sequential types
305+
190306
# Changes to Clojure in Version 1.5.1
191307

192308
* fix for leak caused by ddc65a96fdb1163b

0 commit comments

Comments
 (0)