Skip to content

Commit 88d50b3

Browse files
authored
Merge pull request #394 from stackb/pcj/plugin-files-to-run
BCR presubmit changes
2 parents 945dc39 + e99dbed commit 88d50b3

File tree

45 files changed

+44
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+44
-241
lines changed

.bazelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ build --incompatible_disable_native_repo_rules
1818
# C++17 for protobuf compatibility
1919
build --host_cxxopt=-std=c++17
2020
build --cxxopt=-std=c++17
21+
22+
# To facilitate testing in bazelci incompatible flags
23+
# @see https://github.com/bazelbuild/bazel/pull/26906#issue-3386957462
24+
# build --incompatible_autoload_externally=@rules_python,+java_common,+JavaInfo,+JavaPluginInfo,+ProguardSpecProvider,+java_binary,+java_import,+java_library,+java_plugin,+java_test,+java_runtime,+java_toolchain,+java_package_configuration,@com_google_protobuf,@rules_shell,+@rules_android,+@rules_cc
25+
# build --incompatible_autoload_externally=@rules_shell
26+
build --incompatible_autoload_externally=

.bcr/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bcr_test_module:
22
module_path: "."
33
matrix:
4-
platform: ["debian10", "ubuntu2004", "macos"]
4+
platform: ["debian11", "ubuntu2404", "macos"]
55
bazel: [7.x, 8.x]
66
tasks:
77
run_tests:

MODULE.bazel

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ bazel_dep(name = "rules_license", version = "1.0.0")
2222
bazel_dep(name = "rules_jvm_external", version = "6.8")
2323
bazel_dep(name = "rules_java", version = "8.15.1")
2424
bazel_dep(name = "rules_go", version = "0.57.0", repo_name = "io_bazel_rules_go")
25+
bazel_dep(name = "rules_foreign_cc", version = "0.15.0") # specified to ensure more recent version than @grpc/@opencensus-cpp/@google_benchmark
2526
bazel_dep(name = "rules_cc", version = "0.2.0")
2627
bazel_dep(name = "protobuf", version = PROTOBUF_VERSION, repo_name = "com_google_protobuf")
2728
bazel_dep(name = "package_metadata", version = "0.0.5")
@@ -60,50 +61,6 @@ http_archive(
6061
urls = ["https://github.com/protocolbuffers/protobuf-javascript/archive/861c8020a5c0cba9b7cdf915dffde96a4421a1f4.tar.gz"],
6162
)
6263

63-
[
64-
http_archive(
65-
name = "prebuilt_protoc-" + asset["arch"],
66-
build_file_content = """
67-
filegroup(
68-
name = "protoc",
69-
srcs = ["bin/protoc%s"],
70-
visibility = ["//visibility:public"],
71-
)
72-
""" % asset["extension"],
73-
sha256 = asset["sha256"],
74-
urls = ["https://github.com/google/protobuf/releases/download/v{version}/protoc-{version}-{arch}.zip".format(
75-
arch = asset["arch"],
76-
version = asset["version"],
77-
)],
78-
)
79-
for asset in [
80-
{
81-
"arch": "linux-x86_64",
82-
"sha256": "7ca037bfe5e5cabd4255ccd21dd265f79eb82d3c010117994f5dc81d2140ee88",
83-
"version": PROTOBUF_VERSION,
84-
"extension": "",
85-
},
86-
{
87-
"arch": "osx-x86_64",
88-
"sha256": "b4f36b18202d54d343a66eebc9f8ae60809a2a96cc2d1b378137550bbe4cf33c",
89-
"version": PROTOBUF_VERSION,
90-
"extension": "",
91-
},
92-
{
93-
"arch": "osx-aarch_64",
94-
"sha256": "09a2c729cc821215cc0d4c564b761760961fe338c52f24b302fd7e18e7b675d1",
95-
"version": PROTOBUF_VERSION,
96-
"extension": "",
97-
},
98-
{
99-
"arch": "win64",
100-
"sha256": "89c178e9f878cb6dd561f677688e1eb2e757cb9ac84ae30b64436bac19646996",
101-
"version": PROTOBUF_VERSION,
102-
"extension": ".exe",
103-
},
104-
]
105-
]
106-
10764
http_archive(
10865
name = "com_github_grpc_grpc_node_packages_grpc_tools_src",
10966
build_file_content = """

docs/TOOLCHAINS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Toolchains
22

3-
Choose from either building protoc from source, or a prebuilt version.
3+
The standard toolchain uses `@com_google_protobuf//:protoc`:
44

55
```py
66
register_toolchains("@build_stack_rules_proto//toolchain:standard")
77
```
88

9-
```py
10-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
11-
```
9+
To define an alternative, prepare a toolchain of type
10+
`@build_stack_rules_proto//toolchain:protoc` and register that instead. See
11+
[//toolchain:BUILD.bazel](/toolchain/BUILD.bazel) for an example.

docs/commonjs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ go_sdk.download(version = "1.23.1")
8080
# Configuration: protobuf
8181
# -------------------------------------------------------------------
8282

83-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
83+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
8484

8585
~~~
8686

docs/cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ go_sdk.download(version = "1.23.1")
8282
# Configuration: protobuf
8383
# -------------------------------------------------------------------
8484

85-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
85+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
8686

8787
~~~
8888

docs/csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ go_sdk.download(version = "1.23.1")
7979
# Configuration: protobuf
8080
# -------------------------------------------------------------------
8181

82-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
82+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
8383

8484
~~~
8585

docs/go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ go_sdk.download(version = "1.23.1")
9393
# Configuration: protobuf
9494
# -------------------------------------------------------------------
9595

96-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
96+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
9797

9898
~~~
9999

docs/goembed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ go_sdk.download(version = "1.23.1")
4545
# Configuration: protobuf
4646
# -------------------------------------------------------------------
4747

48-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
48+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
4949

5050
bazel_dep(name = "protobuf", version = "32.0", repo_name = "com_google_protobuf")
5151

docs/gomerge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ go_sdk.download(version = "1.23.1")
6969
# Configuration: protobuf
7070
# -------------------------------------------------------------------
7171

72-
register_toolchains("@build_stack_rules_proto//toolchain:prebuilt")
72+
register_toolchains("@build_stack_rules_proto//toolchain:standard")
7373

7474
~~~
7575

0 commit comments

Comments
 (0)