Skip to content

Commit 30c32a3

Browse files
committed
Merge branch 'bzlmod-rebuilding' into bzlmod
Lots of little touch ups. For the next commit, I'll use the new `scripts/toggle-workspace.sh` to ensure `WORKSPACE` compatibility.
2 parents 3ce5189 + 184f7a0 commit 30c32a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2755
-2928
lines changed

MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ module(
66
repo_name = "io_bazel_rules_scala",
77
)
88

9-
SCALA_VERSION = "2.13.14"
9+
SCALA_VERSION = "2.13.15"
1010

1111
SCALA_2_VERSIONS = [
12-
"2.12.19",
13-
"2.13.14",
12+
"2.12.20",
13+
"2.13.15",
1414
]
1515

1616
SCALA_3_VERSIONS = [
17-
"3.3.3",
17+
"3.3.4",
1818
]
1919

2020
SCALA_VERSIONS = SCALA_2_VERSIONS + SCALA_3_VERSIONS

MODULE.bazel.lock

Lines changed: 770 additions & 769 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ scalatest_toolchain()
8888
```
8989

9090
This will load the `rules_scala` repository at the commit sha
91-
`rules_scala_version` into your Bazel project and register a [scala_toolchain](docs/scala_toolchain.md) at the default Scala version (2.12.19)
91+
`rules_scala_version` into your Bazel project and register a [scala_toolchain](docs/scala_toolchain.md) at the default Scala version (2.12.20)
9292

9393
Then in your BUILD file just add the following so the rules will be available:
9494
```starlark
@@ -143,13 +143,13 @@ Previous minor versions may work but are supported only on a best effort basis.
143143
To configure Scala version you must call `scala_config(scala_version = "2.xx.xx")` and configure
144144
dependencies by declaring [scala_toolchain](docs/scala_toolchain.md).
145145
For a quick start you can use `scala_repositories()` and `scala_register_toolchains()`, which have
146-
dependency providers configured for `2.11.12`, `2.12.19` and `2.13.14` versions.
146+
dependency providers configured for `2.11.12`, `2.12.20` and `2.13.15` versions.
147147

148148

149149
```starlark
150150
# WORKSPACE
151151
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
152-
scala_config(scala_version = "2.13.14")
152+
scala_config(scala_version = "2.13.15")
153153

154154
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
155155
rules_proto_dependencies()

WORKSPACE

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,23 @@ load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
3939

4040
scala_config(enable_compiler_dependency_tracking = True)
4141

42-
load(
43-
"//scala:scala.bzl",
44-
"rules_scala_setup",
45-
"rules_scala_toolchain_deps_repositories",
46-
"scala_toolchains_repo",
42+
load("//scala:scala.bzl", "scala_toolchains")
43+
44+
scala_toolchains(
45+
fetch_sources = True,
46+
jmh = True,
47+
scala_proto = True,
48+
scalafmt = True,
49+
testing = True,
50+
twitter_scrooge = True,
4751
)
4852

49-
rules_scala_setup()
50-
51-
rules_scala_toolchain_deps_repositories(fetch_sources = True)
52-
53-
scala_toolchains_repo()
53+
register_toolchains(
54+
"//testing:testing_toolchain",
55+
"//scala:unused_dependency_checker_error_toolchain",
56+
"//test/proto:scalapb_toolchain",
57+
"@io_bazel_rules_scala_toolchains//...:all",
58+
)
5459

5560
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
5661

@@ -68,37 +73,6 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
6873

6974
protobuf_deps()
7075

71-
load("//scala:scala_cross_version.bzl", "default_maven_server_urls")
72-
load("//twitter_scrooge:twitter_scrooge.bzl", "twitter_scrooge")
73-
74-
twitter_scrooge()
75-
76-
load("//jmh:jmh.bzl", "jmh_repositories")
77-
78-
jmh_repositories()
79-
80-
load("//scala_proto:scala_proto.bzl", "scala_proto_repositories")
81-
82-
scala_proto_repositories()
83-
84-
load("//scalatest:scalatest.bzl", "scalatest_repositories")
85-
86-
scalatest_repositories()
87-
88-
load("//specs2:specs2_junit.bzl", "specs2_junit_repositories")
89-
90-
specs2_junit_repositories()
91-
92-
register_toolchains("//testing:testing_toolchain")
93-
94-
load("//scala/scalafmt:scalafmt_repositories.bzl", "scalafmt_default_config", "scalafmt_repositories")
95-
96-
scalafmt_default_config()
97-
98-
scalafmt_repositories()
99-
100-
MAVEN_SERVER_URLS = default_maven_server_urls()
101-
10276
# needed for the cross repo proto test
10377
load("//test/proto_cross_repo_boundary:repo.bzl", "proto_cross_repo_boundary_repository")
10478

@@ -122,12 +96,6 @@ local_repository(
12296
path = "third_party/test/example_external_workspace",
12397
)
12498

125-
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_unused_deps_toolchains")
126-
127-
scala_register_unused_deps_toolchains()
128-
129-
register_toolchains("@io_bazel_rules_scala//test/proto:scalapb_toolchain")
130-
13199
load("//scala:scala_maven_import_external.bzl", "java_import_external")
132100

133101
# bazel's java_import_external has been altered in rules_scala to be a macro based on jvm_import_external
@@ -191,10 +159,7 @@ rbe_preconfig(
191159

192160
load("//testing/private:repositories.bzl", "testing_repositories")
193161

194-
testing_repositories(
195-
fetch_sources = False,
196-
maven_servers = MAVEN_SERVER_URLS,
197-
)
162+
testing_repositories(fetch_sources = False)
198163

199164
load("//test/toolchains:jdk.bzl", "remote_jdk21_repositories", "remote_jdk21_toolchains")
200165

dt_patches/dt_patch_test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ run_test_local test_compiler_patch 2.12.16
9999
run_test_local test_compiler_patch 2.12.17
100100
run_test_local test_compiler_patch 2.12.18
101101
run_test_local test_compiler_patch 2.12.19
102+
run_test_local test_compiler_patch 2.12.20
102103

103104
run_test_local test_compiler_patch 2.13.0
104105
run_test_local test_compiler_patch 2.13.1
@@ -113,6 +114,7 @@ run_test_local test_compiler_patch 2.13.10
113114
run_test_local test_compiler_patch 2.13.11
114115
run_test_local test_compiler_patch 2.13.12
115116
run_test_local test_compiler_patch 2.13.14
117+
run_test_local test_compiler_patch 2.13.15
116118

117119
run_test_local test_compiler_srcjar_error 2.12.11
118120
run_test_local test_compiler_srcjar_error 2.12.12
@@ -131,7 +133,9 @@ run_test_local test_compiler_srcjar 2.12.16
131133
run_test_local test_compiler_srcjar_nonhermetic 2.12.17
132134
run_test_local test_compiler_srcjar_nonhermetic 2.12.18
133135
run_test_local test_compiler_srcjar_nonhermetic 2.12.19
136+
run_test_local test_compiler_srcjar_nonhermetic 2.12.20
134137

135138
run_test_local test_compiler_srcjar_nonhermetic 2.13.11
136139
run_test_local test_compiler_srcjar_nonhermetic 2.13.12
137140
run_test_local test_compiler_srcjar_nonhermetic 2.13.14
141+
run_test_local test_compiler_srcjar_nonhermetic 2.13.15

0 commit comments

Comments
 (0)