earldouglas / sbt-frege

Frege support for sbt
BSD 3-Clause "New" or "Revised" License
53 stars 7 forks source link

sbt shell freeze after "run" command #51

Open GongYiLiao opened 6 years ago

GongYiLiao commented 6 years ago

Using the HelloWorld example in the README.md, the sbt shell is just frozen, does not accept any input after the run command.

earldouglas commented 6 years ago

Confirmed; thanks for the report.

earldouglas commented 6 years ago

It looks like the generated Java code is hanging on:

frege.runtime.Runtime.stdout.get().close();
earldouglas commented 6 years ago

Setting fork in run := true works around this, but I don't yet understand why the buffer is blocked from closing.

earldouglas commented 6 years ago

The buffer in question:

https://github.com/Frege/frege/blob/3.24/frege/runtime/Runtime.java#L98