Support multiple main methods in scripts
Is your feature request related to a problem? Please describe. After https://github.com/VirtusLab/scala-cli/pull/3479#event-16307192992 we will detect single main class if it's the only thing contained in the script and invoke that.
Describe the solution you'd like We should also allow user to define which main class to use if there is more that one for example:
object Main { def main(args: String): Unit = ??? }
object Main2 { def main(args: String): Unit = ??? }
Describe alternatives you've considered Using .scala files is a very simple workaround
I don't get the motivation for this. I've never used a scripting language where scripts have multiple entry points. If you want the same script to do different things, you accept command line options.
Yeah, I think we might never actually do it unless someone really needs it. This is more of a description of limitations.