Skip to content

Commit

Permalink
Migrate to Bzlmod. WORKSPACE files were deprecated in Bazel 8, and wo…
Browse files Browse the repository at this point in the history
…n't be supported in 9.

Signed-off-by: Steffen Smolka <[email protected]>
  • Loading branch information
smolkaj committed Dec 14, 2024
1 parent 9590de3 commit 09ffa30
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*~
docs/v1/build/
bazel-*
*.lock
.DS_Store
build
dist
Expand Down
1 change: 0 additions & 1 deletion bazel/example/.bazelversion

This file was deleted.

1 change: 0 additions & 1 deletion proto/.bazelversion

This file was deleted.

39 changes: 39 additions & 0 deletions proto/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module(
name = "p4runtime",
repo_name = "com_github_p4lang_p4runtime",
)


bazel_dep(name = "bazel_skylib", version = "1.7.1")

bazel_dep(
name = "googleapis",
version = "0.0.0-20240819-fe8ba054a",
repo_name = "com_google_googleapis",
)
switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
go = True,
grpc = True,
python = True,
)
use_repo(switched_rules, "com_google_googleapis_imports")

bazel_dep(name = "grpc", version = "1.68.0", repo_name = "com_github_grpc_grpc")

bazel_dep(
name = "protobuf",
version = "29.1",
repo_name = "com_google_protobuf",
)

bazel_dep(name = "rules_license", version = "1.0.0")

bazel_dep(name = "rules_proto", version = "7.0.2")

bazel_dep(
name = "rules_go",
version = "0.50.1",
repo_name = "io_bazel_rules_go",
)
5 changes: 5 additions & 0 deletions proto/WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://bazel.build/external/migration#workspace.bzlmod
#
# This file is intentionally empty. When bzlmod is enabled and this
# file exists, the contents of WORKSPACE.bazel is ignored. This prevents
# bzlmod builds from unintentionally depending on the WORKSPACE.bazel file.

0 comments on commit 09ffa30

Please sign in to comment.