Skip to content
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 clashes with Bloop in Scala 3 #6723

Open
filipwiech opened this issue Aug 27, 2024 · 1 comment
Open

SBT clashes with Bloop in Scala 3 #6723

filipwiech opened this issue Aug 27, 2024 · 1 comment
Labels
needs more information Use if we need more information for a specific ticket

Comments

@filipwiech
Copy link
Contributor

filipwiech commented Aug 27, 2024

Describe the bug

Related to the old comment from a different issue (initially I thought it was caused by the new Best Effort compilation mode): #6628 (comment).

After our project migrated to Scala 3 (there was never such problem with Scala 2) I noticed that Bloop builds triggered by Metals (by changing code in the editor) started to break external SBT builds for the same project that I run in the terminal (for example to execute tests). Usually it doesn't happen immediately, but after a while SBT starts throwing "fake" errors and is unable to do anything (compile, test, etc.) without a clean build. This helps for a bit, until the whole thing starts again.

It seems that IntelliJ has a special setting just for this issue, called "Use separate compiler output paths" (see related SCL-22359). Does Metals or Bloop allow for something similar? Could it be made available as a simple single-switch option, maybe even enabled out of the box for Bloop (the default Metals build server)? 🙂

Scala 3.5.0, SBT 1.10.1, Bloop 2.0.0.

Expected behavior

Both SBT (external terminal) and Bloop (editor with Metals) builds can work concurrently in the same project without any conflicts.

Operating system

Linux

Editor/Extension

Other

Version of Metals

1.3.5+74-424c00f8-SNAPSHOT

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Aug 27, 2024

Thanks for reporting! sbt and Bloop actually have separate output paths. Bloop produces things to client directories in .bloop, while sbt uses specific target. I don't think it's possible that they interfere with each other.

You can confirm by running the doctor and clicking on a specific target, then scrolling to:

image

Or alternatively, you can turn off sbt, do some changes and see if the sbt target directory changed at all

@tgodzik tgodzik added the needs more information Use if we need more information for a specific ticket label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more information Use if we need more information for a specific ticket
Projects
None yet
Development

No branches or pull requests

2 participants