Skip to content

Commit 5c012e7

Browse files
authored
Merge pull request #56 from lucidsoftware/annex-upgrade
Annex upgrade
2 parents a3048c2 + e726866 commit 5c012e7

File tree

8 files changed

+42
-43
lines changed

8 files changed

+42
-43
lines changed

.bazelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ build --strategy=worker,sandboxed,local
66
build --verbose_failures
77

88
build --incompatible_strict_action_env
9-
build --experimental_worker_multiplex_sandboxing
9+
# Disable multiplex sandboxing because there is a bug that causes files which
10+
# should be in the sandbox to not be. Not sure if this is a Bazel bug or a rule
11+
# set bug. Something we need to deal with either way.
12+
#build --experimental_worker_multiplex_sandboxing
1013
build --experimental_worker_cancellation
1114
build --worker_sandboxing
1215

WORKSPACE

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,37 +138,35 @@ go_rules_dependencies()
138138

139139
go_register_toolchains(version = "1.23.0")
140140

141-
# Also for buildifier. Comes from
142-
# https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md
143-
protobuf_version = "3.19.4"
141+
# protobuf
142+
143+
protobuf_tag = "28.3"
144+
145+
protobuf_sha256 = "5b2ff0f72e85dc1350b7bb1b4ea94d7e92e297f7a58b630e46fa6b430b5b253b"
144146

145147
http_archive(
146148
name = "com_google_protobuf",
147-
sha256 = "3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568",
148-
strip_prefix = "protobuf-{}".format(protobuf_version),
149-
url = "https://github.com/protocolbuffers/protobuf/archive/v{}.tar.gz".format(protobuf_version),
149+
sha256 = protobuf_sha256,
150+
strip_prefix = "protobuf-{}".format(protobuf_tag),
151+
type = "zip",
152+
url = "https://github.com/protocolbuffers/protobuf/archive/v{}.zip".format(protobuf_tag),
150153
)
151154

152155
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
153156

154157
protobuf_deps()
155158

156159
# higherkindness/rules_scala
157-
rules_scala_annex_version = "f23c16037db66efb541dbbf5e17e6604886c85ff"
160+
rules_scala_annex_version = "lucid_2024-11-17"
158161

159162
http_archive(
160163
name = "rules_scala_annex",
161-
integrity = "sha256-b/cPeh6J1Mq63u6fSWdEHAKL/kWfPhZcNL7m9If7PWM=",
164+
integrity = "sha256-+hiIcio0oFrcBvl43W19GzOytd7zSo7oZkU314w/Xf4=",
162165
strip_prefix = "rules_scala-{}".format(rules_scala_annex_version),
163166
type = "zip",
164167
url = "https://github.com/lucidsoftware/rules_scala/archive/{}.zip".format(rules_scala_annex_version),
165168
)
166169

167-
bind(
168-
name = "default_scala",
169-
actual = "//scala:default_scala",
170-
)
171-
172170
load(
173171
"@rules_scala_annex//rules/scala:workspace.bzl",
174172
"scala_register_toolchains",
@@ -181,7 +179,13 @@ load("@annex//:defs.bzl", annex_pinned_maven_install = "pinned_maven_install")
181179

182180
annex_pinned_maven_install()
183181

184-
scala_register_toolchains()
182+
scala_register_toolchains(
183+
default_scala_toolchain_name = "zinc_3",
184+
toolchains = [
185+
"@rules_play_routes//scala:zinc_2_13",
186+
"@rules_play_routes//scala:zinc_3",
187+
],
188+
)
185189

186190
# rules_pkg
187191
rules_pkg_version = "1.0.1"

play-routes-compiler-cli/play-routes-compiler-cli.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def generate_play_routes_compiler_targets(scala_version):
3434
"@rules_scala_annex//src/main/scala/higherkindness/rules_scala/common/sandbox",
3535
"@rules_scala_annex//src/main/scala/higherkindness/rules_scala/common/worker",
3636
],
37-
scala = "//scala:zinc_{}".format(scala_version_underscore),
37+
scala_toolchain_name = "zinc_{}".format(scala_version_underscore),
3838
)
3939

