From 68505aad4a22686594965bc910e60c8d2b6a95d4 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 19 May 2019 15:15:24 +0800 Subject: Bump ammonite to 1.6.7 (#610) * bump ammonite to 1.6.7 * upgrade all the things * add scalaj-http shims for bootstrapping * wip * tweak-error-message * tweak coursier * . --- contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala') diff --git a/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala b/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala index e99b25d5..03af2465 100644 --- a/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala +++ b/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala @@ -238,19 +238,22 @@ class BloopImpl(ev: () => Evaluator, wd: Path) extends ExternalModule { outer => import coursier.util._ def source(r: Resolution) = Resolution( - r.dependencies.map(d => - d.copy(attributes = d.attributes.copy(classifier = "sources"))) + r.dependencies + .map(d => + d.copy(attributes = d.attributes.copy(classifier = coursier.Classifier("sources"))) + ) + .toSeq ) import scala.concurrent.ExecutionContext.Implicits.global - val unresolved = Resolution(deps.toSet) - val fetch = Fetch.from(repos, Cache.fetch[Task]()) + val unresolved = Resolution(deps) + val fetch = ResolutionProcess.fetch(repos, coursier.cache.Cache.default.fetch) val gatherTask = for { resolved <- unresolved.process.run(fetch) resolvedSources <- source(resolved).process.run(fetch) all = resolved.dependencyArtifacts ++ resolvedSources.dependencyArtifacts gathered <- Gather[Task].gather(all.distinct.map { - case (dep, art) => Cache.file[Task](art).run.map(dep -> _) + case (dep, art) => coursier.cache.Cache.default.file(art).run.map(dep -> _) }) } yield gathered @@ -268,14 +271,14 @@ class BloopImpl(ev: () => Evaluator, wd: Path) extends ExternalModule { outer => .mapValues { _.map { case (_, mod, _, classifier, file) => - BloopConfig.Artifact(mod, classifier, None, file.toPath) + BloopConfig.Artifact(mod.value, classifier.map(_.value), None, file.toPath) }.toList } .map { case ((org, mod, version), artifacts) => BloopConfig.Module( - organization = org, - name = mod, + organization = org.value, + name = mod.value, version = version, configurations = None, artifacts = artifacts -- cgit v1.2.3