如何关闭 Scala 快速编译服务器 (FSC) 超时?

发布于 2024-10-07 04:19:23 字数 277 浏览 5 评论 0原文

我正在使用 Scala 编译服务器。这可能与我的 IDE IntelliJ IDEA 无关,但我只是告诉您,我通过该 IDE 中的特殊运行配置启动 Scala 编译服务器。

经过一段时间没有编译任何内容后,编译服务器终止,没有任何消息。通常,我只会在尝试编译某些内容但编译失败时才会注意到这一点。然后,我需要再次启动编译服务器,当然下一次编译需要很长时间,因为这又是启动编译服务器以来的第一次编译。

我如何关闭该超时?我查看了 scalac 的联机帮助页,似乎没有任何选项。我可以为该运行配置添加虚拟机选项。

I am using a Scala compilation server. This is probably not related to my IDE IntelliJ IDEA, but I will just inform you that I start the Scala compilation server through a special run configuration in that IDE.

After some time that goes by without compiling anything, the compilation server terminates, without any message. Usually, I only notice this when I try to compile something and compilation fails. Then, I need to start the compilation server again, and of course the next compilation takes a long time, because it's once more the first compilation since starting the compilation server.

How do I turn off that timeout? I looked at the manpage for scalac, and there seems to be no option for it. I can add VM options for that run configuration.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

触ぅ动初心 2024-10-14 04:19:23

传递 -max-idle 0 作为参数。它将在最近的 nightly 上运行,并且在 Scala 2.9.0 发布时应该可以使用。但是,不能保证在此之前该名称不会更改。

Pass -max-idle 0 as parameter. It will work on a very (very!) recent nightly, and it should be available on Scala 2.9.0 when it comes out. However, there's no guarantee the name won't change until then.

感情旳空白 2024-10-14 04:19:23

我认为你不能。这是来自编译服务器的代码片段:

object SocketServer
{
  // After 30 idle minutes, politely exit.
  // Should the port file disappear, and the clients
  // therefore unable to contact this server instance,
  // the process will just eventually terminate by itself.
  val IdleTimeout = 1800000
  val BufferSize  = 10240

  def bufferedReader(s: Socket) = new BufferedReader(new InputStreamReader(s.getInputStream()))
  def bufferedOutput(s: Socket) = new BufferedOutputStream(s.getOutputStream, BufferSize)
}

我认为您应该在 scala-lang.org 中打开功能请求

I don't think you can. Here is a code snippet from the compilation server:

object SocketServer
{
  // After 30 idle minutes, politely exit.
  // Should the port file disappear, and the clients
  // therefore unable to contact this server instance,
  // the process will just eventually terminate by itself.
  val IdleTimeout = 1800000
  val BufferSize  = 10240

  def bufferedReader(s: Socket) = new BufferedReader(new InputStreamReader(s.getInputStream()))
  def bufferedOutput(s: Socket) = new BufferedOutputStream(s.getOutputStream, BufferSize)
}

I think you should open a feature request in scala-lang.org

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文