Merge pull request #4538 from eatkins/compiler-cache

Clear compiler cache in clearCaches
This commit is contained in:
eugene yokota 2019-02-04 10:27:14 -05:00 committed by GitHub
commit fbadfabfe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -837,6 +837,7 @@ object BuiltinCommands {
}
def registerCompilerCache(s: State): State = {
s.get(Keys.stateCompilerCache).foreach(_.clear())
val maxCompilers = System.getProperty("sbt.resident.limit")
val cache =
if (maxCompilers == null)
@ -875,7 +876,7 @@ object BuiltinCommands {
def clearCaches: Command = {
val help = Help.more(ClearCaches, ClearCachesDetailed)
Command.command(ClearCaches, help)(registerGlobalCaches)
Command.command(ClearCaches, help)(registerGlobalCaches _ andThen registerCompilerCache)
}
def shell: Command = Command.command(Shell, Help.more(Shell, ShellDetailed)) { s0 =>