1
+ workspace (name = "com_github_openconfig_gnoi" )
2
+
1
3
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
2
4
3
5
### Bazel rules for many languages to compile PROTO into gRPC libraries
@@ -8,6 +10,20 @@ http_archive(
8
10
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.6.0.tar.gz" ],
9
11
)
10
12
13
+ http_archive (
14
+ name = "com_google_googleapis" ,
15
+ sha256 = "9fc03150d86501d7da35eefa989d5553bdd77a95cfe4373cdafe8eee92f6bfb1" ,
16
+ strip_prefix = "googleapis-870a5ed7e141b4faf70e2a0858854e9b5bb18612" ,
17
+ urls = ["https://github.com/googleapis/googleapis/archive/870a5ed7e141b4faf70e2a0858854e9b5bb18612.tar.gz" ],
18
+ )
19
+
20
+ load ("@com_google_googleapis//:repository_rules.bzl" , "switched_rules_by_language" )
21
+ switched_rules_by_language (
22
+ name = "com_google_googleapis_imports" ,
23
+ cc = True ,
24
+ go = True ,
25
+ )
26
+
11
27
load (
12
28
"@rules_proto_grpc//:repositories.bzl" ,
13
29
"bazel_gazelle" ,
@@ -38,64 +54,20 @@ go_register_toolchains(go_version = "1.20")
38
54
# gazelle:repo bazel_gazelle
39
55
bazel_gazelle ()
40
56
41
- load ("@bazel_gazelle//:deps.bzl" , "gazelle_dependencies" , "go_repository" )
57
+ load ("@bazel_gazelle//:deps.bzl" , "gazelle_dependencies" )
42
58
43
- go_repository (
44
- name = "com_github_openconfig_bootz" ,
45
- importpath = "github.com/openconfig/bootz" ,
46
- sum = "h1:pCBi4GXcT+XM2Vud8kh0Q6uyw6oUxN1CFvrxnW+I/as=" ,
47
- version = "v0.1.1" ,
48
- )
49
-
50
-
51
- go_repository (
52
- name = "com_github_openconfig_gnmi" ,
53
- build_directives = [
54
- "gazelle:proto_import_prefix github.com/openconfig/gnmi" ,
55
- ],
56
- build_file_generation = "on" ,
57
- importpath = "github.com/openconfig/gnmi" ,
58
- sum = "h1:tv9HygDMXnoGyWuLmNCodMV2+PK6+uT/ndAxDVzsUUQ=" ,
59
- version = "v0.0.0-20220617175856-41246b1b3507" ,
60
- )
59
+ load ("//:gnoi_deps.bzl" , "gnoi_deps" )
61
60
62
- go_repository (
63
- name = "com_github_openconfig_gnsi" ,
64
- importpath = "github.com/openconfig/gnsi" ,
65
- sum = "h1:oHdSFP1CpP+mfv6IOKWefHpbW3Fy9ZOSHgPgpCb8EDU=" ,
66
- version = "v1.2.4" ,
67
- )
68
-
69
- go_repository (
70
- name = "com_github_kylelemons_godebug" ,
71
- importpath = "github.com/kylelemons/godebug" ,
72
- sum = "h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=" ,
73
- version = "v1.1.0" ,
74
- )
75
-
76
- go_repository (
77
- name = "com_github_openconfig_goyang" ,
78
- importpath = "github.com/openconfig/goyang" ,
79
- sum = "h1:Z95LskKYk6nBYOxHtmJCu3YEKlr3pJLWG1tYAaNh3yU=" ,
80
- version = "v0.2.9" ,
81
- )
82
-
83
- go_repository (
84
- name = "com_github_openconfig_ygot" ,
85
- build_directives = [
86
- "gazelle:proto_import_prefix github.com/openconfig/ygot" ,
87
- ],
88
- importpath = "github.com/openconfig/ygot" ,
89
- sum = "h1:EKaeFhx1WwTZGsYeqipyh1mfF8y+z2StaXZtwVnXklk=" ,
90
- version = "v0.13.1" ,
91
- )
92
-
93
- gazelle_dependencies ()
61
+ gnoi_deps ()
94
62
95
63
load ("@rules_proto_grpc//go:repositories.bzl" , rules_proto_grpc_go_repos = "go_repos" )
96
64
97
65
rules_proto_grpc_go_repos ()
98
66
67
+ # Load gazelle_dependencies last, so that the newer version of org_golang_google_grpc is used.
68
+ # see https://github.com/rules-proto-grpc/rules_proto_grpc/issues/160
69
+ gazelle_dependencies ()
70
+
99
71
### C++
100
72
load ("@rules_proto_grpc//cpp:repositories.bzl" , rules_proto_grpc_cpp_repos = "cpp_repos" )
101
73
@@ -105,6 +77,7 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
105
77
106
78
grpc_deps ()
107
79
80
+
108
81
# open-config YANG files
109
82
http_archive (
110
83
name = "github_openconfig_yang" ,
0 commit comments