You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2023/10/04 10:15:00 UTC
[jira] [Updated] (CASSANDRA-18906) Exclude unnecessary dependencies introduced by caffeine update to 3.1.8
[ https://issues.apache.org/jira/browse/CASSANDRA-18906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Miklosovic updated CASSANDRA-18906:
------------------------------------------
Description:
When I checked out the latest code with CASSANDRA-18805 in, I noticed that it pulls these dependencies:
{code}
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.pom (3 KB at 8.7 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.pom (3 KB at 127.9 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.pom (2 KB at 119.3 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_parent/2.21.1/error_prone_parent-2.21.1.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_parent/2.21.1/error_prone_parent-2.21.1.pom (13 KB at 658.5 KB/sec)
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom (0 B at 0.0 KB/sec)
[resolver:resolve] Resolving artifacts
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar
[resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar (0 B at 0.0 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar (17 KB at 219.1 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar (220 KB at 2490.9 KB/sec)
[resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.jar (869 KB at 6679.8 KB/sec)
{code}
Notice there is checker-qual and error_prone_annotations
If you do this on the current cassandra-5.0:
{code}
find . -type f -name '*.java' | xargs grep 'import .*\.Nullable;' | cut -d ':' -f2 | sort | uniq
{code}
you will get
{code}
import org.checkerframework.checker.nullness.qual.Nullable;
import javax.annotation.Nullable;
{code}
The first import is wrong. We should not use that, we should use just javax.annotation.Nullable.
The reason why it is possible to use that import is that it is on the classpath. Even worse, it is also added into libs which is not necessary at all.
error_prone_annotations are compile-time annotations and checker-qual are too. We do not need them in Cassandra at all. They are dependencies which are brought there from caffeine.
> Exclude unnecessary dependencies introduced by caffeine update to 3.1.8
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-18906
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18906
> Project: Cassandra
> Issue Type: Improvement
> Components: Build
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Normal
>
> When I checked out the latest code with CASSANDRA-18805 in, I noticed that it pulls these dependencies:
> {code}
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.pom
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.pom (3 KB at 8.7 KB/sec)
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.pom
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.pom (3 KB at 127.9 KB/sec)
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.pom
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.pom (2 KB at 119.3 KB/sec)
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_parent/2.21.1/error_prone_parent-2.21.1.pom
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_parent/2.21.1/error_prone_parent-2.21.1.pom (13 KB at 658.5 KB/sec)
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.pom (0 B at 0.0 KB/sec)
> [resolver:resolve] Resolving artifacts
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.jar
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar
> [resolver:resolve] Downloading https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar (0 B at 0.0 KB/sec)
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar (17 KB at 219.1 KB/sec)
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar (220 KB at 2490.9 KB/sec)
> [resolver:resolve] Downloaded https://repo1.maven.org/maven2/com/github/ben-manes/caffeine/caffeine/3.1.8/caffeine-3.1.8.jar (869 KB at 6679.8 KB/sec)
> {code}
> Notice there is checker-qual and error_prone_annotations
> If you do this on the current cassandra-5.0:
> {code}
> find . -type f -name '*.java' | xargs grep 'import .*\.Nullable;' | cut -d ':' -f2 | sort | uniq
> {code}
> you will get
> {code}
> import org.checkerframework.checker.nullness.qual.Nullable;
> import javax.annotation.Nullable;
> {code}
> The first import is wrong. We should not use that, we should use just javax.annotation.Nullable.
> The reason why it is possible to use that import is that it is on the classpath. Even worse, it is also added into libs which is not necessary at all.
> error_prone_annotations are compile-time annotations and checker-qual are too. We do not need them in Cassandra at all. They are dependencies which are brought there from caffeine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org