Skip to content

Commit

Permalink
Coursier alg migration
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil committed Feb 29, 2024
1 parent aa26f57 commit 34318b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import cats.implicits._
import coursier.cache.{CachePolicy, FileCache}
import coursier.core.{Authentication, Project}
import coursier.{Fetch, Module, ModuleName, Organization}
import coursier.{Fetch, Info, Module, ModuleName, Organization}
import org.http4s.Uri
import org.scalasteward.core.application.Config
import org.scalasteward.core.data.Resolver.Credentials
import org.scalasteward.core.data.{Dependency, Resolver, Version}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ trait CoursierDependenciesFetchAlg[F[_]] {
}

object CoursierDependenciesFetchAlg {
def create[F[_]](implicit parallel: Parallel[F], F: Sync[F]): CoursierDependenciesFetchAlg[F] =
(dependencies: Seq[String]) =>
def create[F[_]](implicit parallel: Parallel[F], F: Async[F]): CoursierDependenciesFetchAlg[F] =
(dependencies: Seq[String]) => {
Fetch[F](FileCache[F]())
.withDependencies(dependencies.map { dep =>
val Array(org, name, version) = dep.split(':')
Dependency(Module(Organization(org), ModuleName(name)), version)
})
.withDependencies(
dependencies.map { dep =>
val Array(org, name, version) = dep.split(':')
Dependency(Module(Organization(org), ModuleName(name)), version)
})
.io
.map(result => new URLClassLoader(result.map(_.toURI.toURL).toArray))
}
}

0 comments on commit 34318b6

Please sign in to comment.