commit | d435c6dd6e977a5c3ea1bc726557a9321948a317 | [log] [tgz] |
---|---|---|
author | Googler <ilist@google.com> | Thu Sep 21 07:05:40 2023 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Sep 21 07:08:15 2023 -0700 |
tree | 6c1ca222151c8da6888babdf4ffb7f8fb7e7bf5b | |
parent | 80e70231b98c61f01d1c7014fe1324bfad8662fe [diff] [blame] |
Use proto_toolchain in proto_library Change --incompatible_enable_proto_toolchain_resolution flag to a loading time flag. This is partial revert of https://github.com/bazelbuild/bazel/commit/11cf1b756b77c6159fbb5c9ab480b742ea85b5b6. We need a load time flag, because toolchain type might not exist at current versions of rules repos users use. When the flag is set, proto_library defines the toolchain and doesn't use an implicit dependency at the same time. In Bazel the flag may only be flipped after all the rules_* repo are upgraded to define toolchain type and protobuf repository registers the toolchains. Issue: https://github.com/bazelbuild/rules_proto/issues/179 PiperOrigin-RevId: 567296665 Change-Id: Ib3fc27751dd14589fa403f45d2cbbad22537b9a3
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java index 69b11d5..fb71902 100644 --- a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java +++ b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
@@ -26,6 +26,9 @@ public static final String LOAD_PROTO_LIBRARY = "load('@rules_proto//proto:defs.bzl', 'proto_library')"; + public static final String PROTO_TOOLCHAIN = "@rules_proto//proto:toolchain_type"; + public static final String LOAD_PROTO_TOOLCHAIN = + "load('@rules_proto//proto:proto_toolchain.bzl', 'proto_toolchain')"; public static final String LOAD_PROTO_LANG_TOOLCHAIN = "load('@rules_proto//proto:defs.bzl', 'proto_lang_toolchain')";