mirror of https://github.com/sbt/sbt.git
Remove unused arguments in clean and use site
`cleanCachedResolutionCache` and `clean` were doing extra work because `clean` does only need to clean the cache in the configuration (that is a class parameter).
This commit is contained in:
parent
c588869f2e
commit
b68498d013
|
|
@ -159,15 +159,10 @@ final class IvySbt(val configuration: IvyConfiguration) { self =>
|
|||
*
|
||||
* @param md - module descriptor of the original Ivy graph.
|
||||
*/
|
||||
private[sbt] def cleanCachedResolutionCache(md: ModuleDescriptor, log: Logger): Unit =
|
||||
withIvy(log) { i =>
|
||||
val prOpt = Option(i.getSettings.getResolver(ProjectResolver.InterProject)) map {
|
||||
case pr: ProjectResolver => pr
|
||||
}
|
||||
if (configuration.updateOptions.cachedResolution) {
|
||||
IvySbt.cachedResolutionResolveCache.clean(md, prOpt)
|
||||
}
|
||||
}
|
||||
private[sbt] def cleanCachedResolutionCache(md: ModuleDescriptor, log: Logger): Unit = {
|
||||
if (!configuration.updateOptions.cachedResolution) ()
|
||||
else IvySbt.cachedResolutionResolveCache.clean()
|
||||
}
|
||||
|
||||
final class Module(rawModuleSettings: ModuleSettings) {
|
||||
val moduleSettings: ModuleSettings = IvySbt.substituteCross(rawModuleSettings)
|
||||
|
|
|
|||
|
|
@ -64,9 +64,8 @@ private[sbt] class CachedResolutionResolveCache {
|
|||
val maxConflictCacheSize: Int = 1024
|
||||
val maxUpdateReportCacheSize: Int = 1024
|
||||
|
||||
def clean(md0: ModuleDescriptor, prOpt: Option[ProjectResolver]): Unit = {
|
||||
updateReportCache.clear
|
||||
}
|
||||
def clean(): Unit = updateReportCache.clear
|
||||
|
||||
def directDependencies(md0: ModuleDescriptor): Vector[DependencyDescriptor] =
|
||||
md0.getDependencies.toVector
|
||||
// Returns a vector of (module descriptor, changing, dd)
|
||||
|
|
|
|||
Loading…
Reference in New Issue