-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protobuf is broken with Bazel 6 #12509
Comments
When building with Bazel 6.1.2, we got the following error message:
|
Could you include more details about what is broken? Are we talking about the Bazel 6.1.2 breakage shown above by @meteorcloudy , or is there something else also? |
@haberman I think it's a combination of both. |
Protobuf has not yet tested or advertised compatibility with Bazel 6. So it is not too surprising that there could be incompatibilities with Bazel 6. But the original bug report said "Protobuf is broken by their own changes." Is there a place where Protobuf itself is using Bazel 6? Or is it merely third parties who are assuming Bazel 6 compatibility where none has been promised?
Are you saying that 5d3d9aa is the commit that broke Bazel 6 compatibility? That would be surprising, as that commit does not touch any |
@haberman Sorry, to give a bit of context, we are from the Bazel team. Since protobuf is a pretty important dependency, we maintain a build for protobuf on Bazel CI, the CI config is here, and the pipeline is https://buildkite.com/bazel/protobuf/builds/4515. This pipeline just by default uses the latest Bazel release to build and test protobuf. However, looks like protobuf hasn't fully migrated to the latest Bazel release.
No, that commit is basically the last green protobuf commit on Bazel CI, the breaking commit should happen between (5d3d9aa, e56cf5d ] We can turn the build green by adjusting the build config file we use for protobuf on our CI, but eventually this needs to be fixed by protobuf when you adopt new Bazel version. |
@haberman BTW, what would be the minimal targets you would recommend we should specify in protobuf.yml to verify the basic functionalities of protobuf? |
Thanks for the clarifications. Based on what you wrote, it sounds like the title of this bug should be "Build is broken with Bazel 6." Would you agree? The references to Bazel 4 seem unrelated. We have compatibility tests that exercise Bazel 4, but these are not causing the problem. The problem is just that we aren't compatible with Bazel 6 yet. |
Agree, /cc @sgowroji can you please update the issue title and description to summarize the issue accurately? |
Sorry for the confusion, It's updated now. Thanks ! |
I think it depends on what you count as "basic functionalities." For C++, I would recommend trying to build |
@haberman Thanks, we mostly care about C++, so "//:protoc" sounds correct. |
The protobuf 23.0 release is already underway and we fully expect bazel 6 support to not be ready for it. Once that is out the door, we can visit doing this at a reasonable pace. |
@meteorcloudy I'm getting this failure first, when trying to build with bazel 6.1.2 on protobuf@HEAD (763d852)
If I bump rule_kotlin to the recent release: v1.7.1 in protobuf_deps.bzl: diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl
index 7e2caa330..c9a18b413 100644
--- a/protobuf_deps.bzl
+++ b/protobuf_deps.bzl
@@ -88,6 +88,6 @@ def protobuf_deps():
if not native.existing_rule("io_bazel_rules_kotlin"):
http_archive(
name = "io_bazel_rules_kotlin",
- urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.5.0-beta-4/rules_kotlin_release.tgz"],
- sha256 = "6cbd4e5768bdfae1598662e40272729ec9ece8b7bded8f0d2c81c8ff96dc139d",
+ urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.7.1/rules_kotlin_release.tgz"],
+ sha256 = "fd92a98bd8a8f0e1cdcb490b93f5acef1f1727ed992571232d33de42395ca9b3",
) I am getting another failure:
that is related to the Passing
UPDATE Sorry, my bad, I was on the wrong branch, switching to the new main branch is failing with the same issue as on Buildkite:
|
/cc @comius do you have any suggestion regarding this failure? |
Not sure what happened, protobuf is green with Bazel 6.1.2 at HEAD: https://buildkite.com/bazel/protobuf/builds/4533 |
sounds like we can close this one |
Error in building with Bazel 6.1.2. Could you please upgrade to the latest bazel version.
protobuf/.github/workflows/test_cpp.yml
Line 36 in e5679c0
Protobuf: :ubuntu: 20.04 LTS (OpenJDK 11, gcc 9.4.0), :darwin: (OpenJDK 11, Xcode)
CC : Bazel team @meteorcloudy
The text was updated successfully, but these errors were encountered: