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

Adding plugin to sbt project results in java.lang.RuntimeException #213

Open
apple-corps opened this issue Aug 29, 2023 · 3 comments
Open

Comments

@apple-corps
Copy link

[info] welcome to sbt 1.7.3 (Eclipse Adoptium Java 17.0.7)
[info] loading global plugins from /Users/apple.corps/.sbt/1.0/plugins
[info] loading settings for project semvers-build from scala2PlantUML.sbt ...
[info] loading project definition from /Users/apple.corps/code/my-project/semvers/project
[error] java.lang.RuntimeException: found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] * org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.3.0, 1.0.6}
[error] +- org.scala-lang:scala-compiler:2.12.17 (depends on 2.1.0)
[error] +- org.scala-sbt:testing_2.12:1.4.8 (depends on 1.3.0)
[error] +- org.scala-sbt:sbinary_2.12:0.5.1 (depends on 1.0.6)
[error] +- org.scala-sbt:main_2.12:1.4.8 (depends on 1.3.0)
[error] +- io.get-coursier:lm-coursier-shaded_2.12:2.0.6 (depends on 1.3.0)
[error]
[error]
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel
[error] at scala.sys.package$.error(package.scala:30)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:89)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error] at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3687)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:833)
[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] * org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.3.0, 1.0.6}
[error] +- org.scala-lang:scala-compiler:2.12.17 (depends on 2.1.0)
[error] +- org.scala-sbt:testing_2.12:1.4.8 (depends on 1.3.0)
[error] +- org.scala-sbt:sbinary_2.12:0.5.1 (depends on 1.0.6)
[error] +- org.scala-sbt:main_2.12:1.4.8 (depends on 1.3.0)
[error] +- io.get-coursier:lm-coursier-shaded_2.12:2.0.6 (depends on 1.3.0)
[error]
[error]
[error] this can be overridden using libraryDependencySchemes or evictionErrorLevel
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)

@apple-corps
Copy link
Author

Adoptium Java 11 results in the same RuntimeException

@apple-corps
Copy link
Author

Azul Java 8 results in the same RuntimeException

@SethTisue
Copy link

it's extremely unlikely that anything will break if you tell sbt to ignore the scala-xml version conflict. you can throw this in your project/plugins.sbt:

ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

and move on

that said, it would be nice if this plugin were to be upgraded to use scala-xml 2.0, which is the version that pretty much the whole rest of the sbt plugin ecosystem is on these days

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