4040
java_binary(

play_routes_compiler_cli_2_13_install.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": -1321367170,
4-
"__RESOLVED_ARTIFACTS_HASH": -378258452,
3+
"__INPUT_ARTIFACTS_HASH": 1429549754,
4+
"__RESOLVED_ARTIFACTS_HASH": 1421109904,
55
"artifacts": {
66
"com.eed3si9n:shaded-jawn-parser_2.13": {
77
"shasums": {
@@ -40,10 +40,10 @@
4040
},
4141
"com.google.protobuf:protobuf-java": {
4242
"shasums": {
43-
"jar": "e8f524c2ad5965aae31b0527bf9d4e3bc19b0dfba8c05aef114fccc7f057c94d",
44-
"sources": "7176e76e9585a151046e456029af87e35957006f5263e1343375cf7bcd871d6e"
43+
"jar": "ba02977c0fef8b40af9f85fe69af362d8e13f2685b49a9752750b18da726157e",
44+
"sources": "d368a684a2fd70c482dc7f842099a939b562effeee45c9a562dba8682f7133bc"
4545
},
46-
"version": "3.19.4"
46+
"version": "4.28.3"
4747
},
4848
"com.lmax:disruptor": {
4949
"shasums": {

play_routes_compiler_cli_3_install.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": 1531353200,
4-
"__RESOLVED_ARTIFACTS_HASH": -1522521253,
3+
"__INPUT_ARTIFACTS_HASH": -476889668,
4+
"__RESOLVED_ARTIFACTS_HASH": 838501119,
55
"artifacts": {
66
"com.eed3si9n:shaded-jawn-parser_2.13": {
77
"shasums": {
@@ -40,10 +40,10 @@
4040
},
4141
"com.google.protobuf:protobuf-java": {
4242
"shasums": {
43-
"jar": "e8f524c2ad5965aae31b0527bf9d4e3bc19b0dfba8c05aef114fccc7f057c94d",
44-
"sources": "7176e76e9585a151046e456029af87e35957006f5263e1343375cf7bcd871d6e"
43+
"jar": "ba02977c0fef8b40af9f85fe69af362d8e13f2685b49a9752750b18da726157e",
44+
"sources": "d368a684a2fd70c482dc7f842099a939b562effeee45c9a562dba8682f7133bc"
4545
},
46-
"version": "3.19.4"
46+
"version": "4.28.3"
4747
},
4848
"com.lmax:disruptor": {
4949
"shasums": {

scala/BUILD.bazel

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
load(
2-
"@rules_scala_annex//rules:scala.bzl",
3-
"configure_bootstrap_scala",
4-
"configure_zinc_scala",
2+
"@rules_scala_annex//rules:register_toolchain.bzl",
3+
"register_zinc_toolchain",
54
)
65
load(":version.bzl", "scala_2_13_version", "scala_3_version")
76

@@ -17,14 +16,7 @@ runtime_classpath_3 = [
1716
"@play_routes_compiler_cli_3//:org_scala_lang_tasty_core_3",
1817
]
1918

20-
configure_bootstrap_scala(
21-
name = "bootstrap_3",
22-
compiler_classpath = compiler_classpath_3,
23-
runtime_classpath = runtime_classpath_3,
24-
version = scala_3_version,
25-
)
26-
27-
configure_zinc_scala(
19+
register_zinc_toolchain(
2820
name = "zinc_3",
2921
compiler_bridge = "@play_routes_compiler_cli_3//:org_scala_lang_scala3_sbt_bridge",
3022
compiler_classpath = compiler_classpath_3,
@@ -50,7 +42,7 @@ runtime_classpath_2_13 = [
5042
"@play_routes_compiler_cli_2_13//:org_scala_lang_scala_library",
5143
]
5244

53-
configure_zinc_scala(
45+
register_zinc_toolchain(
5446
name = "zinc_2_13",
5547
compiler_bridge = "@play_routes_compiler_cli_2_13//:org_scala_sbt_compiler_bridge_2_13",
5648
compiler_classpath = compiler_classpath_2_13,

test/play-routes-compiler-test.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def generate_play_routes_test_targets(scala_version):
55
# For example 2.13 -> 2-13 or 2_13
66
scala_version_dash = scala_version.replace(".", "-")
77
scala_version_underscore = scala_version.replace(".", "_")
8-
scala = "//scala:zinc_{}".format(scala_version_underscore)
8+
scala = "zinc_{}".format(scala_version_underscore)
99

1010
if scala_version == "3":
1111
play_routes_toolchain_name = "play-routes-3"
@@ -104,7 +104,7 @@ def generate_play_routes_test_targets(scala_version):
104104
"@play_routes_test_{}//:org_specs2_specs2_core_{}".format(scala_version_underscore, scala_version_underscore),
105105
"@play_routes_test_{}//:org_specs2_specs2_matcher_{}".format(scala_version_underscore, scala_version_underscore),
106106
],
107-
scala = scala,
107+
scala_toolchain_name = scala,
108108
)
109109

110110
play_routes(
@@ -143,7 +143,7 @@ def generate_play_routes_test_targets(scala_version):
143143
"@play_routes_test_{}//:org_specs2_specs2_core_{}".format(scala_version_underscore, scala_version_underscore),
144144
"@play_routes_test_{}//:org_specs2_specs2_matcher_{}".format(scala_version_underscore, scala_version_underscore),
145145
],
146-
scala = scala,
146+
scala_toolchain_name = scala,
147147
)
148148

149149
scala_library(
@@ -155,5 +155,5 @@ def generate_play_routes_test_targets(scala_version):
155155
deps = [
156156
"@play_routes_test_{}//:org_playframework_play_{}".format(scala_version_underscore, scala_version_underscore),
157157
],
158-
scala = scala,
158+
scala_toolchain_name = scala,
159159
)

workspace.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ load("//scala:version.bzl", "scala_2_13_version", "scala_3_version")
88

99
play_version = "3.0.4"
1010
zinc_version = "1.10.1"
11-
protobuf_version = "3.19.4"
11+
protobuf_version = "4.28.3"
1212
scopt_version = "4.1.0"
1313

1414
def play_routes_compiler_cli_3_repositories():

0 commit comments

Comments
 (0)