Tue Jul 23 20:33:51 2019 UTC ()
Update to Clojure 1.8.0

1 New and Improved Features

1.1 Direct Linking

Direct linking can be enabled with -Dclojure.compiler.direct-linking=true

Direct linking allows functions compiled with direct linking on to make direct static method calls to most other functions, instead of going through the var and the Fn object. This can enable further optimization by the jit, at a cost in dynamism. In particular, directly-linked calls will not see redefinitions.

With this change, clojure.core itself is compiled with direct linking and therefore other namespaces cannot redefine core fns and have those redefinitions seen by core code.

A new metadata key ^:redef is provided. A function declared with this key can be redefined and will never be direct linked. Also, functions declared as ^:dynamic will never be direct linked.

CLJ-1809
CLJ-1805
CLJ-1854
CLJ-1856
1.2 String Functions

Several new string functions were added to clojure.string to increase portability and reduce the need for Java interop calls:

index-of - search for the index of a char or string in a string

last-index-of - search for the index of a char or string backwards in a string

starts-with? - true if string starts with a substring

ends-with? - true if string ends with a substring

includes? - true if string includes a substring

CLJ-1449

1.3 Socket Server and REPL

The Clojure runtime now has the ability to start a socket server at initialization based on system properties. One expected use for this is serving a socket-based REPL, but it also has many other potential uses for dynamically adding server capability to existing programs without code changes.

A socket server will be started for each JVM system property like clojure.server.<server-name>. The value for this property is an edn map representing the configuration of the socket server with the following properties:

address - host or address, defaults to loopback
port - positive integer, required
accept - namespaced symbol of function to invoke on socket accept, required
args - sequential collection of args to pass to accept
bind-err - defaults to true, binds *err* to socket out stream
server-daemon - defaults to true, socket server thread doesn't block exit
client-daemon - defaults to true, socket client thread doesn't block exit
Additionally, there is a repl function provided that is slightly customized for use with the socket server in clojure.core.server/repl.

Following is an example of starting a socket server with a repl listener. This can be added to any existing Clojure program to allow it to accept external REPL clients.

-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"
An example client you can use to connect to this socket repl is telnet:

$ telnet 127.0.0.1 5555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
user=> (println "hello")
hello
See:

CLJ-1671
CLJ-1853
Socket REPL design page
CLJ-1829
2 Enhancements

2.1 Error handling

CLJ-1778 let-bound namespace-qualified bindings should throw (if not map destructuring)
CLJ-1456 Compiler now errors if too few or too many arguments to throw
CLJ-1282 quote now throws if passed more or less than one arg
CLJ-1210 Improved error message for (clojure.java.io/reader nil)
2.2 Documentation strings

CLJ-1060 'list*' returns not a list
CLJ-1722 Typo in the docstring of 'with-bindings'
CLJ-1769 Docstrings for *' and +' refer to * and +
CLJ-1414 sort and sort-by now indicate sort is stable in docstring
2.3 Performance

CLJ-703 Improve writeClassFile performance
CLJ-1765 areduce performance improvements
CLJ-1724 Remove unnecessary call to seq() in LazySeq.hashCode()
CLJ-1295 Improved array-map dissoc performance
CLJ-1277 Speed up printing of time instants with type hints
CLJ-1259 Speed up pprint and cl-format with type hints
CLJ-668 Improve slurp performance by using StringWriter and jio/copy
2.4 Other enhancements

CLJ-1208 Optionally require namespace on defrecord class init
CLJ-1823 Document new :load-ns option to defrecord/deftype
CLJ-1810 ATransientMap now marked public
CLJ-1653 str of an empty list should be "()"
CLJ-1567 Removed unused local in condp implementation
CLJ-1351 Unused swapThunk method was being emitted for fns with keyword callsites
CLJ-1329 Removed unused local in PersistentVector.cons()
CLJ-1831 Add clojure.core/map-entry? predicate
CLJ-1845 Make clojure.core/load dynamic so it can be redef'ed even with direct linking
3 Bug Fixes

CLJ-130 Namespace metadata lost in AOT compile
CLJ-1134 star-directive in clojure.pprint/cl-format with at-prefix ("~n@*") does not obey its specification
CLJ-1137 Metadata on a def gets evaluated twice
CLJ-1157 Classes generated by gen-class aren't loadable from remote codebase
CLJ-1225 quot overflow issues around Long/MIN_VALUE for BigInt
CLJ-1313 Correct a few unit tests
CLJ-1319 array-map fails lazily if passed an odd number of arguments
CLJ-1361 pprint with code-dispatch incorrectly prints a simple ns macro call
CLJ-1390 pprint a GregorianCalendar results in Arity exception
CLJ-1399 field name unmunged when recreating deftypes serialized into bytecode
CLJ-1485 clojure.test.junit/with-junit-output doesn't handle multiple expressions
CLJ-1528 clojure.test/inc-report-counter is not thread-safe
CLJ-1533 invokePrim path does not take into account var or form meta
CLJ-1562 some->,some->>,cond->,cond->> and as-> doesn't work with (recur)
CLJ-1565 pprint produces infinite output for a protocol
CLJ-1588 StackOverflow in clojure.test macroexpand with are and anon fn
CLJ-1644 into-array fails for sequences starting with nil
CLJ-1645 protocol class does not set the source file
CLJ-1657 proxy bytecode calls super methods of abstract classes
CLJ-1659 compile leaks files
CLJ-1761 clojure.core/run! does not always return nil per docstring
CLJ-1782 Spelling mistake in clojure.test/use-fixtures
CLJ-1785 Reader conditionals throw when returning nil
CLJ-1766 Serializing+deserializing lists breaks their hash
CLJ-1609 Edge case in Reflector's search for a public method declaration
CLJ-1586 Compiler doesn't preserve metadata for LazySeq literals
CLJ-1232 Functions with non-qualified return type hints will now work without import from other namespace
CLJ-1812 Fix test failure on windows due to line endings
CLJ-1380 3-arg ExceptionInfo constructor permitted nil data
CLJ-1226 set! of a deftype field using field-access syntax caused ClassCastException
Records and types without fields eval to empty map
CLJ-1827 Fix reflection warning introduced in CLJ-1259
CLJ-1453 Ensure that all Iterator implementations throw NoSuchElementException on next() when exhausted
CLJ-1868 Avoid compiler NPE when checking class return type


(sevan)
diff -r1.6 -r1.7 pkgsrc/lang/clojure/Makefile
diff -r1.2 -r1.3 pkgsrc/lang/clojure/PLIST
diff -r1.3 -r1.4 pkgsrc/lang/clojure/distinfo

cvs diff -r1.6 -r1.7 pkgsrc/lang/clojure/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/clojure/Makefile 2019/05/23 19:23:02 1.6
+++ pkgsrc/lang/clojure/Makefile 2019/07/23 20:33:51 1.7
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.6 2019/05/23 19:23:02 rillig Exp $ 1# $NetBSD: Makefile,v 1.7 2019/07/23 20:33:51 sevan Exp $
2 2
3DISTNAME= clojure-1.5.1 3DISTNAME= clojure-1.8.0
4CATEGORIES= lang 4CATEGORIES= lang
5MASTER_SITES= http://repo1.maven.org/maven2/org/clojure/clojure/${PKGVERSION_NOREV}/ 5MASTER_SITES= http://repo1.maven.org/maven2/org/clojure/clojure/${PKGVERSION_NOREV}/
6EXTRACT_SUFX= .zip 6EXTRACT_SUFX= .zip
7 7
8MAINTAINER= ryoon@NetBSD.org 8MAINTAINER= ryoon@NetBSD.org
9HOMEPAGE= https://clojure.org/ 9HOMEPAGE= https://clojure.org/
10COMMENT= Dynamic programming language that targets the Java VM 10COMMENT= Dynamic programming language that targets the Java VM
11LICENSE= epl-v1.0 11LICENSE= epl-v1.0
12 12
13NO_BUILD= yes 13NO_BUILD= yes
14USE_JAVA= run 14USE_JAVA= run
15USE_JAVA2= 1.5 15USE_JAVA2= 1.5
16USE_LANGUAGES= # none 16USE_LANGUAGES= # none

cvs diff -r1.2 -r1.3 pkgsrc/lang/clojure/PLIST (expand / switch to unified diff)

--- pkgsrc/lang/clojure/PLIST 2013/06/11 19:51:27 1.2
+++ pkgsrc/lang/clojure/PLIST 2019/07/23 20:33:51 1.3
@@ -1,35 +1,41 @@ @@ -1,35 +1,41 @@
1@comment $NetBSD: PLIST,v 1.2 2013/06/11 19:51:27 asau Exp $ 1@comment $NetBSD: PLIST,v 1.3 2019/07/23 20:33:51 sevan Exp $
2bin/clj 2bin/clj
3lib/java/clojure/clojure.jar 3lib/java/clojure/clojure.jar
4share/doc/${PKGNAME}/CommonLispFormat.markdown 4share/doc/${PKGNAME}/CommonLispFormat.markdown
5share/doc/${PKGNAME}/PrettyPrinting.markdown 5share/doc/${PKGNAME}/PrettyPrinting.markdown
6share/doc/${PKGNAME}/changes.md 6share/doc/${PKGNAME}/changes.md
7share/doc/${PKGNAME}/epl-v10.html 7share/doc/${PKGNAME}/epl-v10.html
8share/doc/${PKGNAME}/readme.txt 8share/doc/${PKGNAME}/readme.txt
9share/examples/${PKGNAME}/test_clojure/agents.clj 9share/examples/${PKGNAME}/test_clojure/agents.clj
10share/examples/${PKGNAME}/test_clojure/annotations.clj 10share/examples/${PKGNAME}/test_clojure/annotations.clj
11share/examples/${PKGNAME}/test_clojure/annotations/java_5.clj 11share/examples/${PKGNAME}/test_clojure/annotations/java_5.clj
12share/examples/${PKGNAME}/test_clojure/annotations/java_6.clj 12share/examples/${PKGNAME}/test_clojure/annotations/java_6.clj
 13share/examples/${PKGNAME}/test_clojure/api.clj
13share/examples/${PKGNAME}/test_clojure/atoms.clj 14share/examples/${PKGNAME}/test_clojure/atoms.clj
14share/examples/${PKGNAME}/test_clojure/clojure_set.clj 15share/examples/${PKGNAME}/test_clojure/clojure_set.clj
15share/examples/${PKGNAME}/test_clojure/clojure_walk.clj 16share/examples/${PKGNAME}/test_clojure/clojure_walk.clj
16share/examples/${PKGNAME}/test_clojure/clojure_xml.clj 17share/examples/${PKGNAME}/test_clojure/clojure_xml.clj
17share/examples/${PKGNAME}/test_clojure/clojure_zip.clj 18share/examples/${PKGNAME}/test_clojure/clojure_zip.clj
18share/examples/${PKGNAME}/test_clojure/compilation.clj 19share/examples/${PKGNAME}/test_clojure/compilation.clj
 20share/examples/${PKGNAME}/test_clojure/compilation/examples.clj
 21share/examples/${PKGNAME}/test_clojure/compilation/line_number_examples.clj
 22share/examples/${PKGNAME}/test_clojure/compilation/load_ns.clj
19share/examples/${PKGNAME}/test_clojure/control.clj 23share/examples/${PKGNAME}/test_clojure/control.clj
20share/examples/${PKGNAME}/test_clojure/data.clj 24share/examples/${PKGNAME}/test_clojure/data.clj
21share/examples/${PKGNAME}/test_clojure/data_structures.clj 25share/examples/${PKGNAME}/test_clojure/data_structures.clj
 26share/examples/${PKGNAME}/test_clojure/data_structures_interop.clj
22share/examples/${PKGNAME}/test_clojure/def.clj 27share/examples/${PKGNAME}/test_clojure/def.clj
 28share/examples/${PKGNAME}/test_clojure/delays.clj
