Merge pull request #5746 from eatkins/virtual-file-cache

Make virtual file value cache global
This commit is contained in:
eugene yokota 2020-08-13 22:20:11 -04:00 committed by GitHub
commit cd47b5c47b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -405,6 +405,8 @@ object Defaults extends BuildCommon {
)
},
fileConverter := MappedFileConverter(rootPaths.value, allowMachinePath.value),
// The virtual file value cache needs to be global or sbt will run out of direct byte buffer memory.
classpathDefinesClassCache := VirtualFileValueCache.definesClassCache(fileConverter.value),
fullServerHandlers := {
Seq(
LanguageServerProtocol.handler(fileConverter.value),
@ -788,7 +790,6 @@ object Defaults extends BuildCommon {
else old
},
persistJarClasspath :== true,
classpathDefinesClassCache := VirtualFileValueCache.definesClassCache(fileConverter.value),
classpathEntryDefinesClassVF := {
(if (persistJarClasspath.value) classpathDefinesClassCache.value
else VirtualFileValueCache.definesClassCache(fileConverter.value)).get