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

Recent update has left an impossible upgrade conflict with akka #586

Closed
jdrphillips opened this issue Sep 5, 2022 · 13 comments · Fixed by #587
Closed

Recent update has left an impossible upgrade conflict with akka #586

jdrphillips opened this issue Sep 5, 2022 · 13 comments · Fixed by #587

Comments

@jdrphillips
Copy link

jdrphillips commented Sep 5, 2022

This is not necessarily slick-pgs 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

@fcv
Copy link

fcv commented Sep 6, 2022

I'm facing the issue regarding scala-parser-combinators version conflict as well.
fwiw, I found this open issue on Akka project: akka/akka#31485.

@jdrphillips
Copy link
Author

Yep looks like they (akka) aren't going to fix the issue on their end.

@jdrphillips
Copy link
Author

I have created this issue lightbend/ssl-config#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

@MasseGuillaume
Copy link

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

@Tvaroh
Copy link
Contributor

Tvaroh commented Sep 26, 2022

Support downgrading to 1.1.2 as well.

Tvaroh added a commit to Tvaroh/slick-pg that referenced this issue Sep 26, 2022
@Tvaroh
Copy link
Contributor

Tvaroh commented Sep 26, 2022

Created a PR #587

@domdorn
Copy link

domdorn commented Dec 2, 2022

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)

@Tvaroh
Copy link
Contributor

Tvaroh commented Dec 2, 2022

I guess the only option is forking and publishing it under another organization.

@domdorn
Copy link

domdorn commented Dec 2, 2022

@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()
  }

@tminglei
Copy link
Owner

tminglei commented Dec 4, 2022

@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.

@domdorn
Copy link

domdorn commented Dec 4, 2022

thanks a lot!

@mikla
Copy link

mikla commented Dec 6, 2022

Thank you! When we can expect new release?

@tminglei
Copy link
Owner

tminglei commented Dec 8, 2022

@mikla released to v0.21.1

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

Successfully merging a pull request may close this issue.

7 participants