polynote
polynote copied to clipboard
Enable to configure the compiler for the Scala REPL for Scala interpretor
Description It looks the Polynote doesn't support to configure Scala REPL like other notebook product. For example, jupyter notebook support to configure Scala REPL such as
interp.configureCompiler(_.settings.outputDirs.setSingleOutput(replClassPath))
interp.configureCompiler(_.settings.Yreplclassbased)
Some configuration is hard-coded such as settings.Ydelambdafy.value
is set as "inline"
.
It will be great if the Scala REPL options are configurable.
Agreed! I know we've heard from e.g. engineers at Snowflake that -Ydelambdafy
would be better off set to method
, for example. It would be great to have this be configurable at the notebook level.
We could have it specified as a single String setting that's specified in the same way command line arguments are specified to scalac
. This could be parsed into flags via the same mechanism that scalac
uses to parse them.
This would probably not be too hard (adding a notebook config item, plus some parsing logic in ScalaInterpreter
delegated to the Scala compiler).
@jeremyrsmith Appreciated so much! Your understanding is exact!