The official GitHub hosted Scala 3 scalac script for versions 3.0.0 and higher scans the flags to pick which main class to run, for example:
scalac -print-tasty is meant to run dotty.tools.dotc.config.TastyPrinter,
scalac -decompile is meant to run dotty.tools.dotc.decompiler.Main,
- by default run
dotty.tools.dotc.Main.
This means that the scalac bootstrap launcher installed by cs does not have feature parity as it always runs dotty.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
$ scalac -print-tasty hello.tasty
$ scalac -decompile hello.tasty
So the solutions are either
- to publish somewhere a jar with a main class that replicates the
scalac script
- to bundle the original bash/bat scripts for the 3.x series. This requires
versionOverrides to support using prebuilt for one version, and jvm launcher for another
another mitigation is to add the tasty-printer main class to apps
The official GitHub hosted Scala 3
scalacscript for versions3.0.0and higher scans the flags to pick which main class to run, for example:scalac -print-tastyis meant to rundotty.tools.dotc.config.TastyPrinter,scalac -decompileis meant to rundotty.tools.dotc.decompiler.Main,dotty.tools.dotc.Main.This means that the
scalacbootstrap launcher installed bycsdoes 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
scalacscriptversionOverridesto support using prebuilt for one version, and jvm launcher for anotheranother mitigation is to add the tasty-printer main class to apps