-
Notifications
You must be signed in to change notification settings - Fork 340
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
[sbt BSP] editing a file fires buildTarget/compile
against independent project
#3719
Comments
Thanks for finding this, I wonder if it's related to #6782 ? We can check via BSP logs what gets sent to sbt and this way figure out on which end the problem lays. |
I'm not sure, that feature request seems like both for sbt and bloop, and this issue occurs only with sbt BSP 🤔
Thanks! I'll check the logs 👍 |
Maybe this is just my misunderstanding because of the log output granularity. Here's the log from I'll analyze more about the BSP log differences. sbt BSP log
bloop log
|
Isn't title misleading? "editing a file fires It seems like Bloop knows that nothing changed in Does this interpretation make sense @tanishiking ? |
send a
|
@kpodsiad Yes, that's correct.
So, basically both |
Ahh, now I see that bloop is comparing Zinc Analysis. I wonder if we can make some changes in sbt to align this behavior. |
Yeah, also, bloop seems to compare the Zinc Analysis, and if there's no change in diagnostics, it doesn't notify the |
@kpodsiad Where did you find the code where bloop compares Zinc Analysis? I'm trying to read bloop code, but I'm new to the repo, it would be helpful if there're some pointers :) |
Anyway, I'm closing this issue, as it was my misunderstanding. |
There is a related issue to that sbt/sbt#6103 |
@tanishiking I didn't find code but I trusted the comment written here |
[note]
|
Opened an issue on sbt/sbt#6844 |
Describe the bug
Clone: https://github.com/tanishiking/sbt-multi-project/tree/20a3d476dc874db295fb3af3450873f8f211f1ea
proj2/src/main/scala/B.scala
the metals log shows:
proj1
happens (though no files compiled thanks to zinc).buildTarget/scalaMainClasses
compilesproj1
)Expected behavior
sbt doesn't run compile against
proj1
as bloop (looks it) doesn't.I'm not sure how much it costs on CPU (if there're a lot of subprojects like 60~, it may cost a lot), but it would be nice if independent projects compilation doesn't run every time we edit a file.
(I'm not sure is this a metals issue or an sbt issue. I'll take a look metals side first, then if it's not the metals fault, I'll open a ticket in the sbt repo).
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v0.11.2
Extra context or search terms
sbt 1.6.2
BSP
The text was updated successfully, but these errors were encountered: