Skip to content

Commit 589e3b3

Browse files
authored
Update coursier/dependency to 0.3.1 (#3297)
1 parent 479ec6a commit 589e3b3

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

modules/cli/src/main/scala/scala/cli/commands/new/New.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object New extends ScalaCommand[NewOptions] {
1414

1515
override def scalaSpecificationLevel = SpecificationLevel.EXPERIMENTAL
1616

17-
val giter8Dependency =
17+
private def giter8Dependency =
1818
Seq(dep"${Constants.giter8Organization}::${Constants.giter8Name}:${Constants.giter8Version}")
1919

2020
override def runCommand(options: NewOptions, remainingArgs: RemainingArgs, logger: Logger): Unit =

modules/options/src/main/scala/scala/build/Artifacts.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ object Artifacts {
168168
scalaArtifactsParams.compilerPlugins
169169
.map { posDep =>
170170
val posDep0 =
171-
posDep.map(dep => dep.copy(userParams = dep.userParams + ("intransitive" -> None)))
171+
posDep.map(dep =>
172+
dep.copy(userParams = dep.userParams ++ Seq("intransitive" -> None))
173+
)
172174
artifacts(
173175
Seq(posDep0),
174176
allExtraRepositories,
@@ -529,7 +531,7 @@ object Artifacts {
529531
.map(positionedDepTupleSeq =>
530532
positionedDepTupleSeq.map {
531533
case Positioned(positions, (dep, csDep)) =>
532-
val maybeUrl = dep.userParams.get("url").flatten.map(new URL(_))
534+
val maybeUrl = dep.userParams.find(_._1 == "url").flatMap(_._2.map(new URL(_)))
533535
val fallback = maybeUrl.map(url => (csDep.module -> csDep.version) -> (url -> true))
534536
Positioned(positions, (csDep, fallback))
535537
}

modules/options/src/main/scala/scala/build/actionable/ActionableDependencyHandler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ case object ActionableDependencyHandler
3939
if Version(latestVersion) > Version(currentVersion) &&
4040
!isLatestSyntaxVersion(currentVersion)
4141
// filtering out toolkit-test to prevent double-update-diagnostic
42-
if !(dependency.userParams.contains(Constants.toolkitName) &&
42+
if !(dependency.userParams.exists(_._1 == Constants.toolkitName) &&
4343
dependency.module.name == Constants.toolkitTestName)
4444
} yield
45-
if dependency.userParams.contains(Constants.toolkitName)
45+
if dependency.userParams.exists(_._1 == Constants.toolkitName)
4646
then
4747
val toolkitSuggestion =
4848
if dependency.module.organization == Constants.toolkitOrganization then latestVersion

modules/options/src/main/scala/scala/build/internals/Util.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ object Util {
7171
(coursier.Organization(mod.organization), coursier.ModuleName(mod.name))
7272
}
7373
}
74-
for (clOpt <- dep.userParams.get("classifier"); cl <- clOpt)
74+
for (clOpt <- dep.userParams.find(_._1 == "classifier").map(_._2); cl <- clOpt)
7575
dep0 = dep0.withPublication(dep0.publication.withClassifier(coursier.core.Classifier(cl)))
76-
for (tpeOpt <- dep.userParams.get("type"); tpe <- tpeOpt)
76+
for (tpeOpt <- dep.userParams.find(_._1 == "type").map(_._2); tpe <- tpeOpt)
7777
dep0 = dep0.withPublication(dep0.publication.withType(coursier.core.Type(tpe)))
78-
for (extOpt <- dep.userParams.get("ext"); ext <- extOpt)
78+
for (extOpt <- dep.userParams.find(_._1 == "ext").map(_._2); ext <- extOpt)
7979
dep0 = dep0.withPublication(dep0.publication.withExt(coursier.core.Extension(ext)))
80-
for (_ <- dep.userParams.get("intransitive"))
80+
for (_ <- dep.userParams.find(_._1 == "intransitive"))
8181
dep0 = dep0.withTransitive(false)
8282
dep0
8383
}

project/deps.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ object Deps {
160160
def coursierPublish = ivy"io.get-coursier.publish:publish_2.13:0.1.6"
161161
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
162162
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
163-
def dependency = ivy"io.get-coursier::dependency:0.2.5"
163+
def dependency = ivy"io.get-coursier::dependency:0.3.1"
164164
def dockerClient = ivy"com.spotify:docker-client:8.16.0"
165165
// TODO bump once 0.15.5 is out
166166
def expecty = ivy"com.eed3si9n.expecty::expecty:0.17.0"

0 commit comments

Comments
 (0)