Skip to content

Commit 12143ea

Browse files
committed
Fix #4929: Make TastyFileManager reusable
The external class file manager may be reused across multiple compilation, so we need to make sure the instance is reusable once a call to the `complete` callback has been made.
1 parent d6df02b commit 12143ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sbt-dotty/src/dotty/tools/sbtplugin/TastyFileManager.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ final class TastyFileManager extends ClassFileManager {
4848
IO.deleteFilesEmptyDirs(generatedTastyFiles)
4949
for ((orig, tmp) <- movedTastyFiles) IO.move(tmp, orig)
5050
}
51+
52+
generatedTastyFiles.clear()
53+
movedTastyFiles.clear()
5154
if (_tempDir != null) {
5255
IO.delete(tempDir)
5356
_tempDir = null

0 commit comments

Comments
 (0)