Skip to content

Commit ff2d068

Browse files
sankalpgambhirvkuncak
authored andcommitted
Fix dependency exclusion at source
1 parent 467725e commit ff2d068

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

build.sbt

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,27 @@ resolvers ++= Seq(
3737
"uuverifiers" at "https://eldarica.org/maven"
3838
)
3939

40+
// 2.13 dependencies coming from Eldarica and Princess that we also use as their
41+
// Scala 3 versions, causing conflicts; they are expected to be binary
42+
// compatible and we simply pick the Scala 3 versions
43+
val doubleDependencies = Seq(
44+
"org.scala-lang.modules" % "scala-parser-combinators_2.13",
45+
"org.scala-lang.modules" % "scala-xml_2.13",
46+
"org.scalactic" % "scalactic_2.13",
47+
).map(artifact => artifact: ExclusionRule) // invoke the implicit conversion
48+
4049
libraryDependencies ++= Seq(
4150
"org.scalatest" %% "scalatest" % "3.2.9" % "test;it",
4251
"org.apache.commons" % "commons-lang3" % "3.4",
43-
("uuverifiers" %% "eldarica" % "2.2").cross(CrossVersion.for3Use2_13),
44-
("uuverifiers" %% "princess" % "2025-04-01").cross(CrossVersion.for3Use2_13),
52+
("uuverifiers" %% "eldarica" % "2.2")
53+
.cross(CrossVersion.for3Use2_13)
54+
.excludeAll(doubleDependencies: _*),
55+
("uuverifiers" %% "princess" % "2025-04-01")
56+
.cross(CrossVersion.for3Use2_13)
57+
.excludeAll(doubleDependencies: _*),
4558
"org.scala-lang.modules" %% "scala-parser-combinators" % "2.3.0"
4659
)
4760

48-
excludeDependencies ++= Seq(
49-
"org.scala-lang.modules" % "scala-parser-combinators_2.13",
50-
"org.scala-lang.modules" % "scala-xml_2.13",
51-
"org.scalactic" % "scalactic_2.13",
52-
)
53-
5461
lazy val nTestParallelism = {
5562
val p = System.getProperty("test-parallelism")
5663
if (p ne null) {
@@ -134,7 +141,6 @@ lazy val docs = project
134141
mdocOut := file("doc"),
135142
mdocExtraArguments := Seq("--no-link-hygiene"),
136143
scalaVersion := inoxScalaVersion,
137-
excludeDependencies := Seq("org.scala-lang.modules" % "scala-parser-combinators_2.13"),
138144
)
139145
.enablePlugins(MdocPlugin)
140146

0 commit comments

Comments
 (0)