scalanlp / breeze

Breeze is a numerical processing library for Scala.
www.scalanlp.org
Apache License 2.0
3.44k stars 691 forks source link

Can't use breeze is Scala 3.1.0 #835

Closed Swoorup closed 2 years ago

Swoorup commented 2 years ago

When I try to use this library in Scala 3 I get the following issue:

I am using cats-effect, spire already as is. Not sure if the cross-compilation is setup correctly.

error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/Users/swoorup.joshi/personal/finflow-scala/"), "common"):
[error]    org.typelevel:spire-util _3, _2.13
[error]    org.scala-lang.modules:scala-collection-compat _3, _2.13
[error]    org.typelevel:algebra _3, _2.13
[error]    org.typelevel:spire-platform _3, _2.13
[error]    org.typelevel:spire _3, _2.13
[error]    org.typelevel:cats-kernel _3, _2.13
[error]    org.typelevel:spire-macros _3, _2.13
[error] stack trace is suppressed; run last common / update for the full output
[error] (common / update) Conflicting cross-version suffixes in: org.typelevel:spire-util, org.scala-lang.modules:scala-collection-compat, org.typelevel:algebra, org.typelevel:spire-platform, org.typelevel:spire, org.typelevel:cats-kernel, org.typelevel:spire-macros
[error] Total time: 3 s, completed 13 Jan. 2022, 6:04:14 pm
sbt:root> 
Swoorup commented 2 years ago

Can be fixed by https://github.com/scalanlp/breeze/pull/833

Swoorup commented 2 years ago

Hi @dlwh Any chance for a new release? The last version in scaladex appears to be 10 months ago. https://index.scala-lang.org/scalanlp/breeze/artifacts/breeze?binary-versions=_3#

dlwh commented 2 years ago

doing it as we speak!

On Sun, Aug 21, 2022 at 8:57 PM Swoorup Joshi @.***> wrote:

Hi @dlwh https://github.com/dlwh Any chance for a new release? The last version in scaladex appears to be 10 months ago.

https://index.scala-lang.org/scalanlp/breeze/artifacts/breeze?binary-versions=_3#

— Reply to this email directly, view it on GitHub https://github.com/scalanlp/breeze/issues/835#issuecomment-1221772716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACLIJOI5DKMYPDQZVQWH3V2L3C5ANCNFSM5L3AELLQ . You are receiving this because you were mentioned.Message ID: @.***>

dlwh commented 2 years ago

Ok 2.1.0 should be hitting central as we speak.

Swoorup commented 2 years ago

Awesome

philwalk commented 1 year ago

Not sure why, but I'm getting what appears to be this error when I try to upgrade breeze version from "2.0.1-RC2" to "2.1.0". On the off chance that someone can see a relevant clue in my stack dump:

My build compiles for "2.13.8" and "3.2.0", and there's no problem with the scala2 build. Here's what happens during the scala3 compile:

[error] java.lang.RuntimeException: Conflicting cross-version suffixes in: org.typelevel:cats-kernel
[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:3204)
[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:834)
[error] (apps / update) Conflicting cross-version suffixes in: org.typelevel:cats-kernel
[error] Total time: 2 s, completed Sep 13, 2022, 1:42:13 PM

I verified that the transitive dependency on spire is from breeze.

dlwh commented 1 year ago

Can you use one of the SBT dependency tree plugins that are out there different the dependency graph I suspect the conflict will be pretty clear in there

On Tue, Sep 13, 2022, 12:49 PM philwalk @.***> wrote:

Not sure why, but I'm getting what appears to be this error when I try to upgrade breeze version from "2.0.1-RC2" to "2.1.0". On the off chance that someone can see a relevant clue in my stack dump:

My build compiles for "2.13.8" and "3.2.0", and there's no problem with the scala2 build. Here's what happens during the scala3 compile:

[error] java.lang.RuntimeException: Conflicting cross-version suffixes in: org.typelevel:cats-kernel [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:3204) [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:834) [error] (apps / update) Conflicting cross-version suffixes in: org.typelevel:cats-kernel [error] Total time: 2 s, completed Sep 13, 2022, 1:42:13 PM

— Reply to this email directly, view it on GitHub https://github.com/scalanlp/breeze/issues/835#issuecomment-1245883605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACLILXXHHBMDVRMGH2PUDV6DLDTANCNFSM5L3AELLQ . You are receiving this because you were mentioned.Message ID: @.***>

philwalk commented 1 year ago

Can you use one of the SBT dependency tree plugins that are out there different the dependency graph I suspect the conflict will be pretty clear in there

Wow, thanks! I did try that previously, but this time it showed that I have a conflict with circe, which requires an older version of cats-kernel.