rules_scala
rules_scala copied to clipboard
Rewrite the ruleset's workers in Scala
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.
Having workers be written in Scala instead of Java presents multiple advantages:
-
Most of the repository’s compiled code is written in a single programming language
- This reduces the learning curve for a new contributor
-
Many of the rule phases can be tested on the ruleset itself
- Every rule phase that doesn't run Scala code would be run when we the workers themselves are built, assuming we do so via a set of bootstrap rules. This includes most phases, with the notable exception of the
compilephase. If there's something wrong with one of those phases, we'll detect it, because the workers will fail to build. This enables bugs and developer experience regressions to be caught earlier.
- Every rule phase that doesn't run Scala code would be run when we the workers themselves are built, assuming we do so via a set of bootstrap rules. This includes most phases, with the notable exception of the
-
The benefits of Scala are inherited, which include:
- Safety
- Conciseness
- Expressiveness
- Arguably superior object-oriented programming features
See the proposal for more information.