Open bishabosha opened 2 years ago
I think version 1 is probably the best solution - e.g. it is useful to use cs to launch nightly releases, so I opened https://github.com/lampepfl/dotty/issues/15173 - however this would mean scalac
is still not feature complete for all previous scala 3 versions. Perhaps that is ok?
I guess fixing both - have the main class from dotty handle the argument, and also installing the official script for former versions - is fine (even if the second fix takes a little longer than the first one).
~the only problem is if it is widespread to use coursier cli as the way for users to quickly test nightly releases of scala 3, which would not work as they are not released to GitHub - but scala-cli can fill that gap :/~
Edit: yes actually I see it is not useful probably to test nighlies for old releases :)
The official GitHub hosted Scala 3
scalac
script for versions3.0.0
and higher scans the flags to pick which main class to run, for example:scalac -print-tasty
is meant to rundotty.tools.dotc.config.TastyPrinter
,scalac -decompile
is meant to rundotty.tools.dotc.decompiler.Main
,dotty.tools.dotc.Main
.This means that the
scalac
bootstrap launcher installed bycs
does not have feature parity as it always runsdotty.tools.dotc.Main
.this impacts the doc page at https://docs.scala-lang.org/scala3/guides/tasty-overview.html#what-is-tasty which recommends to use
So the solutions are either
scalac
scriptversionOverrides
to support using prebuilt for one version, and jvm launcher for anotheranother mitigation is to add the tasty-printer main class to apps