[ANN] Clojure 1.9.0-RC1

1,476 views
Skip to first unread message

Alex Miller

unread,
Nov 7, 2017, 9:58:24 AM11/7/17
to Clojure
Clojure 1.9.0-RC1 is now available.

Try it via

- Leiningen: [org.clojure/clojure "1.9.0-RC1"]

1.9.0-RC1 is the same as 1.9.0-beta4.

We would appreciate anything you can do to try out this release. We do not plan to make any further changes prior to 1.9.0 release unless regressions are found.

Rick Moynihan

unread,
Nov 9, 2017, 6:09:58 PM11/9/17
to Clojure
One more data point. 

I haven't uncovered any regressions yet on beta4 & have upgraded a few libraries and apps; though none are in production yet I've been working with it more or less daily since the beta4 release.

R.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Miller

unread,
Nov 9, 2017, 6:26:54 PM11/9/17
to Clojure
Thanks, that’s good to hear.

Sean Corfield

unread,
Nov 10, 2017, 2:49:07 AM11/10/17
to clo...@googlegroups.com

We have three processes running RC1 in production as of today. Looks good so far. We’ve had everything else up and running on Beta 4 in production since Monday, also looking good.

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

 


From: clo...@googlegroups.com <clo...@googlegroups.com> on behalf of Alex Miller <al...@puredanger.com>
Sent: Tuesday, November 7, 2017 6:58:24 AM
To: Clojure
Subject: [ANN] Clojure 1.9.0-RC1
 
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Beau Fabry

unread,
Nov 10, 2017, 1:08:35 PM11/10/17
to Clojure
We've switched both of our main projects to RC1 and have had no issues yet.

Didier

unread,
Nov 10, 2017, 1:48:01 PM11/10/17
to Clojure
Is Clojure 1.9 expected to support JDK9? Or is that support reserved for a later version?

Alex Miller

unread,
Nov 10, 2017, 2:20:21 PM11/10/17
to Clojure
Clojure 1.9 (and 1.8, and every other prior version of Clojure!) works with Java 9 due to the care that Java takes in retaining backward compatibility. Clojure 1.0 works just fine with Java 9.

However, there have been some changes that affect various tools, most prominently Leiningen and Boot. Leiningen has for a long time put the Clojure jar on the bootclasspath to make startup a little faster. Due to the new classloader and base module constraints, this doesn't work in Java 9 due to the use of a class outside the Java base module in core. In Clojure 1.9.0-beta1 we started lazy loading the code using the problematic class to sidestep this specific case. Also, Leiningen has made changes such that there is more flexibility in whether you put Clojure on the bootclasspath. Depending which version of lein and Clojure you are using, you may see this issue. I'd recommend using the latest version of both lein and Clojure to avoid it.

There have also been changes in the standard classloader hierarchy in Java 9 that affect some of the dynamic classloader libraries (like dynapath, used by Leiningen and Boot). Those issues have been addressed but if you have an older version of any of those you can encounter those problems.

There is a known issue related to the new module system in JDK9 and how Clojure chooses a method in a reflective call, in particular the Reflector may choose to invoke a module-private method of an implementation rather than the visible interface method. This violates the module system's constraints and throws an IllegalAccessException (see CLJ-2066). This will not be addressed in Clojure 1.9, but is easily worked around by type hinting the call target to avoid reflection. I expect this will be addressed in the next release; the changes are significant enough that it seemed too risky (for all other reflective calls) to change right before the release.

David Kinzer

unread,
Nov 12, 2017, 8:51:26 PM11/12/17
to Clojure
I'm getting an error when I follow the instructions in the readme.txt, am I missing something?

java -cp clojure-1.9.0-RC1.jar clojure.main
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:375)

same instructions work for 1.8, though

Alex Miller

unread,
Nov 12, 2017, 9:02:00 PM11/12/17
to Clojure
Hi David, 

Clojure 1.9 now depends on two external dependencies (spec.alpha and core.specs.alpha) so the instructions listed there will no longer work. We are evaluating whether and how to update those instructions in the readme right now.

