You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While -i is mostly an interactive usage nice-to-have, -e may be more impactful in breaking scripts in the wild.
I've raised this independently also to ask/determine "policy" of command line interface breakage in general, and how distribution packagers treat executable names.
The official foremost recommended installation method for Scala 3 presently is Coursier—resulting in new executables of scala3-repl and scala3-compiler—but distribution packagers are unlikely to use that approach. The official dotty Homebrew formula maintains the scala and scalac executables. I believe many distribution channels are doing the same. So, it's fair to say CLI breakage is a material consideration.
Side note: the REPL- and script runner-specific scala -help output in Scala 2 is a nicer experience IMO than Scala 3 echoing exactly the compiler usage. I'm not sure there are any REPL-specific options at this point, so filing an enhancement for this might not make sense, yet? It would be nice to summarize how script running works like the old help did, perhaps it's not appropriate to call it "script running" if synthesizing a main method etc. is no longer a feature, but the convenience of on-the-fly compiling a given source file remains.
Similar to #12647 and again referencing lampepfl/dotty-feature-requests#131 as an umbrella of REPL parity and whether any of it is regression vs. enhancement.
While
-i
is mostly an interactive usage nice-to-have,-e
may be more impactful in breaking scripts in the wild.I've raised this independently also to ask/determine "policy" of command line interface breakage in general, and how distribution packagers treat executable names.
The official foremost recommended installation method for Scala 3 presently is Coursier—resulting in new executables of
scala3-repl
andscala3-compiler
—but distribution packagers are unlikely to use that approach. The official dotty Homebrew formula maintains thescala
andscalac
executables. I believe many distribution channels are doing the same. So, it's fair to say CLI breakage is a material consideration.Side note: the REPL- and script runner-specific
scala -help
output in Scala 2 is a nicer experience IMO than Scala 3 echoing exactly the compiler usage. I'm not sure there are any REPL-specific options at this point, so filing an enhancement for this might not make sense, yet? It would be nice to summarize how script running works like the old help did, perhaps it's not appropriate to call it "script running" if synthesizing a main method etc. is no longer a feature, but the convenience of on-the-fly compiling a given source file remains.Also,
scalac -script
is undocumented in-help
.Compiler version
3.0.0
Minimized code
Output
(Missing feature aside, this seems like less than ideal option handling in the wrapper shell script, versus):
Expectation
The text was updated successfully, but these errors were encountered: