bazel-contrib / bazel-contrib/rules_scala
Abstract over test frameworks using the SBT testing interface
Nobody has claimed this yet.
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 46
Description
I'd like to abstract over test interfaces so that the scala_test rule supports all test frameworks implementing the SBT testing interface.
This is relatively easy to implement using the SBT testing interface class graph utility and the new phase architecture. The new rule will then automatically discover any Scala test in the same way SBT discovers test.
The bigger issue is our migration strategy: I would like to replace the existing scala_test rule-- which only works for ScalaTest tests-- with this new generic rule. The Specs2 rules (scala_specs2_junit_test, etc) can also be removed as the new rule will run Specs2 tests.
One possible migration strategy is to introduce the new rule at a new location. During a cutover period the existing test rules can delegate to the new implementation. Once we are ready to make a breaking change, we can get rid of the old rules (just facades at this point) and rename/move the main rule over.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by studying the SBT testing interface class graph utility and the new phase architecture mentioned in the issue. Then map the existing scala_test and Specs2 rules and define how they could delegate to a generic rule before a breaking-change cutover removes or renames the old facades.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100