rules_scala
rules_scala copied to clipboard
Compile Scala code with Zinc
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.