slick-pg
slick-pg copied to clipboard
Recent update has left an impossible upgrade conflict with akka
This is not necessarily slick-pg
s responsibility to address, I am detailing it here as it was slick-pg
's update that revealed the problem.
If you have the following installed dependencies:
slick-pg: 0.20.4 (previous)
akka-stream: 2.6.19 (latest)
slick: 3.3.3 (previous)
And you upgrade slick-pg
to 0.21.0 (latest)
you get the following incompatibility:
[error] * org.scala-lang.modules:scala-parser-combinators_2.13:2.1.1 (early-semver) is selected over 1.1.2
[error] +- com.github.tminglei:slick-pg_jts_2.13:0.21.0 (depends on 2.1.1)
[error] +- com.github.tminglei:slick-pg_core_2.13:0.21.0 (depends on 2.1.1)
[error] +- com.github.tminglei:slick-pg_2.13:0.21.0 (depends on 2.1.1)
[error] +- com.typesafe:ssl-config-core_2.13:0.4.3 (depends on 1.1.2)
This is because akka-stream
keeps you at an old ssl-config-core
version until you have upgraded to scala 3. This then includes an old version of scala-parser-combinators
, causing the conflict.
The inability to update slick-pg
also prevents you updating to slick 3.4.0 (latest)
:
[error] * com.typesafe.slick:slick_2.13:3.4.0 (pvp) is selected over {3.3.3}
[error] +- com.lovejunk:persist:5161e92 (depends on 3.4.0)
[error] +- com.github.tminglei:slick-pg_jts_2.13:0.20.4 (depends on 3.3.3)
[error] +- com.github.tminglei:slick-pg_core_2.13:0.20.4 (depends on 3.3.3)
[error] +- com.github.tminglei:slick-pg_2.13:0.20.4 (depends on 3.3.3)
[error]
This means for example that when work begins on slick
for scala 3, users of akka-stream
and slick-pg
will be unable to upgrade in good time to a cross compatible version, making the ultimate migration to scala 3 much more difficult than it needs to be.
As it stands, dropping use of this library is our easiest and safest path forward, which I really do not want to do
I'm facing the issue regarding scala-parser-combinators
version conflict as well.
fwiw, I found this open issue on Akka project: https://github.com/akka/akka/issues/31485.
Yep looks like they (akka) aren't going to fix the issue on their end.
I have created this issue https://github.com/lightbend/ssl-config/issues/353 in the hope that akka would consider upgrading to ssl-config 0.4.4
with an upgraded scala-parser-combinators
dependency.
We will see
I would recommend downgrading to scala-parser-combinators
to 1.1.2. I can't upgrade because akka/twitter are still on the old version.
If we take a look at the releases notes for 2.x https://github.com/scala/scala-parser-combinators/releases/tag/v2.0.0 https://github.com/scala/scala-parser-combinators/releases/tag/v2.1.0 https://github.com/scala/scala-parser-combinators/releases/tag/v2.1.1
there is nothing relevant worth pulling the update version
This is probably why twitter is sticking with the older version https://github.com/twitter/util/blob/53a1981dde3014241075b34162ecd8a20c24da71/build.sbt#L402-L411
Support downgrading to 1.1.2 as well.
Created a PR #587
Any updates on this? I just stumbled upon this as well, running scala 2.13.10
[error] * org.scala-lang.modules:scala-parser-combinators_2.13:2.1.1 (early-semver) is selected over 1.1.2
[error] +- com.github.tminglei:slick-pg_core_2.13:0.21.0 (depends on 2.1.1)
[error] +- com.github.tminglei:slick-pg_2.13:0.21.0 (depends on 2.1.1)
[error] +- com.typesafe:ssl-config-core_2.13:0.4.3 (depends on 1.1.2)
I guess the only option is forking and publishing it under another organization.
@tminglei what is stopping you from merging PR #587 ? A fork is not in the interest of anybody..
imho the code in build.sbt
should be like
def mainDependencies(scalaVersion: String) = {
val extractedLibs = CrossVersion.partialVersion(scalaVersion) match {
case Some((3, _)) =>
Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.1")
case Some((2, scalaMajor)) if scalaMajor >= 11 =>
Seq("org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2")
case _ =>
Seq()
}
@domdorn well, I was just waiting for the build failure to be resolved by someone else.
Now I'll stop waiting, and move it forward.
thanks a lot!
Thank you! When we can expect new release?
@mikla released to v0.21.1