Skip to content

Commit

Permalink
Update coursier/dependency to 0.3.1 (#3297)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gedochao authored Nov 18, 2024
1 parent 479ec6a commit 589e3b3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object New extends ScalaCommand[NewOptions] {

override def scalaSpecificationLevel = SpecificationLevel.EXPERIMENTAL

val giter8Dependency =
private def giter8Dependency =
Seq(dep"${Constants.giter8Organization}::${Constants.giter8Name}:${Constants.giter8Version}")

override def runCommand(options: NewOptions, remainingArgs: RemainingArgs, logger: Logger): Unit =
Expand Down
6 changes: 4 additions & 2 deletions modules/options/src/main/scala/scala/build/Artifacts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ object Artifacts {
scalaArtifactsParams.compilerPlugins
.map { posDep =>
val posDep0 =
posDep.map(dep => dep.copy(userParams = dep.userParams + ("intransitive" -> None)))
posDep.map(dep =>
dep.copy(userParams = dep.userParams ++ Seq("intransitive" -> None))
)
artifacts(
Seq(posDep0),
allExtraRepositories,
Expand Down Expand Up @@ -529,7 +531,7 @@ object Artifacts {
.map(positionedDepTupleSeq =>
positionedDepTupleSeq.map {
case Positioned(positions, (dep, csDep)) =>
val maybeUrl = dep.userParams.get("url").flatten.map(new URL(_))
val maybeUrl = dep.userParams.find(_._1 == "url").flatMap(_._2.map(new URL(_)))
val fallback = maybeUrl.map(url => (csDep.module -> csDep.version) -> (url -> true))
Positioned(positions, (csDep, fallback))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ case object ActionableDependencyHandler
if Version(latestVersion) > Version(currentVersion) &&
!isLatestSyntaxVersion(currentVersion)
// filtering out toolkit-test to prevent double-update-diagnostic
if !(dependency.userParams.contains(Constants.toolkitName) &&
if !(dependency.userParams.exists(_._1 == Constants.toolkitName) &&
dependency.module.name == Constants.toolkitTestName)
} yield
if dependency.userParams.contains(Constants.toolkitName)
if dependency.userParams.exists(_._1 == Constants.toolkitName)
then
val toolkitSuggestion =
if dependency.module.organization == Constants.toolkitOrganization then latestVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ object Util {
(coursier.Organization(mod.organization), coursier.ModuleName(mod.name))
}
}
for (clOpt <- dep.userParams.get("classifier"); cl <- clOpt)
for (clOpt <- dep.userParams.find(_._1 == "classifier").map(_._2); cl <- clOpt)
dep0 = dep0.withPublication(dep0.publication.withClassifier(coursier.core.Classifier(cl)))
for (tpeOpt <- dep.userParams.get("type"); tpe <- tpeOpt)
for (tpeOpt <- dep.userParams.find(_._1 == "type").map(_._2); tpe <- tpeOpt)
dep0 = dep0.withPublication(dep0.publication.withType(coursier.core.Type(tpe)))
for (extOpt <- dep.userParams.get("ext"); ext <- extOpt)
for (extOpt <- dep.userParams.find(_._1 == "ext").map(_._2); ext <- extOpt)
dep0 = dep0.withPublication(dep0.publication.withExt(coursier.core.Extension(ext)))
for (_ <- dep.userParams.get("intransitive"))
for (_ <- dep.userParams.find(_._1 == "intransitive"))
dep0 = dep0.withTransitive(false)
dep0
}
Expand Down
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ object Deps {
def coursierPublish = ivy"io.get-coursier.publish:publish_2.13:0.1.6"
.exclude(("org.scala-lang.modules", "scala-collection-compat_2.13"))
.exclude(("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"))
def dependency = ivy"io.get-coursier::dependency:0.2.5"
def dependency = ivy"io.get-coursier::dependency:0.3.1"
def dockerClient = ivy"com.spotify:docker-client:8.16.0"
// TODO bump once 0.15.5 is out
def expecty = ivy"com.eed3si9n.expecty::expecty:0.17.0"
Expand Down

0 comments on commit 589e3b3

Please sign in to comment.