You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The zio-nio-core_3 in Maven has dependencies on Scala 2.13 libraries silencer-lib and scala-collection-compat. If I use zio-nio in a project that also depends on one of those libraries I get a compile error about cross-version suffixes.
I cloned the repo and tried building the top-level project and it fails with the same error.
sbt "++ 3.0.2;compile"
[info] welcome to sbt 1.5.5 (Ubuntu Java 11.0.11)
[info] loading settings for project zio-nio from build.sbt ...
[info] set current project to zio-nio (in build file:/home/msaegesser/work/zio-nio/)
[info] Setting Scala version to 3.0.2 on 2 projects.
[info] Excluded 2 projects, run ++ 3.0.2 -v for more details.
[info] Reapplying settings...
[info] set current project to zio-nio (in build file:/home/msaegesser/work/zio-nio/)
[error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/home/msaegesser/work/zio-nio/"), "docs"):
[error] org.scala-lang.modules:scala-collection-compat _3, _2.13
[error] java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scala-lang.modules:scala-collection-compat
[error] at scala.sys.package$.error(package.scala:30)
[error] at sbt.librarymanagement.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:39)
[error] at sbt.librarymanagement.ConflictWarning$.apply(ConflictWarning.scala:19)
[error] at sbt.Classpaths$.$anonfun$ivyBaseSettings$71(Defaults.scala:3194)
[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:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:829)
[error] (docs / update) Conflicting cross-version suffixes in: org.scala-lang.modules:scala-collection-compat
[error] Total time: 1 s, completed Nov 22, 2021, 9:42:15 AM
Curiously, if I run sbt "++ 3.0.2;publishLocal I get a zio-nio artifact that does not depend on zio-nio-core and has a scala-collection-compat_3:2.5.5 dependency and only has a 2.13 dependency on silencer-lib.
I'm hoping someone here has better sbt chops that I do and understand how this happens.
The text was updated successfully, but these errors were encountered:
This comment on a PR from a couple months ago describes a work-around for this problem. I thought I'd share it here to make it more visible to others facing the same issue.
The zio-nio-core_3 in Maven has dependencies on Scala 2.13 libraries silencer-lib and scala-collection-compat. If I use zio-nio in a project that also depends on one of those libraries I get a compile error about cross-version suffixes.
I cloned the repo and tried building the top-level project and it fails with the same error.
Curiously, if I run
sbt "++ 3.0.2;publishLocal
I get a zio-nio artifact that does not depend on zio-nio-core and has a scala-collection-compat_3:2.5.5 dependency and only has a 2.13 dependency on silencer-lib.I'm hoping someone here has better sbt chops that I do and understand how this happens.
The text was updated successfully, but these errors were encountered: