-
Notifications
You must be signed in to change notification settings - Fork 201
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
bugfix: Compile only existing classes #2490
Conversation
d312a27
to
054f826
Compare
054f826
to
1415473
Compare
@@ -231,21 +238,22 @@ private final class BloopNameHashing( | |||
} | |||
|
|||
def recompileClasses( | |||
sources: Set[VirtualFile], | |||
currentInvalidatedSources: Set[VirtualFile], |
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.
This is the main change, we would previously send all invalidated files even if they were no longer contained in the sources. This make sense for class files to remove them, but no some much to compile new files.
With this change I was no longer able to reproduce the issue in Metals where we would get old compilation artifacts somehow.
) | ||
} | ||
|
||
loadBspState(workspace, projects, logger) { state => |
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 haven't been able to reproduce the issue in the test unfortunately, this seems somehow connected to multiple thing being done at the same time via metals and VS Code, but the change in BloopNameHashing is sound anyway.
And having this test won't hurt
Previously, we would ask zinc to compile even a file that was removed and I think this was causing scalameta/metals#6478 Now, we invalidated all changed sources, but only compile new ones.
1415473
to
c8e9623
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.
LGTM
Previously, we would ask zinc to compile even a file that was removed and I think this was causing scalameta/metals#6478
Now, we invalidated all changed sources, but only compile new ones.