Plugins need to own first-class options
som-snytt opened this issue · 3 comments
With the dawn of "toolkit composition", where it's easy for scala-cli
to create a compiler with required dependencies, including plugins, third party plugins need first-class access to the compiler option namespace.
In particular, plugins that generate warnings deserve to own -W
switches.
Today's example is the zero waste plugin, the last blocker for production use of Scala 3.
I'll volunteer to take a first swing at whether it is feasible for competing plugins to declare which options they support.
The second-class -P
mechanism, which is great for people who love colons, and who does not love colons, does not inspire confidence.
Maybe -V
can profit from the mechanism.
I'm lightly skeptical... -P
seems fine to me
The goal is for compiler to do less providing. It may turn out to be untenable.
This idea is more interesting if the compiler generates no warnings and all -W
output is 3rd-party. Same for lints, which are just a class of warnings.