-
Notifications
You must be signed in to change notification settings - Fork 206
bugfix: Properly clean up orphan directories for internal classes #2032
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
Conversation
@@ -177,7 +177,7 @@ object ResultsCache { | |||
if (!cleanOrphanedInternalDirs) Task.unit | |||
else { | |||
val internalClassesDir = | |||
CompileOutPaths.createInternalClassesRootDir(project.genericClassesDir) | |||
CompileOutPaths.createInternalClassesRootDir(project.out) |
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.
Could you provide concrete values for project.out
and project.genericClassesDir
? Is one of them bloop-internal-classes
?
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.
project.out
is the currently used one for example /.bloop/input3/
while genericClassesDir
is .bloop/input3/scala-3/classes
, which is actually defined in the json file.
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.
I'm actually a bit surprised by this, I thought it would use the one specific to the scala version and therefore the nested on in .bloop/input3/scala-3/classes
.
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.
That is kind of redundant since you can't have multiple Scala versions for one project, so I don't think it's really useful. Also, it's a smaller change to just ignore that directory :S
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.
also, it seems that we always use bloop-bsp-clients-classes
always instead of classesDir
, so this looks legit as if we had only a single output we could have issues with mutiple clients. (whether we could have mutiple BSP client for the same workspace is another thing altogether.)
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.
Can you add scaladoc which will explain what orphaned directories are? Giving some concrete examples you did int his thread will awesome
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.
Ok, more digging it seems the is an option for the tool to use managed classes directory, but there is even more logic on top of it to dermine it.
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.
That is kind of redundant since you can't have multiple Scala versions for one project, so I don't think it's really useful. Also, it's a smaller change to just ignore that directory :S
ah ok cool, thanks for the explanations 😄
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.
I added scaladoc to this method. I will probably dig in a bit more later on.
It seems that the genericClassesDir is not being used at all by the compiler, so cleaning orphan directories in it was not achieving anything. We might need to figure out how to use `genericClassesDir` and whether it needs to be used at all, but for now this fixes the issue of large .bloop directory.
It seems that the genericClassesDir is not being used at all by the compiler, so cleaning orphan directories in it was not achieving anything.
We might need to figure out how to use
genericClassesDir
and whether it needs to be used at all, but for now this fixes the issue of large .bloop directory.