diff --git a/.gitignore b/.gitignore index 8af80faf..550867c7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *~ docs/v1/build/ bazel-* +*.lock .DS_Store build dist diff --git a/bazel/example/.bazelversion b/bazel/example/.bazelversion deleted file mode 100644 index f22d756d..00000000 --- a/bazel/example/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -6.5.0 diff --git a/proto/.bazelversion b/proto/.bazelversion deleted file mode 100644 index f22d756d..00000000 --- a/proto/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -6.5.0 diff --git a/proto/MODULE.bazel b/proto/MODULE.bazel new file mode 100644 index 00000000..99e633df --- /dev/null +++ b/proto/MODULE.bazel @@ -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", +) diff --git a/proto/WORKSPACE.bzlmod b/proto/WORKSPACE.bzlmod new file mode 100644 index 00000000..203f54c6 --- /dev/null +++ b/proto/WORKSPACE.bzlmod @@ -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.