Skip to content

Fix #4929: allow reusing TastyFileManager #4930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2018

Conversation

Blaisorblade
Copy link
Contributor

Fix #4929.

Copy link
Member

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the right fix to me 👍

Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let's merge and keep the issue opened. I'll have a look when I'm back

@@ -20,7 +20,14 @@ import scala.collection.mutable
* temporary directory as class files.
*/
final class TastyFileManager extends ClassFileManager {
private[this] val tempDir = Files.createTempDirectory("backup").toFile
private[this] def newTempDir() = Files.createTempDirectory("backup").toFile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be inlined in def tempDir

Recreate `tempDir` if we're reused after `complete` was called and deleted the
existing `tempDir`.

The output in scala#4929 was produced by this commit.
That was only for history, not to be left in the actual plugin.
@Blaisorblade Blaisorblade force-pushed the fix-sbt-tastyfilemanager branch from f0b2892 to 0d4dc18 Compare August 11, 2018 19:16
@Blaisorblade Blaisorblade merged commit ff5e69c into scala:master Aug 11, 2018
@Blaisorblade Blaisorblade deleted the fix-sbt-tastyfilemanager branch August 11, 2018 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants