I can’t get the option to work; am i doing something wrong?
$ scala repl -S 3.6.4-RC1 --repl-init-script 'println("Hello")'
Unrecognized argument: --repl-init-script
To list all available options, run
scala repl --help
But it works inside the repl:
bjornr@bjornux:~$ scala repl -S 3.6.4-RC1
Welcome to Scala 3.6.4-RC1 (21.0.5, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> :reset --repl-init-script:'println("Hello")'
Resetting REPL state with the following settings:
--repl-init-script:println("Hello")
Hello
scala>
It’s from “ouside” using the code from command line which is the important use case; so you can pass an import for instance…
$ scala repl -S 3.6.4-RC1
Downloading Scala 3.6.4-RC1 compiler
Downloading Scala 3.6.4-RC1 bridge
Welcome to Scala 3.6.4-RC1 (21.0.5, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> println(util.Properties.versionString)
version 2.13.15
if I understand correctly, scala-cli recognizes certain options as being compiler/REPL options and doesn’t require the -O, but this is one it apparently doesn’t know yet, so the -O is necessary
@bjornregnell it’s a REPL flag, not a Scala CLI or compiler one.
You pass it to the launched app, so to the REPL in this case, so after --.
scala repl -S 3.6.4-RC1 -- --repl-init-script 'println("Hello")'
Hello
Welcome to Scala 3.6.4-RC1 (23.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala>
Thank you reporting this one.
Unfortunately some time ago we’ve introduced a cutoff policy for RC releases so that we can fixed amount of time to find and fix regressions, to address issues with multiple releases for the same minor due to multiple bugfix releases (e.g. 3.6.1-RC1 being blocked by not yet released 3.5.0 (-RC7))
In the 3.6.4-RC2 (5 weeks after RC1) we’ve reverted all changes that introduced a known regressions that we were not able to fix in that period. Unless any critical issue would occur (e.g. detected binary compatibility breakage, CVE, etc.) we don’t plan any additional release candidates and the RC2 would be nominated to final release.
This means this regression is unlikely to be fixed in 3.6.4, but we’d try our best to have it fixed in 3.7.0 (either in RC1 planned for March 12th or backported in successor RC)
Thanks for clarification. As for my project, it can happily live with 3.6.3 until next release, I do not think any of 3.6.4 features is something we need.
Is there an expected release date for 3.7.0? I thought it was planned for end of year, but if the first RC is due next week then maybe the final release will be earlier than I thought.
I’d like to know so I can decide what version to use in the next release of Mill 0.13.0
It’s typically ~6 weeks after cutoff / RC1, which would set us for final release no earlier then April 15th.
As for the version used for Mill I’d personally suggest 3.3 LTS with possible upgrade to next one (probably 3.9 LTS) in the future, because of the plugin system. Seems like sbt 2 is currently using Scala 3.6, but in my opinion they should stick to LTS as well, unless it is possible to have a seperation of an API for plugin authors published using LTS and actual application using whatever version author chooses.
Got it, thanks! Mill’s main branch currently is on 3.6 following SBT 2.0, we can see whether it’s feasible to use 3.3.x. IIRC some libraries hit compiler bugs thst necessitated 3.5 or above, so might not be feasible even if we wanted to