这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 523115e

Browse files
authored
bazel: fix "missing strict dependencies" build issue (#72)
Signed-off-by: Sergii Tkachenko <sergiitk@google.com>
1 parent 8bd2eac commit 523115e

37 files changed

+120
-231
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.2
1+
6.3.2

bazel/dependency_imports.bzl

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
55
load("@com_envoyproxy_protoc_gen_validate//bazel:repositories.bzl", "pgv_dependencies")
66

77
# go version for rules_go
8-
GO_VERSION = "1.16.6"
8+
GO_VERSION = "1.20.2"
99

1010
def xds_dependency_imports(go_version = GO_VERSION):
1111
protobuf_deps()
@@ -24,27 +24,71 @@ def xds_dependency_imports(go_version = GO_VERSION):
2424
},
2525
)
2626

27+
# These dependencies, like most of the Go in this repository, exist only for the API.
28+
# These repos also have transient dependencies - `build_external` allows them to use them.
29+
# TODO(phlax): remove `build_external` and pin all transients
2730
go_repository(
2831
name = "com_github_iancoleman_strcase",
2932
importpath = "github.com/iancoleman/strcase",
3033
sum = "h1:ux/56T2xqZO/3cP1I2F86qpeoYPCOzk+KF/UH/Ar+lk=",
3134
version = "v0.0.0-20180726023541-3605ed457bf7",
35+
build_external = "external",
36+
# project_url = "https://pkg.go.dev/github.com/iancoleman/strcase",
37+
# last_update = "2020-11-22"
38+
# use_category = ["api"],
39+
# source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L23-L28"
40+
)
41+
go_repository(
42+
name = "org_golang_x_net",
43+
importpath = "golang.org/x/net",
44+
sum = "h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=",
45+
version = "v0.0.0-20200226121028-0de0cce0169b",
46+
build_external = "external",
47+
# project_url = "https://pkg.go.dev/golang.org/x/net",
48+
# last_update = "2020-02-26"
49+
# use_category = ["api"],
50+
# source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L129-L134"
51+
)
52+
go_repository(
53+
name = "org_golang_x_text",
54+
importpath = "golang.org/x/text",
55+
sum = "h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=",
56+
version = "v0.3.3",
57+
build_external = "external",
58+
# project_url = "https://pkg.go.dev/golang.org/x/text",
59+
# last_update = "2021-06-16"
60+
# use_category = ["api"],
61+
# source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L148-L153"
3262
)
33-
3463
go_repository(
3564
name = "com_github_spf13_afero",
3665
importpath = "github.com/spf13/afero",
3766
sum = "h1:8q6vk3hthlpb2SouZcnBVKboxWQWMDNF38bwholZrJc=",
3867
version = "v1.3.4",
68+
build_external = "external",
69+
# project_url = "https://pkg.go.dev/github.com/spf13/afero",
70+
# last_update = "2021-03-20"
71+
# use_category = ["api"],
72+
# source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L60-L65"
3973
)
40-
4174
go_repository(
4275
name = "com_github_lyft_protoc_gen_star",
43-
importpath = "github.com/lyft/protoc-gen-star",
44-
sum = "h1:sImehRT+p7lW9n6R7MQc5hVgzWGEkDVZU4AsBQ4Isu8=",
45-
version = "v0.5.1",
76+
importpath = "github.com/lyft/protoc-gen-star/v2",
77+
sum = "h1:keaAo8hRuAT0O3DfJ/wM3rufbAjGeJ1lAtWZHDjKGB0=",
78+
version = "v2.0.1",
79+
build_external = "external",
80+
# project_url = "https://pkg.go.dev/github.com/lyft/protoc-gen-star",
81+
# last_update = "2023-01-06"
82+
# use_category = ["api"],
83+
# source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.10.1/dependencies.bzl#L35-L40"
84+
)
85+
go_repository(
86+
name = "org_golang_google_protobuf",
87+
importpath = "google.golang.org/protobuf",
88+
sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=",
89+
version = "v1.28.1",
90+
build_external = "external",
4691
)
47-
4892
go_repository(
4993
name = "org_golang_google_grpc",
5094
build_file_proto_mode = "disable",
@@ -53,6 +97,7 @@ def xds_dependency_imports(go_version = GO_VERSION):
5397
version = "v1.40.0",
5498
)
5599

100+
56101
# Old name for backward compatibility.
57102
# TODO(roth): Remove this once callers are migrated to the new name.
58103
def udpa_dependency_imports(go_version = GO_VERSION):

bazel/repository_locations.bzl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
REPOSITORY_LOCATIONS = dict(
22
bazel_gazelle = dict(
3-
sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f",
4-
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz"],
3+
sha256 = "b8b6d75de6e4bf7c41b7737b183523085f56283f6db929b86c5e7e1f09cf59c9",
4+
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.1/bazel-gazelle-v0.31.1.tar.gz"],
55
),
66
bazel_skylib = dict(
77
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
@@ -29,7 +29,10 @@ REPOSITORY_LOCATIONS = dict(
2929
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.18.0/protobuf-all-3.18.0.tar.gz"],
3030
),
3131
io_bazel_rules_go = dict(
32-
sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b",
33-
urls = ["https://github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz"],
32+
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
33+
urls = [
34+
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
35+
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
36+
],
3437
),
3538
)

go/udpa/annotations/migrate.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/annotations/security.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/annotations/sensitive.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/annotations/status.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/annotations/versioning.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/data/orca/v1/orca_load_report.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/udpa/service/orca/v1/orca.pb.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)