Skip to content

Commit 2fb7507

Browse files
Google APIscopybara-github
authored andcommitted
chore: Update Bazel workspaces to support multiple concurrent C# generator versions
chore: Update Ads Bazel scripts to explicitly use the GAX-v3-targeted C# generator PiperOrigin-RevId: 453145389
1 parent 530ca55 commit 2fb7507

5 files changed

Lines changed: 27 additions & 5 deletions

File tree

WORKSPACE

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ gapic_generator_php_repositories()
343343

344344
# Required to access the C#-specific common resources config.
345345
_gax_dotnet_version = "Google.Api.Gax-3.3.0"
346-
347346
_gax_dotnet_sha256 = "c4d31345a226987e8551cb81afa685c9322d3f806077d9f02011676cf00c15d9"
348347

349348
http_archive(
@@ -354,9 +353,8 @@ http_archive(
354353
urls = ["https://github.com/googleapis/gax-dotnet/archive/refs/tags/%s.tar.gz" % _gax_dotnet_version],
355354
)
356355

357-
_gapic_generator_csharp_version = "1.3.18"
358-
359-
_gapic_generator_csharp_sha256 = "74d2c4a9e8e6dac54c329a7f4002d7e23a02972329e14f5dfb710b1d67755408"
356+
_gapic_generator_csharp_version = "1.3.19"
357+
_gapic_generator_csharp_sha256 = "0e624db75f11a4d8ca1f8cc5c619c143be312aef892f76fc94695f9723a9c1e9"
360358

361359
http_archive(
362360
name = "gapic_generator_csharp",
@@ -366,9 +364,29 @@ http_archive(
366364
)
367365

368366
load("@gapic_generator_csharp//:repositories.bzl", "gapic_generator_csharp_repositories")
369-
370367
gapic_generator_csharp_repositories()
371368

369+
370+
# Version of C# generator targeting GAX v3. This is present so that teams that
371+
# do not want to move immediately to GAX v4 when it comes out (e.g. Ads) are
372+
# able to stick with the GAX-v3-based generator.
373+
374+
_gapic_generator_csharp_gax_v3_version = "1.3.19"
375+
_gapic_generator_csharp_gax_v3_sha256 = "0e624db75f11a4d8ca1f8cc5c619c143be312aef892f76fc94695f9723a9c1e9"
376+
377+
http_archive(
378+
name = "gapic_generator_csharp_gax_v3",
379+
sha256 = _gapic_generator_csharp_gax_v3_sha256,
380+
strip_prefix = "gapic-generator-csharp-%s" % _gapic_generator_csharp_gax_v3_version,
381+
urls = ["https://github.com/googleapis/gapic-generator-csharp/archive/refs/tags/v%s.tar.gz" % _gapic_generator_csharp_gax_v3_version],
382+
repo_mapping = {
383+
"@gapic_generator_restore": "@gapic_generator_restore_gax_v3",
384+
},
385+
)
386+
387+
load("@gapic_generator_csharp_gax_v3//:repositories.bzl", gapic_generator_csharp_repositories_gax_v3 = "gapic_generator_csharp_repositories")
388+
gapic_generator_csharp_repositories_gax_v3(gapic_generator_suffix = "_gax_v3")
389+
372390
##############################################################################
373391
# Ruby
374392
##############################################################################

google/ads/googleads/v10/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ load(
146146

147147
csharp_gapic_library(
148148
name = "googleads_csharp_gapic",
149+
generator_binary = "@gapic_generator_csharp_gax_v3//rules_csharp_gapic:csharp_gapic_generator_binary",
149150
srcs = [
150151
":googleads_proto_with_info",
151152
],

google/ads/googleads/v7/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ load(
146146

147147
csharp_gapic_library(
148148
name = "googleads_csharp_gapic",
149+
generator_binary = "@gapic_generator_csharp_gax_v3//rules_csharp_gapic:csharp_gapic_generator_binary",
149150
srcs = [
150151
":googleads_proto_with_info",
151152
],

google/ads/googleads/v8/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ load(
146146

147147
csharp_gapic_library(
148148
name = "googleads_csharp_gapic",
149+
generator_binary = "@gapic_generator_csharp_gax_v3//rules_csharp_gapic:csharp_gapic_generator_binary",
149150
srcs = [
150151
":googleads_proto_with_info",
151152
],

google/ads/googleads/v9/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ load(
146146

147147
csharp_gapic_library(
148148
name = "googleads_csharp_gapic",
149+
generator_binary = "@gapic_generator_csharp_gax_v3//rules_csharp_gapic:csharp_gapic_generator_binary",
149150
srcs = [
150151
":googleads_proto_with_info",
151152
],

0 commit comments

Comments
 (0)