Skip to content

lucidsoftware/rules_scala

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lucidsoftware/rules_scala

Build Status

Previously known as higherkindness/rules_scala, lucidsoftware/rules_scala evolved, in part, from the need for Bazel adoption support for large, monorepo Scala projects. Bazel is wonderful because it makes use of parallelism and caching to vastly improve build times. However, to see these benefits, a project must first be broken down into tiny packages and make use of fine-grained dependencies. This is not always a realistic short-term goal for large, monorepo Scala projects.

lucidsoftware/rules_scala allows for the optional use of Zinc incremental compilation to provide a stepping stone for these projects as they migrate to Bazel. Although we've verified it to be correct and determinisitc, we recommend leaving this disabled, as fine-grained and isolated targets are more in-line with the Bazel philosophy.

lucidsoftware/rules_scala is written with maintainability and accessibility in mind. It aims to facilitate the transition to Bazel, and to satisfy use cases throughout the Scala ecosystem.

Principles

  1. Support the breadth of the Scala ecosystem.
  2. Follow Bazel best practices.
  3. Be accessible and maintainable.
  4. Have high-quality documentation.

If the right design principles are kept, implementing additional features should be simple and straightforward.

Features

Usage

lucidsoftware/rules_scala isn't on the Bazel Central Registry, so you'll need to pull it in via archive_override. Be sure to replace <COMMIT> with the latest commit on lucid-master and <INTEGRITY> with the hash suggested by Bazel after the dependency is first loaded.

MODULE.bazel

bazel_dep(name = "rules_scala_annex")

rules_scala_annex_version = "<COMMIT>"

archive_override(
    module_name = "rules_scala_annex",
    integrity = "<INTEGRITY>",
    strip_prefix = "rules_scala-{}".format(rules_scala_annex_version),
    urls = ["https://github.com/lucidsoftware/rules_scala/archive/refs/heads/{}.zip".format(rules_scala_annex_version)],
)

BUILD

load("@rules_scala_annex//rules:scala.bzl", "scala_library")

scala_library(
    name = "example",
    srcs = glob(["*.scala"])
)

Further Documentation

See contributing guidelines for help on contributing to this project.

For all rules and attributes, see the Stardoc.

About

Robust and featureful Bazel rules for Scala

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Starlark 49.0%
  • Scala 44.1%
  • Shell 6.0%
  • Other 0.9%