From 437950266fdfa17c628f88a39efaf1bfb522293a Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 5 Dec 2019 17:45:33 +0100 Subject: [PATCH] Give a more precise type to mkIvyConfiguration This makes it possible to do mkIvyConfiguration.value.withXXX(...) for all the methods in InlineIvyConfiguration. (I need this to remove inter-project resolvers when fetching dotty from sbt-dotty to avoid accidentally fetching a local project in the build of dotty itself). --- build.sbt | 5 +++++ main/src/main/scala/sbt/Defaults.scala | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1c20edbf4..0ceae7323 100644 --- a/build.sbt +++ b/build.sbt @@ -800,6 +800,11 @@ lazy val mainProj = (project in file("main")) exclude[IncompatibleSignatureProblem]("sbt.ProjectExtra.inScope"), exclude[MissingTypesProblem]("sbt.internal.Load*"), exclude[IncompatibleSignatureProblem]("sbt.internal.Load*"), + // IvyConfiguration was replaced by InlineIvyConfiguration in the generic + // signature, this does not break compatibility regardless of what + // cast a compiler might have inserted based on the old signature + // since we're returning the same values as before. + exclude[IncompatibleSignatureProblem]("sbt.Classpaths.mkIvyConfiguration") ) ) .configure( diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 688d6ca71..9701871c4 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -3252,7 +3252,7 @@ object Classpaths { buildDependencies.value ) } - def mkIvyConfiguration: Initialize[Task[IvyConfiguration]] = + def mkIvyConfiguration: Initialize[Task[InlineIvyConfiguration]] = Def.task { val (rs, other) = (fullResolvers.value.toVector, otherResolvers.value.toVector) val s = streams.value