[ 
https://issues.apache.org/jira/browse/CALCITE-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17730062#comment-17730062
 ] 

Stamatis Zampetakis commented on CALCITE-5477:
----------------------------------------------

The solution of downgrading Guava (to 19.0) could be interpreted as a 
regression. If the compiler now generates calls to {{checkArgument(boolean, 
String, Object...)}} instead of {{checkArgument(boolean, String, int)}} I 
suppose that this will impact at least performance for all those consumers that 
are using the more recent Guava versions. Moreover, this change will make an 
old Guava version propagate to dependent projects leading to build problems to 
those projects that do not freeze explicitly the Guava version; it will also 
make CVE scanners unhappy.

We are trying to make life easier for Druid and that's good but at the same 
time we are slightly worsening and making things more complicate for everyone 
else.

A more adequate solution would be to release multiple artifacts (jars) with 
different dependencies (e.g., Guava 19.0 and Guava latest) for the same source 
set but this would complicate the build scripts/module structure and I haven't 
done this before with Gradle.

No matter how we frame this it is a step back for Calcite. If we want to keep 
supporting multiple Guava versions then we should pay the price and maybe opt 
for https://github.com/apache/calcite/pull/3028 at this point.

Furthermore, it may make sense to switch our CI tests to compile always with 
latest Guava and use lower versions only at runtime so that we have more 
realistic coverage and avoid problems such as the one reported here (we don't 
need to do this as part of this JIRA).

> Compatibility with Guava < 20.0
> -------------------------------
>
>                 Key: CALCITE-5477
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5477
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Gian Merlino
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Related to CALCITE-5428.
> Preconditions.checkArgument gained new overloads in Guava 20.0, which 
> prevents code built using Guava 20.0 from running properly with earlier 
> versions of Guava. (When building against a later version of Guava, as 
> Calcite does by default, the Java compiler generates calls to methods that 
> don't exist in those earlier versions.)
> Example: in Guava 20.0 there is {{checkArgument(boolean, String, int)}}; in 
> earlier versions this would be handled by {{checkArgument(boolean, String, 
> Object...)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to