Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update coursier/dependency to 0.3.1 #3297

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading