-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force update to Kotlin 1.9 #6026
Comments
That shouldn't be the case. The android / kotlin requirements we have a listed here. Android API version 21+ is required with desugaring enabled. Kotlin 1.6 is required, but only for the Can you provide more info on where the kotlin 1.9.0 requirement is coming from? |
We're using Kotlin 1.7.20, AGP 7.3.1, and desugar 1.2.3. After upgrading to Otel 1.32.0, we encountered this error message.
If I downgrade to Otel version 1.31.0, everything is fine. |
Maybe the @open-telemetry/android-maintainers could comment on this? I'm not sure which component would have been compiled with kotlin 1.9.0. |
@TomasChladekSL can you let us know where exactly the |
It seems that Kotlin 1.9.10 is required due to the dependency on
|
thanks @TomasChladekSL. what http client library (if any) are you using in your Android application? we sort of thought most Android apps would be using okhttp already and so thought the dependency on it would be helpful (rather than harmful) for Android |
No, we are using our own HTTP client, and the |
Usage of OkHttp
Although this might be true for a large number of applications, there are definitely applications that don't use OkHttp. Some typical examples are:
In all these cases, the applications are now "forced" to depend on OkHttp. Possible ProblemsThe usage of a third-party library (OkHttp) transitionally forces every application or library that uses
Our Use CaseWe (Cisco) are developing an Agent for mobile analytics/session recording that should be "lightweight" and are trying to use as few third-party dependencies as possible (based on the above-mentioned reasons). We really love the idea of Open Telemetry and want to use it, but changes like this make it problematic because now all our clients need to update Kotlin, rendering our solution "unusable" for them. Possible Solutions
|
Some thoughts:
|
We are in a pretty unique situation here. We need the latest
Sadly, here we are speaking from experience with hundreds of clients that have various reasons to not update certain dependencies:
The React Native Gradle plugin might be poorly designed, but it's still used by a large number of applications/developers. Additionally, 'opentelemetry-java' requires applications to use specific versions of Kotlin and OkHttp.
Although the suggestion appears logical, the removal of the third-party dependency (OkHttp) from the equation likely won't compromise security. ResolutionWe completely understand that the requested change (replace/remove OkHttp) is not trivial, and the open-source community currently does not have the bandwidth for this. Thanks to your suggestion regarding "dependency constraint," we have likely found a solution for our case. We will exclude the dependency on OkHttp and will use our own HttpClient. While we still firmly believe that this is an issue and makes it more complicated to use OpenTelemetry for Android development, we have found a solution for our specific case. Therefore, this issue can be considered closed. |
Added a comment here as a possible alternative (it has to be tested). |
Hi, I’m an OkHttp maintainer. We’re quite strict about compatibility. We have a strict rule to not break binary compatibility in our library or in Okio. |
Just for the record, I've created this issue in the OkHttp repo where we can see what's OkHttp's stance regarding Kotlin's older versions' compilation and security support. |
With #6045 merged we now have testing in place that confirm that certain versions of OkHttp besides the latest work as intended. This should allow users to confidently downgrade to select older versions with confidence, and avoid any update kotlin updates that come with the latest versions. If folks are interested in testing additional OkHttp versions, we can discuss in separate issues / PRs, but I'm going to close this issue. |
Is your feature request related to a problem? Please describe.
We're utilizing the
opentelemetry-sdk
,opentelemetry-exporter-otlp
, andopentelemetry-exporter-otlp-common
modules within our Android SDK. Since upgrading to Otel version 1.32.0, we are now required to use Kotlin version 1.9.0 or higher. However, this necessity could potentially pose a challenge for several large clients who are operating on older Gradle and Kotlin versions. Updating these dependencies could potentially initiate a long process, involving compatibility issues with Gradle plugins and Kotlin KAPT/KSP, stretching over several months.Describe the solution you'd like
There's no requirement to update to Kotlin 1.9.0.
The text was updated successfully, but these errors were encountered: