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

Bloop compiler Hangs on Test Build #1748

Open
TRReeve opened this issue Jun 30, 2022 · 3 comments
Open

Bloop compiler Hangs on Test Build #1748

TRReeve opened this issue Jun 30, 2022 · 3 comments
Labels
bug A defect or misbehaviour. Scala 3 upstream-fix-needed

Comments

@TRReeve
Copy link

TRReeve commented Jun 30, 2022

Hi all.

I have run into an issue with the compilation in bloop which was surfacing for me in Metals where the compiler was hanging indefinitely on building "root-test". This also causes a large amount of CPU usage on my mac in the background. I'm not entirely sure if this is to do with the fact its "root-test" or if there's something in the code causing it that is revealed when it's compiled in the test modules.

Problem
Bloop seems to run a build as usual on "root". I can also compile using SBT perfectly fine. When I am working on my test code however the build hangs indefinitely. The problem reproduces across most recent versions of Metals and on Scala 3.1.2 + 3.2.0 and adding more memory to bloop/metals et al doesn't yield any changes.

Environment:
VSCode
Java 17 Graal
Mac OS 12.4

Expected Behaviour:

The test compiles the same as the main code base/SBT.

Reproduction attempt
bloop_compile_issue.zip

To reproduce hanging issue
bloop compile --verbose root-test

Doesn't hang
bloop compile --verbose root

Thread Dump in particuar global-executor-23 looks a bit "loopy" but I don't know enough to say if it's related for sure.
thread_dump.zip

@tgodzik
Copy link
Contributor

tgodzik commented Jul 1, 2022

Thanks for reporting! I minimized it further and it seems an exception is thrown:

scala/scala3#15567

Bloop was hanging instead of throwing it further unfortunately.

@tgodzik tgodzik added Scala 3 bug A defect or misbehaviour. upstream-fix-needed and removed Scala 3 labels Jul 1, 2022
@tgodzik
Copy link
Contributor

tgodzik commented Jul 1, 2022

We need to make sure that Bloop throws an exception properly here.

@tgodzik
Copy link
Contributor

tgodzik commented Jul 5, 2022

Just checked and the infinite loop itself is fixed in 3.2.1-RC1-bin-20220704-dc5a9a4-NIGHTLY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect or misbehaviour. Scala 3 upstream-fix-needed
Projects
None yet
Development

No branches or pull requests

2 participants