Most Clojure users work with Clojure through a project manager like Leiningen or Boot (where simply declaring a dependency on org.clojure/clojure "1.9.0-RC1" will automatically pull in its new dependencies). We also have a new command line tool, `clj` that you can use to start a repl with 1.9 (see https://clojure.org/guides/deps_and_cli).

Alex

Shantanu Kumar

unread,
Nov 13, 2017, 2:09:32 PM11/13/17
to Clojure
The coercion (byte \a) works fine in Clojure 1.8, but it fails with `ClassCastException java.lang.Character cannot be cast to java.lang.Number` in 1.9.0-RC1. Is this by design?


Shantanu

Alex Miller

unread,
Nov 13, 2017, 2:57:36 PM11/13/17
to clo...@googlegroups.com
Works for me in 1.9.0-RC1. I don't know of anything that changed in this area.

Clojure 1.9.0-RC1
user=> (byte \a)
97

Shantanu Kumar

unread,
Nov 14, 2017, 12:48:33 AM11/14/17
to Clojure
Sorry, I did not specify the problem completely earlier. The coercion fails only when *uncheked-math* is set to truthy in 1.9.0-RC1.

user=> (byte \a)
97
user=> (set! *unchecked-math* true)  ; or :warn-on-boxed
true
user=> (byte \a)

ClassCastException java.lang.Character cannot be cast to java.lang.Number  clojure.lang.RT.uncheckedByteCast (RT.java:1376)


Shantanu

Andy Fingerhut

unread,
Nov 14, 2017, 1:06:30 AM11/14/17
to clo...@googlegroups.com
I see the same behavior in Clojure 1.7.0 and 1.8.0 as you see in 1.9.0-RC1.

Andy

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

Shantanu Kumar

unread,
Nov 14, 2017, 1:22:07 AM11/14/17
to Clojure
Sorry, my bad. I can see the same behavior in previous Clojure versions too. I discovered this in the middle of moving to 1.9.0-RC1 in one of the projects and somehow got it all mixed up.


Shantanu

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.

Sergey Didenko

unread,
Nov 23, 2017, 6:20:29 PM11/23/17
to clo...@googlegroups.com
Hi,

is it expected that code which does a lot of regex parsing is ~14% slower than it was under Clojure 1.8?


For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

Sergey Didenko

unread,
Nov 23, 2017, 6:31:39 PM11/23/17
to clo...@googlegroups.com
Correction - it's not about regex parsing. I removed reflection calls for StringBuilder and now it seems to be on par in speed.

Alex Miller

unread,
Nov 23, 2017, 9:06:11 PM11/23/17
to clo...@googlegroups.com
So is there any difference in this code between 1.8 and 1.9?
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/tWcLAhnEzIs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.

Sergey Didenko

unread,
Nov 24, 2017, 4:57:35 AM11/24/17
to clo...@googlegroups.com
Code with reflection is ~6% faster on server JRE (in 1.9.0-RC1) and ~1% slower on client JRE.
So apparently it's not a big deal.

Server JRE:

user> *clojure-version*
{:major 1, :minor 8, :incremental 0, :qualifier nil}
user> (use 'criterium.core)
nil
user> (bench (.length (.toString (reduce (fn [sb st] (.append sb st)) (StringBuilder.) (take 100000 (repeat "test"))))))
Reflection warning, *cider-repl scan*:396:54 - call to method append can't be resolved (target class is unknown).
Reflection warning, *cider-repl scan*:396:23 - reference to field toString can't be resolved.
Reflection warning, *cider-repl scan*:396:14 - reference to field length can't be resolved.
Evaluation count : 60 in 60 samples of 1 calls.
             Execution time mean : 1.072324 sec
    Execution time std-deviation : 5.929780 ms
   Execution time lower quantile : 1.066123 sec ( 2.5%)
   Execution time upper quantile : 1.087542 sec (97.5%)
                   Overhead used : 1.598266 ns

Found 2 outliers in 60 samples (3.3333 %)
    low-severe     2 (3.3333 %)
 Variance from outliers : 1.6389 % Variance is slightly inflated by outliers

user> *clojure-version*
{:major 1, :minor 9, :incremental 0, :qualifier "RC1"}
user> (use 'criterium.core)
nil
user> (bench (.length (.toString (reduce (fn [sb st] (.append sb st)) (StringBuilder.) (take 100000 (repeat "test"))))))
Reflection warning, *cider-repl scan*<2>:418:54 - call to method append can't be resolved (target class is unknown).
Reflection warning, *cider-repl scan*<2>:418:23 - reference to field toString can't be resolved.
Reflection warning, *cider-repl scan*<2>:418:14 - reference to field length can't be resolved.
Evaluation count : 60 in 60 samples of 1 calls.
             Execution time mean : 1.017560 sec
    Execution time std-deviation : 3.256887 ms
   Execution time lower quantile : 1.015164 sec ( 2.5%)
   Execution time upper quantile : 1.025247 sec (97.5%)
                   Overhead used : 1.598209 ns

Found 11 outliers in 60 samples (18.3333 %)
    low-severe     7 (11.6667 %)
    low-mild     4 (6.6667 %)
 Variance from outliers : 1.6389 % Variance is slightly inflated by outliers



Client JRE:

user> *clojure-version*
{:major 1, :minor 8, :incremental 0, :qualifier nil}
user> (use 'criterium.core)
nil
user> (bench (.length (.toString (reduce (fn [sb st] (.append sb st)) (StringBuilder.) (take 100000 (repeat "test"))))))
Reflection warning, *cider-repl scan*<2>:372:54 - call to method append can't be resolved (target class is unknown).
Reflection warning, *cider-repl scan*<2>:372:23 - reference to field toString can't be resolved.
Reflection warning, *cider-repl scan*<2>:372:14 - reference to field length can't be resolved.
Evaluation count : 60 in 60 samples of 1 calls.
             Execution time mean : 4.468317 sec
    Execution time std-deviation : 9.396613 ms
   Execution time lower quantile : 4.460775 sec ( 2.5%)
   Execution time upper quantile : 4.491945 sec (97.5%)
                   Overhead used : 8.161463 ns

Found 9 outliers in 60 samples (15.0000 %)
    low-severe     6 (10.0000 %)
    low-mild     3 (5.0000 %)
 Variance from outliers : 1.6389 % Variance is slightly inflated by outliers

user> *clojure-version*
{:major 1, :minor 9, :incremental 0, :qualifier "RC1"}
user> (use 'criterium.core)
nil
user> (bench (.length (.toString (reduce (fn [sb st] (.append sb st)) (StringBuilder.) (take 100000 (repeat "test"))))))
Reflection warning, *cider-repl scan*:350:54 - call to method append can't be resolved (target class is unknown).
Reflection warning, *cider-repl scan*:350:23 - reference to field toString can't be resolved.
Reflection warning, *cider-repl scan*:350:14 - reference to field length can't be resolved.
Evaluation count : 60 in 60 samples of 1 calls.
             Execution time mean : 4.504926 sec
    Execution time std-deviation : 10.412995 ms
   Execution time lower quantile : 4.488528 sec ( 2.5%)
   Execution time upper quantile : 4.532106 sec (97.5%)
                   Overhead used : 8.425136 ns

Found 3 outliers in 60 samples (5.0000 %)
    low-severe     3 (5.0000 %)
 Variance from outliers : 1.6389 % Variance is slightly inflated by outliers


You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/tWcLAhnEzIs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages