Skip to content

Conversation

@alexarchambault
Copy link
Contributor

@alexarchambault alexarchambault commented Apr 5, 2022

Needs scala-cli/bloop-core#55, included in the upcoming (Scala CLI's) bloop-core 1.4.20.

This sends the output of the Bloop server to a file under the user home directory (alongside the socket file, ~/Library/Caches/ScalaCli/bloop/daemon/output on macOS for example), and adds a scala-cli bloop output command printing that file in the console, so that users can easily have a look at that file.

In order for that output file not to grow too big, we pass an option to the Bloop server so that it truncates that file periodically (as soon as it reaches 1 MB, scala-cli/bloop-core#55).

@alexarchambault alexarchambault force-pushed the write-bloop-output-to-file branch from c9e5d58 to e909068 Compare April 5, 2022 17:33
@alexarchambault alexarchambault force-pushed the write-bloop-output-to-file branch from e5394d6 to c868eba Compare April 8, 2022 13:10
@alexarchambault alexarchambault marked this pull request as ready for review April 8, 2022 13:10
version.takeWhile(c => c.isDigit || c == '.').split('.') match {
case Array(IntValue(maj), IntValue(min), IntValue(patch)) =>
import scala.math.Ordering.Implicits._
Seq(maj, min, patch) >= Seq(1, 14, 20)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we do need to check the bloop version if we control the version of bloop ourselves? I think if we see too old version running (e.g. after update of scala-cli) we should restart it with newer version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's for if users manually force an earlier version to something else. Earlier Bloop versions can't truncate their output file, so redirecting the output this way would create a file that might grow too big.

@romanowski romanowski merged commit 53f18b8 into VirtusLab:main Apr 14, 2022
@alexarchambault alexarchambault deleted the write-bloop-output-to-file branch April 14, 2022 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants