rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

Automatically detect main methods

Open jadenPete opened this issue 11 months ago • 0 comments
trafficstars

This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.

The tracking issue for this effort

The relevant proposal section.

If we compiled with Zinc, we could make the main_class attribute on scala_binary optional. From the proposal:

Zinc’s analysis file contains a list of "main classes"—classes and objects identified as candidates for a main class (i.e. the class containing the main method). In our non-bootstrapped compilation worker, we access that list and write it to a file. If a main class hasn’t been manually set, we read the previously mentioned file, select one, and use that.

Doing something similar in bazelbuild/rules_scala could make scala_binary targets easier to declare.

jadenPete avatar Dec 09 '24 14:12 jadenPete