Skip to content

Commit 7a19477

Browse files
committed
util-tunable: Scala3 support
1 parent 2e558ef commit 7a19477

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

build.sbt

+8-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ val defaultScala3EnabledSettings = Seq(
9898

9999
// Our dependencies or compiler options may differ for both Scala 2 and 3. We branch here
100100
// to account for there differences but should merge these artifacts as they are updated.
101-
val scalaDependencies = Seq("org.scala-lang.modules" %% "scala-collection-compat" % "2.4.4")
101+
val scalaDependencies = Seq("org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0")
102102
val scala2cOptions = Seq(
103103
"-target:jvm-1.8",
104104
// Needs -missing-interpolator due to https://issues.scala-lang.org/browse/SI-8761
@@ -210,13 +210,15 @@ val baseSettings = Seq(
210210
val sharedSettings =
211211
baseSettings ++
212212
defaultScalaSettings ++
213-
Seq(libraryDependencies ++= scala2Dependencies)
213+
Seq(libraryDependencies ++= scala2Dependencies) ++
214+
// This doesn't really do much except when trying to compile modules with Scala 3 which don't support it yet,
215+
// instead of failing during "update" due to conflicting _2.13 _3 suffixes it will fail during compilation.
216+
Seq(excludeDependencies ++= Seq("org.scala-lang.modules" % "scala-collection-compat_3"))
214217

215218
val sharedScala3EnabledSettings =
216219
baseSettings ++
217220
defaultScala3EnabledSettings ++
218-
Seq(libraryDependencies ++= scala3Dependencies) ++
219-
Seq(excludeDependencies ++= Seq("org.scala-lang.modules" % "scala-collection-compat_3"))
221+
Seq(libraryDependencies ++= scala3Dependencies)
220222

221223
// settings for projects that are cross compiled with scala 2.10
222224
val settingsCrossCompiledWithTwoTen =
@@ -461,7 +463,7 @@ lazy val utilFunction = Project(
461463
id = "util-function",
462464
base = file("util-function")
463465
).settings(
464-
sharedSettings
466+
sharedScala3EnabledSettings
465467
).settings(
466468
name := "util-function"
467469
)
@@ -718,7 +720,7 @@ lazy val utilTunable = Project(
718720
id = "util-tunable",
719721
base = file("util-tunable")
720722
).settings(
721-
sharedSettings
723+
sharedScala3EnabledSettings
722724
).settings(
723725
name := "util-tunable",
724726
libraryDependencies ++= Seq(

0 commit comments

Comments
 (0)