Skip to content

Commit

Permalink
Fix build imports
Browse files Browse the repository at this point in the history
  • Loading branch information
marcushines committed Feb 27, 2024
1 parent 9708792 commit d35be41
Show file tree
Hide file tree
Showing 62 changed files with 6,731 additions and 9,047 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ gNOI defines a set of gRPC-based microservices for executing operational command

# Rebuild *.pb.go files
```
./compile_proto.sh
./regenerate-files.sh
````
75 changes: 24 additions & 51 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
workspace(name = "com_github_openconfig_gnoi")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

### Bazel rules for many languages to compile PROTO into gRPC libraries
Expand All @@ -8,6 +10,20 @@ http_archive(
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/4.6.0.tar.gz"],
)

http_archive(
name = "com_google_googleapis",
sha256 = "9fc03150d86501d7da35eefa989d5553bdd77a95cfe4373cdafe8eee92f6bfb1",
strip_prefix = "googleapis-870a5ed7e141b4faf70e2a0858854e9b5bb18612",
urls = ["https://github.com/googleapis/googleapis/archive/870a5ed7e141b4faf70e2a0858854e9b5bb18612.tar.gz"],
)

load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True,
go = True,
)

load(
"@rules_proto_grpc//:repositories.bzl",
"bazel_gazelle",
Expand Down Expand Up @@ -38,64 +54,20 @@ go_register_toolchains(go_version = "1.20")
# gazelle:repo bazel_gazelle
bazel_gazelle()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

go_repository(
name = "com_github_openconfig_bootz",
importpath = "github.com/openconfig/bootz",
sum = "h1:pCBi4GXcT+XM2Vud8kh0Q6uyw6oUxN1CFvrxnW+I/as=",
version = "v0.1.1",
)


go_repository(
name = "com_github_openconfig_gnmi",
build_directives = [
"gazelle:proto_import_prefix github.com/openconfig/gnmi",
],
build_file_generation = "on",
importpath = "github.com/openconfig/gnmi",
sum = "h1:tv9HygDMXnoGyWuLmNCodMV2+PK6+uT/ndAxDVzsUUQ=",
version = "v0.0.0-20220617175856-41246b1b3507",
)
load("//:gnoi_deps.bzl", "gnoi_deps")

go_repository(
name = "com_github_openconfig_gnsi",
importpath = "github.com/openconfig/gnsi",
sum = "h1:oHdSFP1CpP+mfv6IOKWefHpbW3Fy9ZOSHgPgpCb8EDU=",
version = "v1.2.4",
)

go_repository(
name = "com_github_kylelemons_godebug",
importpath = "github.com/kylelemons/godebug",
sum = "h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=",
version = "v1.1.0",
)

go_repository(
name = "com_github_openconfig_goyang",
importpath = "github.com/openconfig/goyang",
sum = "h1:Z95LskKYk6nBYOxHtmJCu3YEKlr3pJLWG1tYAaNh3yU=",
version = "v0.2.9",
)

go_repository(
name = "com_github_openconfig_ygot",
build_directives = [
"gazelle:proto_import_prefix github.com/openconfig/ygot",
],
importpath = "github.com/openconfig/ygot",
sum = "h1:EKaeFhx1WwTZGsYeqipyh1mfF8y+z2StaXZtwVnXklk=",
version = "v0.13.1",
)

gazelle_dependencies()
gnoi_deps()

load("@rules_proto_grpc//go:repositories.bzl", rules_proto_grpc_go_repos = "go_repos")

rules_proto_grpc_go_repos()

# Load gazelle_dependencies last, so that the newer version of org_golang_google_grpc is used.
# see https://github.com/rules-proto-grpc/rules_proto_grpc/issues/160
gazelle_dependencies()

### C++
load("@rules_proto_grpc//cpp:repositories.bzl", rules_proto_grpc_cpp_repos = "cpp_repos")

Expand All @@ -105,6 +77,7 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()


# open-config YANG files
http_archive(
name = "github_openconfig_yang",
Expand Down
169 changes: 118 additions & 51 deletions bgp/bgp.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions bgp/bgp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package gnoi.bgp;

import "types/types.proto";
import "github.com/openconfig/gnoi/types/types.proto";

option go_package = "github.com/openconfig/gnoi/bgp";

Expand Down
Loading

0 comments on commit d35be41

Please sign in to comment.