mirror of
https://github.com/sbt/sbt.git
synced 2026-09-08 11:13:23 +02:00
fix stray Ivy logging message when directly accessing IvySbt#Module
This commit is contained in:
+5
-3
@@ -91,10 +91,12 @@ final class IvySbt(val configuration: IvyConfiguration)
|
||||
def owner = IvySbt.this
|
||||
def logger = configuration.log
|
||||
def withModule[T](f: (Ivy,DefaultModuleDescriptor,String) => T): T =
|
||||
withIvy[T] { ivy => f(ivy, moduleDescriptor, defaultConfig) }
|
||||
withIvy[T] { ivy => f(ivy, moduleDescriptor0, defaultConfig0) }
|
||||
|
||||
def moduleDescriptor = IvySbt.synchronized { moduleDescriptor0 }
|
||||
def defaultConfig = IvySbt.synchronized { defaultConfig0 }
|
||||
def moduleDescriptor = withModule((_,md,_) => md)
|
||||
def defaultConfig = withModule( (_,_,dc) => dc)
|
||||
// these should only be referenced by withModule because lazy vals synchronize on this object
|
||||
// withIvy explicitly locks the IvySbt object, so they have to be done in the right order to avoid deadlock
|
||||
private[this] lazy val (moduleDescriptor0: DefaultModuleDescriptor, defaultConfig0: String) =
|
||||
{
|
||||
val (baseModule, baseConfiguration) =
|
||||
|
||||
@@ -356,7 +356,7 @@ object Artifact
|
||||
val name = file.getName
|
||||
val i = name.lastIndexOf('.')
|
||||
val base = if(i >= 0) name.substring(0, i) else name
|
||||
Artifact(name, extract(name, defaultType), extract(name, defaultExtension), None, Nil, Some(file.toURI.toURL))
|
||||
Artifact(base, extract(name, defaultType), extract(name, defaultExtension), None, Nil, Some(file.toURI.toURL))
|
||||
}
|
||||
}
|
||||
final case class ModuleConfiguration(organization: String, name: String, revision: String, resolver: Resolver)
|
||||
|
||||
Reference in New Issue
Block a user