com-lihaoyi / mill

Mill is a fast JVM build tool that supports Java and Scala. 2-3x faster than Gradle and 5-10x faster than Maven for common workflows, Mill aims to make your project’s build process performant, maintainable, and flexible
https://mill-build.org/
MIT License
2.04k stars 331 forks source link

Fix `ScalaModule#console` by properly inheriting streams #3500

Closed lihaoyi closed 3 weeks ago

lihaoyi commented 3 weeks ago

SystemStreamswithStreams(SystemStreams.original) didn't quite do the right thing because it continued to use the PumpedProcess*puts for subprocesses rather than directly inheriting the streams. This fixes it.

Tested manually via ./mill dist.launcher && (cd example/scalalib/basic/1-simple && ../../../../out/dist/launcher.dest/run -i console), which previously would print Unable to create system terminal and not allow keyboard navigation in the REPL, and with this PR it no longer warns and keyboard navigation works correctly

Fixes https://github.com/com-lihaoyi/mill/issues/3491