Skip to content

Commit 852d8f9

Browse files
committed
Exclude conflicting dependencies
1 parent d3305bf commit 852d8f9

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

build.sc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,16 @@ trait Core extends ScalaCliSbtModule with ScalaCliPublishModule with HasTests
329329
}
330330

331331
def ivyDeps = super.ivyDeps() ++ Agg(
332-
Deps.bloopRifle,
332+
Deps.bloopRifle.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13")),
333333
Deps.collectionCompat,
334334
Deps.coursierJvm
335335
// scalaJsEnvNodeJs brings a guava version that conflicts with this
336336
.exclude(("com.google.collections", "google-collections"))
337337
// Coursier is not cross-compiled and pulls jsoniter-scala-macros in 2.13
338338
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-macros"))
339339
// Let's favor our config module rather than the one coursier pulls
340-
.exclude((organization, "config_2.13")),
340+
.exclude((organization, "config_2.13"))
341+
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13")),
341342
Deps.dependency,
342343
Deps.guava, // for coursierJvm / scalaJsEnvNodeJs, see above
343344
Deps.jgit,
@@ -622,7 +623,8 @@ trait Build extends ScalaCliSbtModule with ScalaCliPublishModule with HasTests
622623
options,
623624
directives,
624625
`scala-cli-bsp`,
625-
`test-runner`(Scala.scala213), // Depending on version compiled with Scala 3 pulls older stdlib
626+
// Depending on version compiled with Scala 3 pulls older stdlib
627+
`test-runner`(Scala.runnerScala3),
626628
`tasty-lib`(scalaVer)
627629
)
628630
def scalacOptions = T {
@@ -812,7 +814,7 @@ trait Cli extends SbtModule with ProtoBuildModule with CliLaunchers
812814
Deps.libsodiumjni,
813815
Deps.metaconfigTypesafe,
814816
Deps.pythonNativeLibs,
815-
Deps.scalaPackager,
817+
Deps.scalaPackager.exclude("com.lihaoyi" -> "os-lib_2.13"),
816818
Deps.signingCli.exclude((organization, "config_2.13")),
817819
Deps.slf4jNop, // to silence jgit
818820
Deps.sttp

project/deps.sc

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import coursier.mavenRepositoryString
21
import mill._, scalalib._
32

4-
import scala.util.Properties
5-
import $file.utils, utils.isArmArchitecture
6-
73
object Scala {
84
def scala212 = "2.12.18"
95
def scala213 = "2.13.12"
@@ -103,19 +99,25 @@ object Deps {
10399
def ammonite = ivy"com.lihaoyi:::ammonite:3.0.0-M0-56-1bcbe7f6"
104100
def asm = ivy"org.ow2.asm:asm:9.6"
105101
// Force using of 2.13 - is there a better way?
106-
def bloopConfig = ivy"ch.epfl.scala:bloop-config_2.13:1.5.5"
102+
def bloopConfig = ivy"ch.epfl.scala:bloop-config_2.13:1.5.5"
103+
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
107104
def bloopRifle = ivy"io.github.alexarchambault.bleep:bloop-rifle_2.13:1.5.11-sc-2"
108105
def bsp4j = ivy"ch.epfl.scala:bsp4j:2.1.0-M7"
109106
def caseApp = ivy"com.github.alexarchambault::case-app:2.1.0-M26"
110107
def collectionCompat = ivy"org.scala-lang.modules::scala-collection-compat:2.11.0"
111108
// Force using of 2.13 - is there a better way?
112-
def coursier = ivy"io.get-coursier:coursier_2.13:${Versions.coursier}"
113-
def coursierJvm = ivy"io.get-coursier:coursier-jvm_2.13:${Versions.coursier}"
114-
def coursierLauncher = ivy"io.get-coursier:coursier-launcher_2.13:${Versions.coursier}"
109+
def coursier = ivy"io.get-coursier:coursier_2.13:${Versions.coursier}"
110+
def coursierJvm = ivy"io.get-coursier:coursier-jvm_2.13:${Versions.coursier}"
111+
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
112+
def coursierLauncher = ivy"io.get-coursier:coursier-launcher_2.13:${Versions.coursier}"
113+
.exclude(("ai.kien", "python-native-libs_2.13"))
114+
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
115115
def coursierProxySetup = ivy"io.get-coursier:coursier-proxy-setup:${Versions.coursier}"
116-
def coursierPublish = ivy"io.get-coursier.publish:publish_2.13:0.1.6"
117-
def dependency = ivy"io.get-coursier::dependency:0.2.3"
118-
def dockerClient = ivy"com.spotify:docker-client:8.16.0"
116+
def coursierPublish = ivy"io.get-coursier.publish:publish_2.13:0.1.6"
117+
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
118+
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
119+
def dependency = ivy"io.get-coursier::dependency:0.2.3"
120+
def dockerClient = ivy"com.spotify:docker-client:8.16.0"
119121
// TODO bump once 0.15.5 is out
120122
def expecty = ivy"com.eed3si9n.expecty::expecty:0.16.0"
121123
def fansi = ivy"com.lihaoyi::fansi:0.4.0"
@@ -159,7 +161,9 @@ object Deps {
159161
// Force using of 2.13 - is there a better way?
160162
def scalaJsTestAdapter = ivy"org.scala-js:scalajs-sbt-test-adapter_2.13:${Scala.scalaJs}"
161163
// Force using of 2.13 - is there a better way?
162-
def scalametaTrees = ivy"org.scalameta:trees_2.13:${Versions.scalaMeta}"
164+
def scalametaTrees = ivy"org.scalameta:trees_2.13:${Versions.scalaMeta}"
165+
.exclude(("com.lihaoyi", "sourcecode_2.13"))
166+
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
163167
def scalaPackager = ivy"org.virtuslab:scala-packager_2.13:${Versions.scalaPackager}"
164168
def scalaPackagerCli = ivy"org.virtuslab:scala-packager-cli_2.13:${Versions.scalaPackager}"
165169
def scalaPy = ivy"dev.scalapy::scalapy-core::0.5.3"
@@ -178,6 +182,8 @@ object Deps {
178182
.exclude(("com.github.alexarchambault", "case-app_3"))
179183
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_3"))
180184
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-macros_3"))
185+
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
186+
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
181187
def slf4jNop = ivy"org.slf4j:slf4j-nop:2.0.9"
182188
def sttp = ivy"com.softwaremill.sttp.client3:core_2.13:3.9.1"
183189
def svm = ivy"org.graalvm.nativeimage:svm:$graalVmVersion"

0 commit comments

Comments
 (0)