Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update grpc bazel library and rerun gazelle #148

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ exports_files(["LICENSE"])

# gazelle:prefix github.com/openconfig/gnoi
gazelle(name = "gazelle")

# gazelle:exclude **.pb.go
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
### Bazel rules for many languages to compile PROTO into gRPC libraries
http_archive(
name = "rules_proto_grpc",
sha256 = "bbe4db93499f5c9414926e46f9e35016999a4e9f6e3522482d3760dc61011070",
strip_prefix = "rules_proto_grpc-4.2.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.2.0.tar.gz"],
sha256 = "f87d885ebfd6a1bdf02b4c4ba5bf6fb333f90d54561e4d520a8413c8d1fb7beb",
strip_prefix = "rules_proto_grpc-4.5.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.5.0.tar.gz"],
)

load(
Expand Down Expand Up @@ -33,7 +33,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe

go_rules_dependencies()

go_register_toolchains(go_version = "1.18")
go_register_toolchains(go_version = "1.20")

# gazelle:repo bazel_gazelle
bazel_gazelle()
Expand Down Expand Up @@ -110,4 +110,4 @@ http_archive(
urls = [
"https://github.com/YangModels/yang/archive/2fa291d6bdb4b281d4e1b3dfa3254ffa7257d800.zip",
],
)
)
8 changes: 7 additions & 1 deletion bgp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/bgp",
proto = ":bgp_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "bgp",
embed = [":bgp_go_proto"],
importpath = "github.com/openconfig/gnoi/bgp",
)
8 changes: 7 additions & 1 deletion cert/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/cert",
proto = ":cert_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "cert",
embed = [":cert_go_proto"],
importpath = "github.com/openconfig/gnoi/cert",
)
10 changes: 8 additions & 2 deletions common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,11 @@ go_proto_library(
name = "common_go_proto",
importpath = "github.com/openconfig/gnoi/common",
proto = ":common_proto",
deps = ["//types:types_go_proto"],
)
deps = ["//types"],
)

go_library(
name = "common",
embed = [":common_go_proto"],
importpath = "github.com/openconfig/gnoi/common",
)
16 changes: 11 additions & 5 deletions containerz/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ proto_library(
name = "containerz_proto",
srcs = ["containerz.proto"],
deps = [
"@go_googleapis//google/rpc:status_proto",
"//common:common_proto",
"//types:types_proto",
"//common:common_proto"
"@go_googleapis//google/rpc:status_proto",
],
)

Expand All @@ -52,8 +52,14 @@ go_proto_library(
importpath = "github.com/openconfig/gnoi/containerz",
proto = ":containerz_proto",
deps = [
"//common",
"//types",
"@go_googleapis//google/rpc:status_go_proto",
"//types:types_go_proto",
"//common:common_go_proto"
],
)
)

go_library(
name = "containerz",
embed = [":containerz_go_proto"],
importpath = "github.com/openconfig/gnoi/containerz",
)
8 changes: 7 additions & 1 deletion debug/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/debug",
proto = ":debug_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "debug",
embed = [":debug_go_proto"],
importpath = "github.com/openconfig/gnoi/debug",
)
10 changes: 8 additions & 2 deletions diag/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/diag",
proto = ":diag_proto",
deps = ["//types:types_go_proto"],
)
deps = ["//types"],
)

go_library(
name = "diag",
embed = [":diag_go_proto"],
importpath = "github.com/openconfig/gnoi/diag",
)
8 changes: 7 additions & 1 deletion factory_reset/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/factory_reset",
proto = ":factory_reset_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "factory_reset",
embed = [":factory_reset_go_proto"],
importpath = "github.com/openconfig/gnoi/factory_reset",
)
4 changes: 2 additions & 2 deletions file/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ go_proto_library(
importpath = "github.com/openconfig/gnoi/file",
proto = ":file_proto",
deps = [
"//common:common_go_proto",
"//types:types_go_proto",
"//common",
"//types",
],
)

Expand Down
3 changes: 2 additions & 1 deletion healthz/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ proto_library(
name = "healthz_proto",
srcs = ["healthz.proto"],
deps = [
"//types:types_proto",
"//common:common_proto",
"//types:types_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:timestamp_proto",
],
Expand All @@ -55,3 +55,4 @@ cc_grpc_library(
grpc_only = True,
deps = [":healthz_cc_proto"],
)

8 changes: 7 additions & 1 deletion layer2/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/layer2",
proto = ":layer2_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "layer2",
embed = [":layer2_go_proto"],
importpath = "github.com/openconfig/gnoi/layer2",
)
8 changes: 7 additions & 1 deletion mpls/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/mpls",
proto = ":mpls_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "mpls",
embed = [":mpls_go_proto"],
importpath = "github.com/openconfig/gnoi/mpls",
)
8 changes: 7 additions & 1 deletion os/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/os",
proto = ":os_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "os",
embed = [":os_go_proto"],
importpath = "github.com/openconfig/gnoi/os",
)
8 changes: 7 additions & 1 deletion otdr/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/otdr",
proto = ":otdr_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "otdr",
embed = [":otdr_go_proto"],
importpath = "github.com/openconfig/gnoi/otdr",
)
24 changes: 24 additions & 0 deletions packet_capture/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
name = "pcap_proto",
srcs = ["packet_capture.proto"],
visibility = ["//visibility:public"],
)

go_proto_library(
name = "pcap_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/pcap",
proto = ":pcap_proto",
visibility = ["//visibility:public"],
)

go_library(
name = "pcap",
embed = [":pcap_go_proto"],
importpath = "github.com/openconfig/gnoi/pcap",
visibility = ["//visibility:public"],
)
9 changes: 8 additions & 1 deletion packet_link_qualification/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ go_proto_library(
proto = ":linkqual_proto",
visibility = ["//visibility:public"],
deps = [
"//types:types_go_proto",
"//types",
"@go_googleapis//google/rpc:status_go_proto",
],
)

go_library(
name = "linkqual",
embed = [":linkqual_go_proto"],
importpath = "github.com/openconfig/gnoi/linkqual",
visibility = ["//visibility:public"],
)
10 changes: 8 additions & 2 deletions system/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ go_proto_library(
importpath = "github.com/openconfig/gnoi/system",
protos = [":system_proto"],
deps = [
"//common:common_go_proto",
"//types:types_go_proto",
"//common",
"//types",
],
)

go_library(
name = "system",
embed = [":system_go_proto"],
importpath = "github.com/openconfig/gnoi/system",
)
8 changes: 4 additions & 4 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ go_test(
srcs = ["simple_test.go"],
embed = [":test"],
deps = [
"//bgp:bgp_go_proto",
"//common:common_go_proto",
"//system:system_go_proto",
"//types:types_go_proto",
"//bgp",
"//common",
"//system",
"//types",
"@com_github_golang_protobuf//proto:go_default_library",
],
)
8 changes: 7 additions & 1 deletion wavelength_router/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ go_proto_library(
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/openconfig/gnoi/wavelength_router",
proto = ":wavelength_router_proto",
deps = ["//types:types_go_proto"],
deps = ["//types"],
)

go_library(
name = "wavelength_router",
embed = [":wavelength_router_go_proto"],
importpath = "github.com/openconfig/gnoi/wavelength_router",
)