11"""EngFlow example project"""
22
3- module (name = "engflow-example" , version = "0.0.0" )
3+ module (
4+ name = "engflow-example" ,
5+ version = "0.0.0" ,
6+ )
7+
48http_file = use_repo_rule (
5- "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_file"
9+ "@bazel_tools//tools/build_defs/repo:http.bzl" ,
10+ "http_file" ,
611)
12+
713http_archive = use_repo_rule (
8- "@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive"
14+ "@bazel_tools//tools/build_defs/repo:http.bzl" ,
15+ "http_archive" ,
916)
1017
1118# Some file dependencies
@@ -38,14 +45,22 @@ http_archive(
3845 url = "https://github.com/abseil/abseil-py/archive/refs/tags/v2.1.0.tar.gz" ,
3946)
4047
48+ register_toolchains ("@rules_scala_protoc_toolchains//:all" )
49+
4150bazel_dep (name = "bazel_skylib" , version = "1.7.1" )
42- bazel_dep (name = "engflowapis-java" , version = "2025.01.17-13.50.20 " )
43- bazel_dep (name = "platforms" , version = "0.0.10 " )
51+ bazel_dep (name = "engflowapis-java" , version = "2025.03.14-12.58.52 " )
52+ bazel_dep (name = "platforms" , version = "0.0.11 " )
4453bazel_dep (
4554 name = "protobuf" ,
46- version = "23.1 " ,
55+ version = "30.2 " ,
4756 repo_name = "com_google_protobuf" ,
4857)
58+ single_version_override (
59+ module_name = "protobuf" ,
60+ patch_strip = 1 ,
61+ patches = ["//scala:0001-protobuf-19679-rm-protoc-dep.patch" ],
62+ version = "30.2" ,
63+ )
4964
5065# Per the instructions from:
5166# https://github.com/bazelbuild/apple_support?tab=readme-ov-file#bazel-7-setup
@@ -55,41 +70,38 @@ bazel_dep(
5570# based on which is registered first.
5671bazel_dep (
5772 name = "apple_support" ,
58- version = "1.15.1 " ,
73+ version = "1.22.0 " ,
5974 repo_name = "build_bazel_apple_support" ,
6075)
61- bazel_dep (name = "rules_cc" , version = "0.0.9 " )
76+ bazel_dep (name = "rules_cc" , version = "0.1.1 " )
6277
6378# https://github.com/googleapis/googleapis/pull/855
6479# https://github.com/bazelbuild/bazel-central-registry/pull/1699
6580bazel_dep (
6681 name = "googleapis" ,
67- version = "0.0.0-20240326-1c8d509c5 " ,
82+ version = "0.0.0-20241220-5e258e33.bcr.1 " ,
6883 repo_name = "com_google_googleapis" ,
6984)
70-
71- bazel_dep (name = "rules_python" , version = "1.0.0" )
85+ bazel_dep (name = "rules_python" , version = "1.4.1" )
7286
7387PYTHON_VERSION = "3.12"
88+
7489python = use_extension ("@rules_python//python/extensions:python.bzl" , "python" )
7590python .toolchain (
7691 is_default = True ,
7792 python_version = PYTHON_VERSION ,
7893)
7994
8095pip = use_extension ("@rules_python//python/extensions:pip.bzl" , "pip" )
81-
8296pip .parse (
8397 hub_name = "pip" ,
8498 python_version = PYTHON_VERSION ,
8599 requirements_lock = "//python:requirements_lock.txt" ,
86100)
87-
88101use_repo (pip , "pip" )
89102
90- bazel_dep (name = "rules_proto" , version = "6.0.2" )
91-
92- bazel_dep (name = "rules_dotnet" , version = "0.18.1" )
103+ bazel_dep (name = "rules_proto" , version = "7.1.0" )
104+ bazel_dep (name = "rules_dotnet" , version = "0.18.2" )
93105
94106dotnet = use_extension ("@rules_dotnet//dotnet:extensions.bzl" , "dotnet" )
95107dotnet .toolchain (dotnet_version = "8.0.200" )
@@ -98,220 +110,83 @@ use_repo(dotnet, "dotnet_toolchains")
98110register_toolchains ("@dotnet_toolchains//:all" )
99111
100112# https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md
101- bazel_dep (name = "rules_go" , version = "0.48.1 " )
102- bazel_dep (name = "gazelle" , version = "0.37 .0" )
113+ bazel_dep (name = "rules_go" , version = "0.54.0 " )
114+ bazel_dep (name = "gazelle" , version = "0.43 .0" )
103115
104- GO_VERSION = "1.22.5 "
116+ GO_VERSION = "1.24.3 "
105117
106118go_sdk = use_extension ("@rules_go//go:extensions.bzl" , "go_sdk" )
107119go_sdk .download (version = GO_VERSION )
108120
109121go_deps = use_extension ("@gazelle//:extensions.bzl" , "go_deps" )
110122go_deps .from_file (go_mod = "//:go.mod" )
111-
112123use_repo (go_deps , "com_github_google_go_cmp" )
113124
114- bazel_dep (name = "rules_java" , version = "7.9.1 " )
125+ bazel_dep (name = "rules_java" , version = "8.11.0 " )
115126
116127# https://github.com/bazelbuild/rules_jvm_external/blob/master/docs/bzlmod.md
117- bazel_dep (name = "rules_jvm_external" , version = "6.2 " )
128+ bazel_dep (name = "rules_jvm_external" , version = "6.7 " )
118129bazel_dep (
119130 name = "grpc-java" ,
120- version = "1.64 .0" ,
131+ version = "1.71 .0" ,
121132 repo_name = "io_grpc_grpc_java" ,
122133)
123134
124135# Loads rules required to compile proto files
125- bazel_dep (name = "rules_proto_grpc" , version = "5.0.0-alpha2 " )
136+ bazel_dep (name = "rules_proto_grpc" , version = "5.0.1 " )
126137
127138maven = use_extension ("@rules_jvm_external//:extensions.bzl" , "maven" )
128139maven .install (
129140 artifacts = [
130- "commons-cli:commons-cli:1.8 .0" ,
131- "com.google.oauth-client:google-oauth-client:1.36 .0" ,
132- "io.netty:netty-handler:4.1.111 .Final" ,
141+ "commons-cli:commons-cli:1.9 .0" ,
142+ "com.google.oauth-client:google-oauth-client:1.39 .0" ,
143+ "io.netty:netty-handler:4.1.121 .Final" ,
133144 ],
134145
135146 # When updating versions, run `REPIN=1 bazel run @maven//:pin`
136147 fail_if_repin_required = True ,
137148 lock_file = "//:maven_install.json" ,
138-
139- strict_visibility = True ,
140149 repositories = [
141150 "https://repo.maven.apache.org/maven2/" ,
142151 ],
152+ strict_visibility = True ,
143153)
144154use_repo (maven , "maven" )
145155
146- bazel_dep (name = "rules_kotlin" , version = "1.9.6" )
147- bazel_dep (name = "rules_perl" , version = "0.2.0" )
148-
156+ bazel_dep (name = "rules_kotlin" , version = "2.1.4" )
157+ bazel_dep (name = "rules_perl" , version = "0.4.1" )
149158bazel_dep (
150159 name = "rules_swift" ,
151- version = "1.18.0" ,
152- repo_name = "build_bazel_rules_swift"
160+ version = "2.8.2" ,
153161)
154-
155- bazel_dep (name = "aspect_rules_ts" , version = "2.4.2" )
162+ bazel_dep (name = "aspect_rules_ts" , version = "3.5.3" )
156163
157164rules_ts_ext = use_extension (
158165 "@aspect_rules_ts//ts:extensions.bzl" ,
159166 "ext" ,
160167 dev_dependency = True ,
161168)
162-
163169rules_ts_ext .deps ()
164-
165170use_repo (rules_ts_ext , "npm_typescript" )
166171
167- # rules_scala is not yet bzlmod compatible:
168- #
169- # - https://github.com/bazelbuild/rules_scala/issues/1482
170- # - https://github.com/bazelbuild/bazel-central-registry/issues/522
171- #
172- # This is due to the following differences between the WORKSPACE and bzlmod
173- # models:
174- #
175- # - WORKSPACE executes http_archive, load, and any imported functions
176- # sequentially. This enables later expressions to refer to repos defined by
177- # expressions executed earlier in the WORKSPACE file. Also, WORKSPACE
178- # expressions can introduce repos to the global scope directly, without
179- # explicit import statements.
180- #
181- # - bzlmod enforces explicit repository declarations, with no expression
182- # referring to a repo defined in the same file. (The exception being arguments
183- # to register_toolchains(), and probably register_execution_platforms(), which
184- # don't appear to carry the risk of introducing circular definitions.)
185- #
186- # MODULE.bazel also doesn't allow load() calls, and load()s must appear at the
187- # beginning of an extension file, before any function definitions or calls.
188- #
189- # This enables bzlmod to build and verify an acyclic dependency graph from
190- # repo declarations alone, before and without executing any extension
191- # functions.
192- #
193- # As a result, importing the rules_scala repos into MODULE.bazel requires
194- # separate files:
195- #
196- # - MODULE.bazel loads the rules_scala archive as @io_bazel_rules_scala.
197- #
198- # - The //scala/extensions:config.bzl extension defines
199- # @io_bazel_rules_scala_config, which depends on @io_bazel_rules_scala.
200- #
201- # - The //scala/extensions:deps.bzl extension defines the repos needed by the
202- # Scala rules, which depend on @io_bazel_rules_scala and
203- # @io_bazel_rules_scala_config.
204- #
205- # The following problems occur when trying to import everything directly in
206- # MODULE.bazel, or in fewer extension files.
207- #
208- # ---
209- #
210- # In an extension, the http_archive call for rules_scala must still come first,
211- # thereby rendering later load() calls invalid. This precludes encapsulating the
212- # entire rules_scala configuration in a single extension.
213- #
214- # ---
215- #
216- # Defining @io_bazel_rules_scala_config using the following in MODULE.bazel:
217- #
218- # scala_config = use_repo_rule(
219- # "@io_bazel_rules_scala//:scala_config.bzl", "scala_config"
220- # )
221- # scala_config(name = "io_bazel_rules_scala_config")
222- #
223- # would produce:
224- #
225- # ERROR: Circular definition of repositories generated by module extensions
226- # and/or .bzl files:
227- # .-> @@_main~_repo_rules~io_bazel_rules_scala
228- # | extension '_repo_rules' defined in //:MODULE.bazel
229- # | @@_main~_repo_rules~io_bazel_rules_scala//:scala_config.bzl
230- # `-- @@_main~_repo_rules~io_bazel_rules_scala
231- # ERROR: cycles detected during target parsing
232- #
233- # ---
234- #
235- # Calling scala_config() and exporting @io_bazel_rules_scala_config from
236- # //scala:deps.bzl would also produce a circular definition error:
237- #
238- # ERROR: Circular definition of repositories generated by module extensions
239- # and/or .bzl files:
240- # .-> @@_main~scala_deps~io_bazel_rules_scala_config
241- # | extension 'scala_deps' defined in //scala:deps.bzl
242- # | //scala:deps.bzl
243- # | @@_main~_repo_rules~io_bazel_rules_scala//testing:scalatest.bzl
244- # | @@_main~_repo_rules~io_bazel_rules_scala//scalatest:scalatest.bzl
245- # | @@_main~_repo_rules~io_bazel_rules_scala//third_party/repositories:repositories.bzl
246- # | @@_main~scala_deps~io_bazel_rules_scala_config//:config.bzl
247- # `-- @@_main~scala_deps~io_bazel_rules_scala_config
248- # ERROR: cycles detected during target parsing
249- #
250- # This is because
251- # @io_bazel_rules_scala//third_party/repositories:repositories.bzl contains a
252- # load() statement depending on @io_bazel_rules_scala_config:
253- #
254- # load(
255- # "@io_bazel_rules_scala_config//:config.bzl",
256- # "SCALA_MAJOR_VERSION",
257- # "SCALA_VERSION",
258- # )
259-
260- http_archive (
261- name = "io_bazel_rules_scala" ,
262- sha256 = "e734eef95cf26c0171566bdc24d83bd82bdaf8ca7873bec6ce9b0d524bdaf05d" ,
263- strip_prefix = "rules_scala-6.6.0" ,
264- url = "https://github.com/bazelbuild/rules_scala/releases/download/v6.6.0/rules_scala-v6.6.0.tar.gz" ,
265- patches = ["//scala:rules_scala-6.6.0.patch" ],
266- patch_args = ["-p1" ],
172+ bazel_dep (name = "rules_scala" )
173+ archive_override (
174+ module_name = "rules_scala" ,
175+ sha256 = "a4700d6e6cdf13cf85e29029ec998e2ec3ba94791606ec83d2c96e3c5b0aebed" ,
176+ strip_prefix = "rules_scala-7.0.0" ,
177+ url = "https://github.com/bazelbuild/rules_scala/releases/download/v7.0.0/rules_scala-v7.0.0.tar.gz" ,
267178)
268179
269- # This constant matches the default Scala version from rules_scala for now.
270- SCALA_VERSION = "2.13.12"
271- SCALA_VERSIONS = [SCALA_VERSION ]
272-
273- scala_config = use_extension ("//scala/extensions:config.bzl" , "scala_config" )
274- scala_config .settings (
275- scala_version = SCALA_VERSION ,
276- scala_versions = SCALA_VERSIONS ,
277- )
278- use_repo (
279- scala_config ,
280- "io_bazel_rules_scala_config" ,
180+ scala_deps = use_extension (
181+ "@rules_scala//scala/extensions:deps.bzl" ,
182+ "scala_deps" ,
281183)
184+ scala_deps .scala ()
185+ scala_deps .scalatest ()
282186
283- repos = [
284- "io_bazel_rules_scala_scala_compiler" ,
285- "io_bazel_rules_scala_scala_library" ,
286- "io_bazel_rules_scala_scala_parser_combinators" ,
287- "io_bazel_rules_scala_scala_reflect" ,
288- "io_bazel_rules_scala_scala_xml" ,
289- "io_bazel_rules_scala_scalactic" ,
290- "io_bazel_rules_scala_scalatest" ,
291- "io_bazel_rules_scala_scalatest_core" ,
292- "io_bazel_rules_scala_scalatest_compatible" ,
293- "io_bazel_rules_scala_scalatest_featurespec" ,
294- "io_bazel_rules_scala_scalatest_flatspec" ,
295- "io_bazel_rules_scala_scalatest_freespec" ,
296- "io_bazel_rules_scala_scalatest_funspec" ,
297- "io_bazel_rules_scala_scalatest_funsuite" ,
298- "io_bazel_rules_scala_scalatest_matchers_core" ,
299- "io_bazel_rules_scala_scalatest_mustmatchers" ,
300- "io_bazel_rules_scala_scalatest_shouldmatchers" ,
301- ]
302-
303- toolchains = [
304- "@io_bazel_rules_scala//scala:toolchain" ,
305- "@io_bazel_rules_scala//testing:scalatest_toolchain" ,
306- ]
307-
308- scala_deps = use_extension ("//scala/extensions:deps.bzl" , "scala_deps" )
309- [
310- (
311- [use_repo (scala_deps , repo + suffix ) for repo in repos ],
312- [register_toolchains (toolchain + suffix ) for toolchain in toolchains ],
313- )
314- # The v.replace() expression mimics the logic to generate version specific
315- # repo suffixes from rules_scala.
316- for suffix in ["_" + v .replace ("." , "_" ) for v in SCALA_VERSIONS ]
317- ]
187+ scala_protoc = use_extension (
188+ "@rules_scala//scala/extensions:protoc.bzl" ,
189+ "scala_protoc" ,
190+ dev_dependency = True ,
191+ )
192+ use_repo (scala_protoc , "rules_scala_protoc_toolchains" )
0 commit comments