0

我正在尝试使用 akka-grpc,但在使用它时遇到了兼容性问题。我使用 akka 库,例如 akka-actor 和 akka-persistence 等。他们都使用akkaversion 2.6.5。但是,当使用 akka-grpcaddSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "1.1.1")我的项目开始使用 2.6.9 版本时,我收到以下错误:

Exception in thread "main" java.lang.IllegalStateException: You are using version 2.6.9 of Akka, but it appears you (perhaps indirectly) also depend on older versions of related artifacts. You can solve this by adding an explicit dependency on version 2.6.9 of the [akka-multi-node-testkit, akka-persistence, akka-persistence-query, akka-remote, akka-cluster, akka-cluster-tools, akka-coordination, akka-testkit, akka-serialization-jackson] artifacts to your project.

是否有与 akka 2.6.5 版兼容的 akka-grpc 版本?

编辑一些额外的信息 我有来自akka 2.6.5 版本的akka​​-grpc 依赖树的每个依赖。但是,当我在 shell 中运行时,我可以看到它们使用 2.6.9 我想这怎么会发生?

[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.typesafe.akka:akka-stream_2.13:2.6.9 is selected over {2.6.5, 2.5.23, 2.6.5, 2.6.5, 2.6.5}
[warn]      +- default:squirrel_agnostic_service_2.13:0.1         (depends on 2.6.9)
[warn]      +- com.lightbend.akka.grpc:akka-grpc-runtime_2.13:1.1.1 (depends on 2.6.9)
[warn]      +- com.typesafe.akka:akka-remote_2.13:2.6.5           (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-persistence_2.13:2.6.5      (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-persistence-query_2.13:2.6.5 (depends on 2.6.5)
[warn]      +- com.github.dnvriend:akka-persistence-inmemory_2.13:2.5.15.2 (depends on 2.5.23)
[warn]      +- com.typesafe.akka:akka-stream_2.13:2.6.5           (depends on 2.6.5)
[warn]  * com.typesafe.akka:akka-actor_2.13:2.6.9 is selected over {2.6.5, 2.5.23, 2.6.5, 2.6.5, 2.6.5, 2.6.5, 2.6.5}
[warn]      +- com.typesafe.akka:akka-stream_2.13:2.6.5           (depends on 2.6.9)
[warn]      +- com.typesafe.akka:akka-discovery_2.13:2.6.5        (depends on 2.6.9)
[warn]      +- com.typesafe.akka:akka-testkit_2.13:2.6.5          (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-serialization-jackson_2.13:2.6.5 (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-remote_2.13:2.6.5           (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-persistence_2.13:2.6.5      (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-coordination_2.13:2.6.5     (depends on 2.6.5)
[warn]      +- com.github.dnvriend:akka-persistence-inmemory_2.13:2.5.15.2 (depends on 2.5.23)
[warn]      +- be.vub.kdeporre:Squirrel_2.13:0.4-SNAPSHOT         (depends on 2.6.5)
[warn]  * org.scala-lang.modules:scala-collection-compat_2.13:2.3.2 is selected over 2.0.0
[warn]      +- com.thesamet.scalapb:lenses_2.13:0.10.11           (depends on 2.3.2)
[warn]      +- com.thesamet.scalapb:scalapb-runtime_2.13:0.10.11  (depends on 2.3.2)
[warn]      +- com.typesafe.slick:slick_2.13:3.3.2                (depends on 2.0.0)
[warn]  * io.grpc:grpc-core:1.35.0 is selected over [1.35.0]
[warn]      +- com.lightbend.akka.grpc:akka-grpc-runtime_2.13:1.1.1 (depends on 1.35.0)
[warn]      +- io.grpc:grpc-netty-shaded:1.35.0                   (depends on [1.35.0])
[warn]  * com.typesafe.akka:akka-persistence_2.13:2.6.5 is selected over 2.5.23
[warn]      +- be.vub.kdeporre:Squirrel_2.13:0.4-SNAPSHOT         (depends on 2.6.5)
[warn]      +- com.typesafe.akka:akka-persistence-query_2.13:2.6.5 (depends on 2.6.5)
[warn]      +- com.github.dnvriend:akka-persistence-inmemory_2.13:2.5.15.2 (depends on 2.5.23)
[warn]  * io.grpc:grpc-api:1.35.0 is selected over [1.35.0]
[warn]      +- io.grpc:grpc-stub:1.35.0                           (depends on 1.35.0)
[warn]      +- io.grpc:grpc-core:1.35.0                           (depends on [1.35.0])
[warn]  * com.typesafe.akka:akka-persistence-query_2.13:2.6.5 is selected over 2.5.23
[warn]      +- be.vub.kdeporre:Squirrel_2.13:0.4-SNAPSHOT         (depends on 2.6.5)
[warn]      +- com.lightbend.akka:akka-persistence-jdbc_2.13:4.0.0 (depends on 2.6.5)
[warn]      +- com.github.dnvriend:akka-persistence-inmemory_2.13:2.5.15.2 (depends on 2.5.23)
[info] Here are other dependency conflicts that were resolved:
[info]  * com.typesafe:config:1.4.0 is selected over 1.3.2
[info]      +- com.typesafe.akka:akka-actor_2.13:2.6.9            (depends on 1.4.0)
[info]      +- com.typesafe:ssl-config-core_2.13:0.4.2            (depends on 1.4.0)
[info]      +- com.typesafe.slick:slick_2.13:3.3.2                (depends on 1.3.2)
[info]  * com.typesafe.akka:akka-http_2.13:10.2.4 is selected over 10.2.3
[info]      +- default:squirrel_agnostic_service_2.13:0.1         (depends on 10.2.4)
[info]      +- com.lightbend.akka.grpc:akka-grpc-runtime_2.13:1.1.1 (depends on 10.2.3)
[info]  * org.reactivestreams:reactive-streams:1.0.3 is selected over 1.0.2
[info]      +- com.typesafe.akka:akka-stream_2.13:2.6.5           (depends on 1.0.3)
[info]      +- com.typesafe.slick:slick_2.13:3.3.2                (depends on 1.0.2)
[info]  * com.typesafe.akka:akka-discovery_2.13:2.6.9 is selected over 2.6.5
[info]      +- default:squirrel_agnostic_service_2.13:0.1         (depends on 2.6.9)
[info]      +- com.lightbend.akka.grpc:akka-grpc-runtime_2.13:1.1.1 (depends on 2.6.9)
[info]      +- com.typesafe.akka:akka-discovery_2.13:2.6.5        (depends on 2.6.5)
[info]  * com.typesafe.akka:akka-http-core_2.13:10.2.4 is selected over {10.2.3, 10.2.3}
[info]      +- com.typesafe.akka:akka-http_2.13:10.2.4            (depends on 10.2.4)
[info]      +- com.typesafe.akka:akka-http2-support_2.13:10.2.3   (depends on 10.2.3)
[info]      +- com.lightbend.akka.grpc:akka-grpc-runtime_2.13:1.1.1 (depends on 10.2.3)
[success] Total time: 1 s, completed Mar 28, 2021 2:43:52 PM
[IJ]
4

0 回答 0