-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module( | ||
name = "googleapis", | ||
version = "0.0.0-20241220-5e258e33", | ||
repo_name = "com_google_googleapis", | ||
bazel_compatibility = [">=7.2.1"], | ||
) | ||
|
||
# Only needed for well-known protos. | ||
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") | ||
|
||
# Only needed for proto_library. | ||
bazel_dep(name = "rules_proto", version = "5.3.0-21.7") | ||
|
||
bazel_dep(name = "googleapis-rules-registry", version = "1.0.0") | ||
|
||
rules_registry = use_extension("@googleapis-rules-registry//private/extensions:rules_registry.bzl", "rules_registry") | ||
use_repo( | ||
rules_registry, | ||
"com_google_googleapis_imports", | ||
"io_bazel_rules_go", | ||
) |
1 change: 1 addition & 0 deletions
1
modules/googleapis/0.0.0-20241220-5e258e33/overlay/MODULE.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../MODULE.bazel |
30 changes: 30 additions & 0 deletions
30
modules/googleapis/0.0.0-20241220-5e258e33/overlay/extensions.bzl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
_use_languages_tag = tag_class( | ||
attrs = { | ||
"cc": attr.bool(default = False), | ||
"csharp": attr.bool(default = False), | ||
"gapic": attr.bool(default = False), | ||
"go": attr.bool(default = False), | ||
"go_test": attr.bool(default = False), | ||
"grpc": attr.bool(default = False), | ||
"java": attr.bool(default = False), | ||
"nodejs": attr.bool(default = False), | ||
"php": attr.bool(default = False), | ||
"python": attr.bool(default = False), | ||
"ruby": attr.bool(default = False), | ||
}, | ||
) | ||
|
||
def _switched_rules_impl(_ctx): | ||
fail(""" | ||
The 'switched_rules' extension is no longer supported due to problems inherent to its design. | ||
Instead, add 'bazel_dep(name = "googleapis-<lang>", version = "1.0.0")' to your MODULE.bazel file to use '<lang>_proto_library' targets in 'googleapis'. | ||
To see error messages with the exact 'bazel_dep's to add, remove the 'switched_rules' usage and build your project. | ||
The available individual modules can be found at https://registry.bazel.build/search?q=googleapis. | ||
""") | ||
|
||
switched_rules = module_extension( | ||
implementation = _switched_rules_impl, | ||
tag_classes = { | ||
"use_languages": _use_languages_tag, | ||
}, | ||
) |
5 changes: 5 additions & 0 deletions
5
modules/googleapis/0.0.0-20241220-5e258e33/overlay/tests/bcr/.bazelrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
common --java_runtime_version=remotejdk_11 | ||
|
||
# Disable warnings for external dependencies. | ||
common --per_file_copt=external/.*@-w | ||
common --host_per_file_copt=external/.*@-w |
41 changes: 41 additions & 0 deletions
41
modules/googleapis/0.0.0-20241220-5e258e33/overlay/tests/bcr/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
load(":failure_test.bzl", "php_proto_library_fails_with_message_test") | ||
|
||
alias( | ||
name = "bytestream_proto", | ||
actual = "@googleapis//google/bytestream:bytestream_proto", | ||
) | ||
|
||
alias( | ||
name = "bytestream_cc_proto", | ||
actual = "@googleapis//google/bytestream:bytestream_cc_proto", | ||
) | ||
|
||
alias( | ||
name = "bytestream_go_proto", | ||
actual = "@googleapis//google/bytestream:bytestream_go_proto", | ||
) | ||
|
||
alias( | ||
name = "bytestream_java_proto", | ||
actual = "@googleapis//google/bytestream:bytestream_java_proto", | ||
) | ||
|
||
alias( | ||
name = "date_py_proto", | ||
actual = "@googleapis//google/type:date_py_proto", | ||
) | ||
|
||
alias( | ||
name = "spanner_cc_grpc", | ||
actual = "@googleapis//google/spanner/v1:spanner_cc_grpc", | ||
) | ||
|
||
alias( | ||
name = "spanner_java_grpc", | ||
actual = "@googleapis//google/spanner/v1:spanner_java_grpc", | ||
) | ||
|
||
php_proto_library_fails_with_message_test( | ||
name = "php_proto_library_fails_with_message_test", | ||
target_under_test = "@googleapis//google/bytestream:bytestream_php_proto", | ||
) |
13 changes: 13 additions & 0 deletions
13
modules/googleapis/0.0.0-20241220-5e258e33/overlay/tests/bcr/MODULE.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
bazel_dep(name = "bazel_skylib", version = "1.7.1") | ||
bazel_dep(name = "googleapis") | ||
bazel_dep(name = "googleapis-cc", version = "1.0.0") | ||
bazel_dep(name = "googleapis-go", version = "1.0.0") | ||
bazel_dep(name = "googleapis-java", version = "1.0.0") | ||
bazel_dep(name = "googleapis-python", version = "1.0.0") | ||
bazel_dep(name = "googleapis-grpc-cc", version = "1.0.0") | ||
bazel_dep(name = "googleapis-grpc-java", version = "1.0.0") | ||
|
||
local_path_override( | ||
module_name = "googleapis", | ||
path = "../..", | ||
) |
11 changes: 11 additions & 0 deletions
11
modules/googleapis/0.0.0-20241220-5e258e33/overlay/tests/bcr/failure_test.bzl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts") | ||
|
||
def _php_proto_library_fails_with_message_test_impl(ctx): | ||
env = analysistest.begin(ctx) | ||
asserts.expect_failure(env, """php_proto_library targets in googleapis are not supported with Bzlmod. If you need them, please file an issue at https://github.com/bazelbuild/bazel-central-registry.""") | ||
return analysistest.end(env) | ||
|
||
php_proto_library_fails_with_message_test = analysistest.make( | ||
_php_proto_library_fails_with_message_test_impl, | ||
expect_failure = True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
bcr_test_module: | ||
module_path: "tests/bcr" | ||
matrix: | ||
platform: ["debian10", "macos", "ubuntu2004", "windows"] | ||
bazel: ["7.x", "8.x"] | ||
tasks: | ||
run_tests: | ||
name: "Run test module" | ||
bazel: ${{ bazel }} | ||
platform: ${{ platform }} | ||
build_targets: | ||
- "//..." | ||
test_targets: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"integrity": "sha256-ftfNAEA+XKYX5I+kRRNhXnnfyBert9Rgq1WQ6sJ0Pvk=", | ||
"strip_prefix": "googleapis-5e258e334154da04dcd0a567a61ac21518cac81b", | ||
"url": "https://github.com/googleapis/googleapis/archive/5e258e334154da04dcd0a567a61ac21518cac81b.tar.gz", | ||
"overlay": { | ||
"MODULE.bazel": "sha256-VxsBhkSSAwL1ppUguR2uGJwX1WbnMKG4fJ2+7+Ob1qU=", | ||
"extensions.bzl": "sha256-7C/04C9c7meY0eqFSdgSm6i1MTCAd5QarXTsBRJ4aN4=", | ||
"tests/bcr/.bazelrc": "sha256-hFZT+gits3VtXcUkKuh3NCEC9FgBNGuNxaOVCuOiFPk=", | ||
"tests/bcr/BUILD.bazel": "sha256-KZzDURLUNDOiMsurUHrnuWYogHPFs7W+Ar9ZrilPLuE=", | ||
"tests/bcr/MODULE.bazel": "sha256-4zmBG1uAn7W3ExjUMQChBcrJVSNCE6K8PhIs9SfKy1U=", | ||
"tests/bcr/failure_test.bzl": "sha256-pKImfWiY7m3EB1w0n4C66/LABDBwTYr/2nqxoC+gvBc=" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters