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 437388f
Showing 1 changed file with 8 additions and 6 deletions.
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 437388f

Please sign in to comment.