* Use a machine-global lock on Ivy because caches are not safe for concurrent access.

* Fix some tests
This commit is contained in:
Mark Harrah 2010-01-28 19:32:17 -05:00
parent 5ef14bd5e8
commit fbaf5cbf2e
7 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,8 @@
#Project properties
#Thu Jan 28 10:55:25 EST 2010
project.organization=org.scala-tools.sbt
project.name=scripted
sbt.version=0.5.6
project.version=0.6.10-SNAPSHOT
project.version=0.6.12-SNAPSHOT
scala.version=2.7.7
project.initialize=false

View File

@ -88,11 +88,11 @@ object FillProperties
import CompatibilityLevel._
level match
{
case Full => "2.7.2 2.7.3 2.7.5 2.7.7 2.8.0.Beta1-RC6 2.8.0-SNAPSHOT"
case Basic => "2.7.7 2.7.2 2.8.0.Beta1-RC6"
case Minimal => "2.7.7 2.8.0.Beta1-RC6"
case Full => "2.7.2 2.7.3 2.7.5 2.7.7 2.8.0.Beta1 2.8.0-SNAPSHOT"
case Basic => "2.7.7 2.7.2 2.8.0.Beta1"
case Minimal => "2.7.7 2.8.0.Beta1"
case Minimal27 => "2.7.7"
case Minimal28 => "2.8.0.Beta1-RC6"
case Minimal28 => "2.8.0.Beta1"
}
}
def extraProperties(sbtVersion: String, defScalaVersion: String, buildScalaVersions: String) =

View File

@ -183,7 +183,7 @@ trait BasicManagedProject extends ManagedProject with ReflectiveManagedProject w
def ivyCacheDirectory: Option[Path] = None
def ivyPaths: IvyPaths = new IvyPaths(info.projectPath.asFile, ivyCacheDirectory.map(_.asFile))
def inlineIvyConfiguration = new InlineIvyConfiguration(ivyPaths, ivyRepositories.toSeq, moduleConfigurations.toSeq, log)
def inlineIvyConfiguration = new InlineIvyConfiguration(ivyPaths, ivyRepositories.toSeq, moduleConfigurations.toSeq, Some(info.launcher.globalLock), log)
def ivyConfiguration: IvyConfiguration =
{
val in = inlineIvyConfiguration
@ -192,14 +192,14 @@ trait BasicManagedProject extends ManagedProject with ReflectiveManagedProject w
{
if(in.moduleConfigurations.isEmpty)
{
IvyConfiguration(in.paths, in.log) match
IvyConfiguration(in.paths, in.lock, in.log) match
{
case e: ExternalIvyConfiguration => e
case i => info.parent map(parentIvyConfiguration(i)) getOrElse(i)
}
}
else
new InlineIvyConfiguration(in.paths, Resolver.withDefaultResolvers(Nil), in.moduleConfigurations, in.log)
new InlineIvyConfiguration(in.paths, Resolver.withDefaultResolvers(Nil), in.moduleConfigurations, in.lock, in.log)
}
else
in

View File

@ -2,8 +2,7 @@ import sbt._
class Plugins(info: ProjectInfo) extends PluginDefinition(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
override def ivyCacheDirectory = Some(outputPath / "ivy-cache")
override def managedStyle = ManagedStyle.Ivy
def projectRoot = Path.fromFile(info.projectPath.asFile.getParentFile.getParentFile)

View File

@ -2,8 +2,7 @@ import sbt._
class DefinePlugin(info: ProjectInfo) extends PluginProject(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
override def ivyCacheDirectory = Some(outputPath / "ivy-cache")
override def managedStyle = ManagedStyle.Ivy
val publishTo = Resolver.file("test-repo", ("repo" / "test").asFile)

View File

@ -1,4 +1,4 @@
> project "Sub project A"
> project Sub project A
> get sbt.version
$ absent a/project
$ absent b/project

View File

@ -1,4 +1,4 @@
> project "Sub project A"
> project Sub project A
> get sbt.version
$ absent a/project
$ absent b/project