IntelliJ: Scala worksheet don't pick up code changes without restart

前端 未结 2 2075
名媛妹妹
名媛妹妹 2021-01-04 02:11

If I have the contents of an object imported at the top of a Scala worksheet in Intellij, when I add new things to the object, they cannot be found in the worksheet. Even af

相关标签:
2条回答
  • 2021-01-04 02:21

    In case others end up here as bewildered as I was and find that the above doesn't resolve the issue, try unchecking the "Use external compile server for scala" tick box in Preferences > Build, Execution, Deployment > Compiler > Scala Compiler > Scala Compile Server (you can also get to this view from the speedometer-like icon in the bottom right of Intellij).

    Combined with "Make project" on the Scala worksheet view, this seems to ensure that changes are properly compiled and visible from within the worksheet.

    0 讨论(0)
  • 2021-01-04 02:34

    This seems to fix it, though I would love to know why the default setting is broken, or what this undocumented setting does: Go to File -> Settings -> Languages & Frameworks -> Scala -> Worksheet (tab) . Unselect "Run worksheet in the compiler process".

    0 讨论(0)
提交回复
热议问题