Skip to content

Use rules_scala from the Bazel Central Registry #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ rules_ts_ext = use_extension(
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")

bazel_dep(name = "rules_scala")
archive_override(
module_name = "rules_scala",
sha256 = "a4700d6e6cdf13cf85e29029ec998e2ec3ba94791606ec83d2c96e3c5b0aebed",
strip_prefix = "rules_scala-7.0.0",
url = "https://github.com/bazelbuild/rules_scala/releases/download/v7.0.0/rules_scala-v7.0.0.tar.gz",
bazel_dep(name = "rules_scala", version = "7.0.0")

scala_config = use_extension(
"@rules_scala//scala/extensions:config.bzl",
"scala_config",
)
scala_config.settings(scala_version = "2.13.16")

scala_deps = use_extension(
"@rules_scala//scala/extensions:deps.bzl",
Expand Down
834 changes: 471 additions & 363 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

Empty file removed scala/extensions/BUILD
Empty file.
42 changes: 42 additions & 0 deletions scala/extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Former `rules_scala` module extensions directory

We removed the [module extensions][] from this directory after the release of
[rules_scala v7.0.0][], which supports [Bazel modules (a.k.a. Bzlmod)][Bzlmod]
directly. We also removed the patch for `rules_scala` v6.6.0 from this
directory's parent.

[Migrating to Bazel Modules (a.k.a. Bzlmod) - Module Extensions][post] from the
[EngFlow 'bzlmod' blog post series][series] describes the former extensions and
their configuration in detail. You can also see the previous files in the git
history at commit `79b5193`:

- [MODULE.bazel](https://github.com/EngFlow/example/blob/79b51930e4629486462c0f9787a25d035b6c4450/MODULE.bazel#L167-L317)
- [scala/extensions/config.bzl](https://github.com/EngFlow/example/blob/79b51930e4629486462c0f9787a25d035b6c4450/scala/extensions/config.bzl)
- [scala/extensions/deps.bzl](https://github.com/EngFlow/example/blob/79b51930e4629486462c0f9787a25d035b6c4450/scala/extensions/deps.bzl)
- [scala/rules_scala-6.6.0.patch](https://github.com/EngFlow/example/blob/79b51930e4629486462c0f9787a25d035b6c4450/scala/rules_scala-6.6.0.patch)

You can view these files locally using:

```txt
git show 79b5193:MODULE.bazel
git show 79b5193:scala/extensions/config.bzl
git show 79b5193:scala/extensions/deps.bzl
git show 79b5193:scala/rules_scala-6.6.0.patch
```

To see the content of the `scala/extensions` directory at that commit:

```sh
$ git show 79b5193:scala/extensions
tree 79b5193:scala/extensions

BUILD
config.bzl
deps.bzl
```

[Bzlmod]: https://bazel.build/external/module
[module extensions]: https://bazel.build/external/extension
[rules_scala v7.0.0]: https://github.com/bazel-contrib/rules_scala/releases/tag/v7.0.0
[post]: https://blog.engflow.com/2025/01/16/migrating-to-bazel-modules-aka-bzlmod---module-extensions/
[series]: https://blog.engflow.com/category/bzlmod/
55 changes: 0 additions & 55 deletions scala/extensions/config.bzl

This file was deleted.

12 changes: 0 additions & 12 deletions scala/extensions/deps.bzl

This file was deleted.

91 changes: 0 additions & 91 deletions scala/rules_scala-6.6.0.patch

This file was deleted.