Skip to content

Support multiple main methods in scripts #3498

Open
@tgodzik

Description

@tgodzik

Is your feature request related to a problem? Please describe.
After #3479 (comment) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlegacy:runner:compatIssues tied to the legacy scala runner compatibilitypriority: lowscriptingIssues tied to *.sc script inputs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions