mirror of https://github.com/sbt/sbt.git
* Use a machine-global lock on Ivy because caches are not safe for concurrent access.
* Fix some tests
This commit is contained in:
parent
5ef14bd5e8
commit
fbaf5cbf2e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) =
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
> project "Sub project A"
|
||||
> project Sub project A
|
||||
> get sbt.version
|
||||
$ absent a/project
|
||||
$ absent b/project
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
> project "Sub project A"
|
||||
> project Sub project A
|
||||
> get sbt.version
|
||||
$ absent a/project
|
||||
$ absent b/project
|
||||
Loading…
Reference in New Issue