Fork me on GitHub
#clojure-dev
<
2021-03-18
>
seancorfield18:03:22

Just looked at the Clojure test matrix and I see it testing against JDK 8 through 11. Is there a reason not to test against more recent JDKs?

souenzzo19:03:45

What if we do an community/independent test matrix, including JDK's and some community projects. Something like https://github.com/cljs-oss/canary

Alex Miller (Clojure team)18:03:44

our only official supported JDKs are the LTS releases

Alex Miller (Clojure team)18:03:39

there are also some non-functional reasons which have to do with silly reasons like disk space and compute capacity on the build box

Alex Miller (Clojure team)18:03:01

eventually we will take care of those but the pain involved is enough that I'm putting it off for now

Alex Miller (Clojure team)18:03:26

I do manually test Clojure itself on every Java release

seancorfield18:03:15

Thanks. We’re using OpenJDK 11 in production and have been discussing whether to upgrade to 14 which we’ve used fairly extensively in dev or whether to wait for 17. There’s no pressing reason either way really at this point. I’ve been using 15 for dev for ages now and I’m thinking of updating to 16 soon.

ghadi18:03:29

15 and 16 are really amazing IMHO -- ZGC garbage collector is worth it almost alone

favila18:03:23

over shenandoah?

ghadi18:03:59

dunno, haven't evaluated shenanoah much

seancorfield19:03:19

Is ZGC the default now, with 16?

ghadi19:03:50

no. It became "production" quality in 15, and has 1ms pause times in 16

seancorfield19:03:29

Ah, cool. Right now, on 11, we specify -XX:+UseG1GC -XX:MaxGCPauseMillis=100 so having 1ms instead would be real nice 🙂

seancorfield19:03:13

Maybe I’ll take 16 for a spin, on dev at least.

orestis08:03:14

Corretto is already on 16 but annoyingly not supported across various AWS offerings (we use Elastic Beanstalk, I guess they wait for an LTS version)

niwinz08:03:34

We are using shenandoah, with JDK15 on production and our GC pauses on AVG are less than 1ms, Shenandoah has better handling of degradation state than ZGC (on our tests ZGC with high requests spikes enters more quickly in a degraded state with worse pauses than Shenandoah)

seancorfield11:03:28

@U06B73YQJ It sounds like that is not available in all builds of JDK15, based on a quick search. I found a SO post about it that suggests it’s in Oracle’s JDK and Adopt’s OpenJDK but not part of the standard OpenJDK? Good to know it is production-solid though.

niwinz12:03:34

It is available in all builds (with exception of builds from oracle, because the obvious reason: it competes with ZGC I think....); adoptopenjdk, corretto, azul, redhat, all them comes with it

niwinz12:03:15

We started using ZGC, but after many tests and some issues in production (mainly on big load spikes), we have seen many degraded states with very big pauses. Shenandoah, has a more deterministic, tiered degraded states when garbage is generated more quickly than cleared. With shenandoah we have not seen any issue.

👍 3
souenzzo19:03:45

What if we do an community/independent test matrix, including JDK's and some community projects. Something like https://github.com/cljs-oss/canary

Alex Miller (Clojure team)19:03:18

anyone is welcome to do anything they like, that I don't have to run :)

✔️ 3
seancorfield19:03:17

(guess I should change that to '16', '17-ea' now)

delaguardo19:03:39

and add graalvm as well )

seancorfield19:03:59

Do you have an example of doing that in a GH Action?

delaguardo19:03:15

give me a sec

delaguardo19:03:55

name: Clojure CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '8', '11', '14', '15', '16-ea', '17-ea' ]
    steps:
      - uses: actions/checkout@v2
      - name: Setup Java
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: Setup Clojure
        uses: DeLaGuardo/setup-clojure@master
        with:
          tools-deps: '1.10.1.739'
      - name: Run Tests
        run: clojure -M:test:runner

  build-graalvm:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        graalvm: [ '19.3.0', '20.0.0', '20.1.0', '20.2.0', '20.3.0', '20.3.1', '20.3.1.2', '21.0.0', '21.0.0.2' ]
        base: [ 'java8', 'java11' ]
    steps:
      - uses: actions/checkout@v2
      - name: Setup GraalVM
        uses: DeLaGuardo/[email protected]
        with:
          graalvm: ${{ matrix.graalvm }}
          java: ${{ matrix.base }}
      - name: Setup Clojure
        uses: DeLaGuardo/setup-clojure@master
        with:
          tools-deps: '1.10.1.739'
      - name: Run Tests
        run: clojure -M:test:runner
something like that

delaguardo19:03:59

You're welcome)

delaguardo19:03:12

I will check this action in an hour. Not sure that I recall every version correctly