polynote icon indicating copy to clipboard operation
polynote copied to clipboard

Enable to configure the compiler for the Scala REPL for Scala interpretor

Open sfc-gh-mrui opened this issue 3 years ago • 2 comments

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.

sfc-gh-mrui avatar Nov 08 '21 22:11 sfc-gh-mrui

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 avatar Nov 08 '21 22:11 jeremyrsmith

@jeremyrsmith Appreciated so much! Your understanding is exact!

sfc-gh-mrui avatar Nov 08 '21 23:11 sfc-gh-mrui