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

Conflicting dependency on scala-java8-compat #387

Closed
nafg opened this issue Dec 13, 2021 · 2 comments
Closed

Conflicting dependency on scala-java8-compat #387

nafg opened this issue Dec 13, 2021 · 2 comments

Comments

@nafg
Copy link
Contributor

nafg commented Dec 13, 2021

It seems beta34 and later conflict with sbt-web-scalajs-bundler 0.20.0.

I get this error:

[error] stack trace is suppressed; run last update for the full output
[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error] 	* org.scala-lang.modules:scala-java8-compat_2.12:1.0.0 (early-semver) is selected over 0.8.0
[error] 	    +- org.scalablytyped.converter:sbt-converter:1.0.0-beta34 (sbtVersion=1.0, scalaVersion=2.12) (depends on 1.0.0)
[error] 	    +- com.typesafe.akka:akka-actor_2.12:2.5.17           (depends on 0.8.0)
[error] 
[error] 
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel

Which comes from sbt-web-scalajs-bundler:

sbt:project> whatDependsOn com.typesafe.akka akka-actor_2.12
[info] com.typesafe.akka:akka-actor_2.12:2.5.17 [S]
[info]   +-com.typesafe.sbt:sbt-web:1.4.4
[info]     +-com.vmunier:sbt-web-scalajs:1.1.0
[info]       +-ch.epfl.scala:sbt-web-scalajs-bundler:0.20.0
[info]         +-default:project:0.1.0-SNAPSHOT

With this plugins.sbt:

//addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")

addSbtPlugin("org.scala-js"                % "sbt-scalajs"             % "1.8.0")
//addSbtPlugin("org.portable-scala"          % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("ch.epfl.scala"               % "sbt-web-scalajs-bundler" % "0.20.0")
addSbtPlugin("org.scalablytyped.converter" % "sbt-converter"           % "1.0.0-beta34")
@oyvindberg
Copy link
Collaborator

Thanks for the report.

At this point sbt authors should just publish a list of which exact versions of dependencies should be used by all sbt plugins. Because if you dare upgrade a single one you'll break all the plugins which didn't upgrade.

This can be fixed by reverting the update of the dependency in this project, or by updating it for sbt-web-scalajs-bundler. Given two non-great options I prefer the latter I guess. Otherwise I'd accept a PR with a downgrade at this side too.

@nafg
Copy link
Contributor Author

nafg commented Dec 17, 2021

Either that or every sbt plugin should shade all its dependencies or run in its own classloader.

Don't downgrade. However long it takes, it's better to figure out the right way.

So far I've discovered that:

Then again, scalajs-bundler is pretty stagnated too. It really needs to be updated somehow.

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