Skip to content

Commit f2c5583

Browse files
authored
Use bzlmod to manage external dependencies (#186)
* Use bzlmod to manage external dependencies Bzlmod is the new way to to manage external dependencies. The `--enable_bzlmod` flag was introduced in Bazel 6 and has been turned on by default since Bazel 7, so declaring external dependencies in `WORKSPACE` is considered leagcy behavior. The old `WORKSPACE`-system is planned to be disabled in Bazel 8 and to be removed altogether in Bazel 9. This commit migrates from `WORKSPACE` to bzlmod. References: - https://bazel.build/external/overview - https://bazel.build/external/migration - https://blog.bazel.build/2023/12/11/bazel-7-release.html#bzlmod * Remove lockfile MODULE.bazel.lock
1 parent 90d7c56 commit f2c5583

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

MODULE.bazel

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module(name = "protobuf_javascript", version = "3.21.2")
2+
3+
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
4+
bazel_dep(name = "rules_pkg", version = "0.9.1")

WORKSPACE.bzlmod

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# When Bzlmod is enabled, this file replaces the content of the original WORKSPACE and
2+
# makes sure no WORKSPACE prefix or suffix are added when Bzlmod is enabled.

0 commit comments

Comments
 (0)