Skip to content
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

Request to add dependency compatibility #466

Open
jboxx opened this issue Jul 3, 2024 · 2 comments
Open

Request to add dependency compatibility #466

jboxx opened this issue Jul 3, 2024 · 2 comments

Comments

@jboxx
Copy link

jboxx commented Jul 3, 2024

Hi Contributors,

Want to request to add dependency compatibility for the

  • OTEL API
  • OTEL SDK
  • OTEL Android Instrumentation
  • or any other related to Open Telemetry libraries

since there're a lot of users still use old dependencies, such as

  • Kotlin Version (i.e 1.6.21, 1.8.0, etc)
  • AGP (7.1, 7.2)
  • MinSDK (19, 21, 26)

Please apply low API for the demo also, so can reach many users

@LikeTheSalad
Copy link
Contributor

Hi @jboxx

I think each of the tools/environments you mentioned could have a big enough discussion to have its own issue, although I'll try to summarise the status of each one below.

For Kotlin, we provide compatibility for the lowest possible version supported by the latest version of Kotlin, which as of now is 1.7. However, regardless of the efforts on Kotlin compatibility that we could make in this project and other OTel-related ones, ultimately it boils down to transitive dependencies that may not be adding that compatibility support for older versions, which is the case for OkHttp for example (as they mention here), which is a dependency for the OTel Java project as well as OTel Android, making the compatibility with older versions not possible as the Kotlin compiler complains when transitive dependencies do not set the Kotlin API and language versions to a lower one. So because of the way the Kotlin compiler handles this constraint on transitive dependencies, we cannot guarantee Kotlin support for older versions. An alternative "solution" to this problem could be to use older versions of said transitive dependencies for when they used an older version of Kotlin, however, this is not ideal both in terms of functionality and security, as older versions may not have bug fixes backported (as it's the case for OkHttp).

For the AGP older versions I don't think we have a specific feature that is causing problems with compatibility for older versions, however, I'm aware that Android Studio, and probably AGP itself tend to complain about compatibility based on the compileSdkVersion value, which is currently set to 34. The reason for us to use said version is because we add a couple of androidx dependencies that enforce the latest compileSdk values, otherwise AGP will refuse to compile the OTel Android lib until it uses the same version as the androidx libs. For this case, like the Kotlin issue there could also be an alternative "solution" which is to use older versions of the androidx libs, however, we tend to keep all dependencies up-to-date to make sure we provide the latest features and security fixes as soon as possible.

For the minSdk, both the OTel Java and the OTel Android projects provide compatibility for the API version 21 with the aid of the corelib desugaring tools that allow the SDK to use some extra Java 8 tools. The reason we use version 21 as the minimum is because it's also the minimum required by the Google Play Services, you can find more info on it here.

For the demo app, I think we could come up with some mechanisms to make sure it works on the oldest supported versions (it might be something already on the roadmap, I'll loop @breedx-splk in just to make sure I'm not mistaken).

To summarise, we do our best effort to keep compatibility with old versions as much as possible without compromising the proper functionality and security of the lib, which means that we tend to raise our minimum supported versions based on constraints enforced by our dependencies.

@jboxx
Copy link
Author

jboxx commented Jul 8, 2024

Hi @LikeTheSalad ,

Thank you for your answer, the main concern that I want to raise is so many Android App still struggle with old dependencies, because of Kotlin Synthetic nor Jetifier. In this doc stating the minimum version is 1.6 but hard to make the configuration works on that specific version.

But yeah I think this issue can related to the demo app that support as low as possible, not increase into the latest one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants