rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

Compile Scala code with Zinc

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 sections:

Note that we're not interested in pursuing incremental compilation; rather, we're interested in everything else Zinc has to offer.

A few of the benefits we would get by invoking the compiler via Zinc:

  • We can invoke the compiler programmtically via the compiler interface
    • This would prevent us from having to spin up a separate JVM for each compiler invocation
    • This would allow us to invoke the Scala 2 and Scala 3 compiler via the same API
  • Zinc outputs an analysis file that includes information about classes, methods, which dependencies were used, etc.
    • This could be used for dependency checking, test discovery, main method detection, etc.

See the proposal for more information.

jadenPete avatar Dec 09 '24 14:12 jadenPete