23share/examples/${PKGNAME}/test_clojure/edn.clj 29share/examples/${PKGNAME}/test_clojure/edn.clj
24share/examples/${PKGNAME}/test_clojure/errors.clj 30share/examples/${PKGNAME}/test_clojure/errors.clj
25share/examples/${PKGNAME}/test_clojure/evaluation.clj 31share/examples/${PKGNAME}/test_clojure/evaluation.clj
26share/examples/${PKGNAME}/test_clojure/fn.clj 32share/examples/${PKGNAME}/test_clojure/fn.clj
27share/examples/${PKGNAME}/test_clojure/for.clj 33share/examples/${PKGNAME}/test_clojure/for.clj
28share/examples/${PKGNAME}/test_clojure/genclass.clj 34share/examples/${PKGNAME}/test_clojure/genclass.clj
29share/examples/${PKGNAME}/test_clojure/genclass/examples.clj 35share/examples/${PKGNAME}/test_clojure/genclass/examples.clj
30share/examples/${PKGNAME}/test_clojure/generators.clj 36share/examples/${PKGNAME}/test_clojure/generators.clj
31share/examples/${PKGNAME}/test_clojure/java/io.clj 37share/examples/${PKGNAME}/test_clojure/java/io.clj
32share/examples/${PKGNAME}/test_clojure/java/javadoc.clj 38share/examples/${PKGNAME}/test_clojure/java/javadoc.clj
33share/examples/${PKGNAME}/test_clojure/java/shell.clj 39share/examples/${PKGNAME}/test_clojure/java/shell.clj
34share/examples/${PKGNAME}/test_clojure/java_interop.clj 40share/examples/${PKGNAME}/test_clojure/java_interop.clj
35share/examples/${PKGNAME}/test_clojure/keywords.clj 41share/examples/${PKGNAME}/test_clojure/keywords.clj
@@ -42,31 +48,34 @@ share/examples/${PKGNAME}/test_clojure/n @@ -42,31 +48,34 @@ share/examples/${PKGNAME}/test_clojure/n
42share/examples/${PKGNAME}/test_clojure/numbers.clj 48share/examples/${PKGNAME}/test_clojure/numbers.clj
43share/examples/${PKGNAME}/test_clojure/other_functions.clj 49share/examples/${PKGNAME}/test_clojure/other_functions.clj
44share/examples/${PKGNAME}/test_clojure/parallel.clj 50share/examples/${PKGNAME}/test_clojure/parallel.clj
45share/examples/${PKGNAME}/test_clojure/pprint.clj 51share/examples/${PKGNAME}/test_clojure/pprint.clj
46share/examples/${PKGNAME}/test_clojure/pprint/test_cl_format.clj 52share/examples/${PKGNAME}/test_clojure/pprint/test_cl_format.clj
47share/examples/${PKGNAME}/test_clojure/pprint/test_helper.clj 53share/examples/${PKGNAME}/test_clojure/pprint/test_helper.clj
48share/examples/${PKGNAME}/test_clojure/pprint/test_pretty.clj 54share/examples/${PKGNAME}/test_clojure/pprint/test_pretty.clj
49share/examples/${PKGNAME}/test_clojure/predicates.clj 55share/examples/${PKGNAME}/test_clojure/predicates.clj
50share/examples/${PKGNAME}/test_clojure/printer.clj 56share/examples/${PKGNAME}/test_clojure/printer.clj
51share/examples/${PKGNAME}/test_clojure/protocols.clj 57share/examples/${PKGNAME}/test_clojure/protocols.clj
52share/examples/${PKGNAME}/test_clojure/protocols/examples.clj 58share/examples/${PKGNAME}/test_clojure/protocols/examples.clj
53share/examples/${PKGNAME}/test_clojure/protocols/hash_collisions.clj 59share/examples/${PKGNAME}/test_clojure/protocols/hash_collisions.clj
54share/examples/${PKGNAME}/test_clojure/protocols/more_examples.clj 60share/examples/${PKGNAME}/test_clojure/protocols/more_examples.clj
55share/examples/${PKGNAME}/test_clojure/reader.clj 61share/examples/${PKGNAME}/test_clojure/reader.cljc
56share/examples/${PKGNAME}/test_clojure/reducers.clj 62share/examples/${PKGNAME}/test_clojure/reducers.clj
57share/examples/${PKGNAME}/test_clojure/reflect.clj 63share/examples/${PKGNAME}/test_clojure/reflect.clj
58share/examples/${PKGNAME}/test_clojure/refs.clj 64share/examples/${PKGNAME}/test_clojure/refs.clj
59share/examples/${PKGNAME}/test_clojure/repl.clj 65share/examples/${PKGNAME}/test_clojure/repl.clj
60share/examples/${PKGNAME}/test_clojure/repl/example.clj 66share/examples/${PKGNAME}/test_clojure/repl/example.clj
61share/examples/${PKGNAME}/test_clojure/rt.clj 67share/examples/${PKGNAME}/test_clojure/rt.clj
62share/examples/${PKGNAME}/test_clojure/sequences.clj 68share/examples/${PKGNAME}/test_clojure/sequences.clj
63share/examples/${PKGNAME}/test_clojure/serialization.clj 69share/examples/${PKGNAME}/test_clojure/serialization.clj
 70share/examples/${PKGNAME}/test_clojure/server.clj
64share/examples/${PKGNAME}/test_clojure/special.clj 71share/examples/${PKGNAME}/test_clojure/special.clj
65share/examples/${PKGNAME}/test_clojure/string.clj 72share/examples/${PKGNAME}/test_clojure/string.clj
66share/examples/${PKGNAME}/test_clojure/test.clj 73share/examples/${PKGNAME}/test_clojure/test.clj
67share/examples/${PKGNAME}/test_clojure/test_fixtures.clj 74share/examples/${PKGNAME}/test_clojure/test_fixtures.clj
 75share/examples/${PKGNAME}/test_clojure/transducers.clj
68share/examples/${PKGNAME}/test_clojure/transients.clj 76share/examples/${PKGNAME}/test_clojure/transients.clj
69share/examples/${PKGNAME}/test_clojure/try_catch.clj 77share/examples/${PKGNAME}/test_clojure/try_catch.clj
70share/examples/${PKGNAME}/test_clojure/vars.clj 78share/examples/${PKGNAME}/test_clojure/vars.clj
71share/examples/${PKGNAME}/test_clojure/vectors.clj 79share/examples/${PKGNAME}/test_clojure/vectors.clj
 80share/examples/${PKGNAME}/test_clojure/volatiles.clj
72share/examples/${PKGNAME}/test_helper.clj 81share/examples/${PKGNAME}/test_helper.clj

cvs diff -r1.3 -r1.4 pkgsrc/lang/clojure/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/clojure/distinfo 2015/11/03 22:50:33 1.3
+++ pkgsrc/lang/clojure/distinfo 2019/07/23 20:33:51 1.4
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.3 2015/11/03 22:50:33 agc Exp $ 1$NetBSD: distinfo,v 1.4 2019/07/23 20:33:51 sevan Exp $
2 2
3SHA1 (clojure-1.5.1.zip) = 90d09dff6e6ded4382d06ff3b3ab03be471fcab2 3SHA1 (clojure-1.8.0.zip) = 93e9dd5559225d219b557b418bfcabd5c2a2ade6
4RMD160 (clojure-1.5.1.zip) = 445d57d54fef88127c9437e7017f18786c0c1411 4RMD160 (clojure-1.8.0.zip) = e447a3e7e81ace291b3c75ecca4742ed98f5f8e5
5SHA512 (clojure-1.5.1.zip) = 104acf7260bcb1440a9b6aa4719f595b091925e1254a83f6479530abeb4ec0f6f9e2598b5afdbf1fa1519c2e0cc42d6bd08839f274aad8d8e47917206b5907f6 5SHA512 (clojure-1.8.0.zip) = fda661310f5b52045e87701146415eae57c1c5b1fa1968f64b7e214bc386fe49e3df5bccb53aeab3234631d07c969e3e716b0ee83528c9226f505abb205a2dbd
6Size (clojure-1.5.1.zip) = 4783378 bytes 6Size (clojure-1.8.0.zip) = 5017209 bytes