8000 Multiple versions of scala libraries detected · Issue #798 · sksamuel/avro4s · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Multiple versions of scala libraries detected #798

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

Open
tashoyan opened this issue Sep 20, 2023 · 3 comments
Open

Multiple versions of scala libraries detected #798

tashoyan opened this issue Sep 20, 2023 · 3 comments

Comments

@tashoyan
Copy link
tashoyan commented Sep 20, 2023

I get the following warning:

[WARNING]  Expected all dependencies to require Scala version: 2.12.18
[WARNING]  com.sksamuel.avro4s:avro4s-core_2.12:4.0.13 requires scala version: 2.12.7

I wonder why avro4s requires a precise version of Scala.

Tried with avro4s-core 4.1.1 and 4.0.13.
Java 11
Scala 2.12.18

Workaround: exclude Scala libs from transitive dependencies:

    <dependency>
      <groupId>com.sksamuel.avro4s</groupId>
      <artifactId>avro4s-core_2.12</artifactId>
      <version>4.1.1</version>
      <exclusions>
        <exclusion>
          <groupId>org.scala-lang</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
@sksamuel
Copy link
Owner

I'm not sure how to fix it. If you want to make a PR I will merge and release.

@altrack
Copy link
altrack commented Dec 21, 2023

Seems to be Maven only issue.
On the other thread suggested solution was to upgrade: scala-maven-plugin.
2.12.18 is binary compatible with all 2.12 series according to Scala release notes.
I've tested package and assembly with sbt:
scala version 2.12.18 and avro4s-core 4.1.1
No issue whatsoever.

Copy link
stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the abandoned label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0