Skip to content

Automatically detect main methods #1669

@jadenPete

Description

@jadenPete

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions