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
bsp: Implementing buildTarget/cleanCache
#6638
Conversation
Hi @hmemcpy, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
fdcdcbe
to
d5ae7a2
Compare
@adpi2 hello, sorry for the ping. Unfortunately, this isn't actually working, and I really have no idea why :( I really don't know what I'm missing... any tips appreciated! |
d5ae7a2
to
64f69f5
Compare
main/src/main/scala/sbt/internal/server/BuildServerProtocol.scala
Outdated
Show resolved
Hide resolved
@hmemcpy Thanks for pinging me! It is great that you are working on it. I tested it locally and it seems to work. Make sure you clean the
Otherwise the launcher loads the old cached jars rather than the new ones. Another way to test the You can run it with: sbt:sbt> serverTestProj/testOnly testpkg.BuildServerTest |
@adpi2 I guess initially I had old jars in the cache. I'll test this a bit more and will mark the PR as done. Thanks again for the help! |
64f69f5
to
d84d8c1
Compare
And it's good to go! |
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 @hmemcpy!
Most of the comments are suggestions. But I think it is important to check in the test that buildTarget/cleanCache
empties the class directory.
main/src/main/scala/sbt/internal/server/BuildServerProtocol.scala
Outdated
Show resolved
Hide resolved
main/src/main/scala/sbt/internal/server/BuildServerProtocol.scala
Outdated
Show resolved
Hide resolved
main/src/main/scala/sbt/internal/server/BuildServerProtocol.scala
Outdated
Show resolved
Hide resolved
Thanks for the comments! My copy-pasting was obvious here :) |
3527b2a
to
71a52d2
Compare
71a52d2
to
b40a925
Compare
b40a925
to
a920693
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
Oops, temporarily marking this as draft. It looks like the
And I get back just two. Unfortunately I don't know what they are, since it's a Unit result. Is, perhaps, Update: I changed I understand this somewhat a synthetic target, perhaps I can filter it out when doing the comparison? |
Alright... I managed to implement a solution for both "Rebuild Project" (which includes the root build), as well as a regular "Rebuild module" (which includes the exact targets to rebuild). Would love any suggestions to improve this! |
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 don't see any obvious way to clean the build.sbt target. So this solution seems ok to me.
TYVM! :) |
Fixes #6569
This command is invoked by IntelliJ whenever a Rebuild operation is called. Unfortunately, because it's not implemented, this causes bsp-imported projects in IntelliJ to hang when asking to rebuild.
It works fine in bloop-imported projects because bloop implements this API.