From 169a88dd3083da2ba90d0f6b080a2e3679d8f2fc Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Tue, 18 Jun 2013 18:29:01 -0400 Subject: [PATCH] Require projects to have unique target directories. Configuring projects so that target directories overlap is usually unintentional and the error message that results is usually unrelated to the cause. --- util/collection/src/main/scala/sbt/Settings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/collection/src/main/scala/sbt/Settings.scala b/util/collection/src/main/scala/sbt/Settings.scala index bd025cb5c..722430912 100644 --- a/util/collection/src/main/scala/sbt/Settings.scala +++ b/util/collection/src/main/scala/sbt/Settings.scala @@ -496,7 +496,7 @@ trait Init[Scope] def mapConstant(g: MapConstant): Initialize[T] = new Optional(a map mapConstantT(g).fn, f) def evaluate(ss: Settings[Scope]): T = f( a.flatMap( i => trapBadRef(evaluateT(ss)(i)) ) ) // proper solution is for evaluate to be deprecated or for external use only and a new internal method returning Either be used - private[this] def trapBadRef[A](run: => A): Option[A] = try Some(run) catch { case e: InvalidReferenceException => None } + private[this] def trapBadRef[A](run: => A): Option[A] = try Some(run) catch { case e: InvalidReference => None } } private[sbt] final class Value[T](val value: () => T) extends Initialize[T] {