-
Notifications
You must be signed in to change notification settings - Fork 284
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
Semanticdb clear dir #1580
Semanticdb clear dir #1580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @crt-31, for taking this. Please take a look at comment.
@@ -95,6 +98,15 @@ private static Path ensureEmptyWorkDirectory(Path output, String label) throws I | |||
|
|||
return Files.createDirectories(dir); | |||
} | |||
|
|||
private static void ensureEmptySemanticDBDirectory(Path output, String label) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to refactor ensureEmptyWorkDirectory
instead of adding this method wich looks almost identical and serves same purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
(But the tests seem flaky... they have failed in different places (unrelated to this change) on last 2 runs).
ac909f0
to
9532a4a
Compare
9532a4a
to
4ecf61e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @crt-31!
* Delete _semanticdb folder before compiling * lint fix * Consolidated some functions in Scalacworker.
Description
This change clears out and deletes the _semanticdb folder before compiling. This is similar to how ScalacWorker was already clearing out the _classes directory.
Motivation
I ran into a bug where, when you delete a source *.scala file, it's associated semanticdb file remained and was read-only which caused permission errors when the compiler tried to clear the semanticdb output directory.