Skip to content

Commit

Permalink
chore: update gapic-generator-csharp to 1.3.10
Browse files Browse the repository at this point in the history
chore: update rules_gapic to 0.7.0
feat: rules `csharp_proto_library` and `csharp_grpc_library` are now sourced from `rules_gapic` (instead of `gapic-generator-csharp`).
chore: re-enabled C# build rules for BigQuery/v2 and BigQuery/Connection/v1beta1

Committer: @virost
PiperOrigin-RevId: 398018488
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 21, 2021
1 parent 6c104be commit 1dc139d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 65 deletions.
18 changes: 11 additions & 7 deletions WORKSPACE
Expand Up @@ -120,10 +120,12 @@ go_register_toolchains()

gazelle_dependencies()

_rules_gapic_version = "0.6.3"
_rules_gapic_version = "0.7.0"
_rules_gapic_sha256 = "3536ddd6d03b80733fd4dbde98d9f5be784dc0a38aba14ad2f7ac2e0209a15f8"

http_archive(
name = "rules_gapic",
sha256 = _rules_gapic_sha256,
strip_prefix = "rules_gapic-%s" % _rules_gapic_version,
urls = ["https://github.com/googleapis/rules_gapic/archive/v%s.tar.gz" % _rules_gapic_version],
)
Expand All @@ -144,10 +146,14 @@ rules_gapic_repositories()
# for most of the other languages as well, so they can be considered as the core cross-language
# dependencies.

_grpc_version = "1.39.1"
_grpc_sha256 = "4608e92cf528b625888cc874a5d21c78923322dc8c66d2c4c146134efbac69bc"

http_archive(
name = "com_github_grpc_grpc",
strip_prefix = "grpc-1.36.4",
urls = ["https://github.com/grpc/grpc/archive/v1.36.4.zip"],
sha256 = _grpc_sha256,
strip_prefix = "grpc-%s" % _grpc_version ,
urls = ["https://github.com/grpc/grpc/archive/v%s.zip" % _grpc_version],
)

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
Expand Down Expand Up @@ -324,7 +330,6 @@ gapic_generator_php_repositories()

# Required to access the C#-specific common resources config.
_gax_dotnet_version = "Google.Api.Gax-3.3.0"

_gax_dotnet_sha256 = "c4d31345a226987e8551cb81afa685c9322d3f806077d9f02011676cf00c15d9"

http_archive(
Expand All @@ -335,9 +340,8 @@ http_archive(
urls = ["https://github.com/googleapis/gax-dotnet/archive/refs/tags/%s.tar.gz" % _gax_dotnet_version],
)

_gapic_generator_csharp_version = "1.3.8"

_gapic_generator_csharp_sha256 = "a1ddbdfe296f8668aeba7e484c69ed0ae274bffd2b1f4c8a2ccb33aad12db707"
_gapic_generator_csharp_version = "1.3.10"
_gapic_generator_csharp_sha256 = "a2c62bfc66f48a6524358c45fac0471bf86a9b405d238e20845aff8bf5fddd25"

http_archive(
name = "gapic_generator_csharp",
Expand Down
48 changes: 20 additions & 28 deletions google/cloud/bigquery/connection/v1beta1/BUILD.bazel
Expand Up @@ -298,34 +298,26 @@ csharp_grpc_library(
deps = [":connection_csharp_proto"],
)

##
# [2021-09-17, virost] Disabled this pending investigation because
# the pagination in the ListConnections methods plays havoc with the
# pagination detection in the generator.
# Likely because the type is google.protobuf.UInt32Value
#
# This is for v1beta1 (unpublished for C#), v1 is unaffected
#
# csharp_gapic_library(
# name = "connection_csharp_gapic",
# srcs = [":connection_proto_with_info"],
# common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
# grpc_service_config = "bigqueryconnection_grpc_service_config.json",
# deps = [
# ":connection_csharp_grpc",
# ":connection_csharp_proto",
# ],
# )

# # Open Source Packages
# csharp_gapic_assembly_pkg(
# name = "google-cloud-bigquery-connection-v1beta1-csharp",
# deps = [
# ":connection_csharp_gapic",
# ":connection_csharp_grpc",
# ":connection_csharp_proto",
# ],
# )
csharp_gapic_library(
name = "connection_csharp_gapic",
srcs = [":connection_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "bigqueryconnection_grpc_service_config.json",
deps = [
":connection_csharp_grpc",
":connection_csharp_proto",
],
)

# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-bigquery-connection-v1beta1-csharp",
deps = [
":connection_csharp_gapic",
":connection_csharp_grpc",
":connection_csharp_proto",
],
)

##############################################################################
# C++
Expand Down
48 changes: 20 additions & 28 deletions google/cloud/bigquery/v2/BUILD.bazel
Expand Up @@ -297,34 +297,26 @@ csharp_grpc_library(
deps = [":bigquery_csharp_proto"],
)

##
# [2021-09-17, virost] Disabled this pending investigation because
# the pagination in the ListModels methods plays havoc with the
# pagination detection in the generator because the type
# is google.protobuf.UInt32Value
#
# This is published, so it will be resolved with the next generator update.
#
# csharp_gapic_library(
# name = "bigquery_csharp_gapic",
# srcs = [":bigquery_proto_with_info"],
# common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
# grpc_service_config = "bigquery_grpc_service_config.json",
# deps = [
# ":bigquery_csharp_grpc",
# ":bigquery_csharp_proto",
# ],
# )

# # Open Source Packages
# csharp_gapic_assembly_pkg(
# name = "google-cloud-bigquery-v2-csharp",
# deps = [
# ":bigquery_csharp_gapic",
# ":bigquery_csharp_grpc",
# ":bigquery_csharp_proto",
# ],
# )
csharp_gapic_library(
name = "bigquery_csharp_gapic",
srcs = [":bigquery_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "bigquery_grpc_service_config.json",
deps = [
":bigquery_csharp_grpc",
":bigquery_csharp_proto",
],
)

# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-bigquery-v2-csharp",
deps = [
":bigquery_csharp_gapic",
":bigquery_csharp_grpc",
":bigquery_csharp_proto",
],
)

##############################################################################
# C++
Expand Down
4 changes: 2 additions & 2 deletions repository_rules.bzl
Expand Up @@ -271,11 +271,11 @@ def switched_rules_by_language(
#
rules["csharp_proto_library"] = _switch(
csharp,
"@gapic_generator_csharp//rules_csharp_gapic:csharp_gapic.bzl",
"@rules_gapic//csharp:csharp_gapic.bzl",
)
rules["csharp_grpc_library"] = _switch(
csharp and grpc,
"@gapic_generator_csharp//rules_csharp_gapic:csharp_gapic.bzl",
"@rules_gapic//csharp:csharp_gapic.bzl",
)
rules["csharp_gapic_library"] = _switch(
csharp and grpc and gapic,
Expand Down

0 comments on commit 1dc139d

Please sign in to comment.