You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Semb Wever (Jira)" <ji...@apache.org> on 2021/03/14 18:18:00 UTC

[jira] [Updated] (CASSANDRA-14563) Add animalsniffer to build to ensure runtime jdk compatbility

     [ https://issues.apache.org/jira/browse/CASSANDRA-14563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Semb Wever updated CASSANDRA-14563:
-------------------------------------------
    Resolution: Won't Fix
        Status: Resolved  (was: Open)

Cassandra 2.2 is very close to EOL now. (We will be maintaining it for critical fixes for one more major release cycle.)

This issue does not apply to newer versions of Cassandra.

Cassandra 3.0 and 3.11 only compile and run on JDK 8.

Cassandra 4.0 can:
- compile on JDK 8 a build that only runs on JDK >=8, and
- compile on JDK 11 and above, a build that only runs on JDK 11 and above… 

The last point re-introduces the need for this.
We need to ensure that a Cassandra compiled on JDK "Y" will still run on JDK "X", where 
- "Y" > "X"
- "Y" >= 12
- "X >= 11

Today, Cassandra cannot compile with JDK 13 or 14 or 15 (bc javadoc and nashorn errors).

For example today, Cassandra can be compiled with JDK 12 and this [patch|https://github.com/apache/cassandra/compare/trunk...thelastpickle:mck/trunk_14563_example], but then will not run on JDK 11.

Ways to solve this are…
- enforce compilation on only JDK 8 and JDK 11,
- add bootstrap classpath to JDK 11, when compiling on JDK >=11,
- add animal sniffer (JDK 11 signatures and compile-time signature-check)

(We can't use javac's {{-release}} [flag|https://openjdk.java.net/jeps/247] because we export internal modules.)

I'm closing out this ticket as 'wont fix' as our CI systems (ci-cassandra.a.o and circleci) test compilation against JDK 8 and 11, and nothing else.

> Add animalsniffer to build to ensure runtime jdk compatbility
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-14563
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14563
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Build
>            Reporter: Michael Semb Wever
>            Assignee: Sumanth Pasupuleti
>            Priority: Low
>              Labels: lhf
>
> Cassandra-2.2 still supports running on JDK1.7
> No tests check this though, as all build and test with JDK1.8
> Adding the ant animalsniffer task can check that jdk1.8 classes or methods are not used accidentally.
> ref: http://www.mojohaus.org/animal-sniffer/animal-sniffer/index.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org