-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bump abseil-cpp version to 20220623.1 #18184
Conversation
Closes bazelbuild#18167. abseil is missing stdint.h include, that broke recent compiler versions. This problem was fixed in this commit upstream: abseil/abseil-cpp@36a4b07 Note, that we cannot update to the latst abseil-cpp version, because this breaking change: "Abseil now requires at least C++14" starting from LTS release 20230125 and Bazel is passing per default -std=c++0x option, see: bazelbuild#18181
This is needed to fix this breakage in grpc in Windows: external/com_github_grpc_grpc/src/core/lib/gprpp/status_helper.cc(234): error C2338: absl::Time needs to be able to be memcopied
@meteorcloudy, @aiuto, @Wyverald Could you please review this? Also, could you upload abseil-cpp tarball 20220623.1.tar.gz to Bazel mirror? From here: Thanks. |
@@ -246,22 +246,24 @@ DIST_DEPS = { | |||
], | |||
}, | |||
"com_google_absl": { | |||
"archive": "20211102.0.tar.gz", | |||
"sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", | |||
"archive": "20220623.1.tar.gz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind also help submitting this version to https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/abseil-cpp? So that we can also upgrade abseil to the same version with Bzlmod enabled.
I've found a better (and less intrusive) approach: instead of patching vanilla abseil release 20220623.1 I bumped this line in gRpc (that is already patched in Bazel build anyway): Subject: [PATCH] Bump MSVC version check regarding compile-time initialization
to 1930
This is needed to be compatible with this change in abseil-cpp:
b8bbe92f84ffe1e249016cfe8b79efdffb7a35c1
---
src/core/lib/gprpp/status_helper.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/lib/gprpp/status_helper.cc b/src/core/lib/gprpp/status_helper.cc
index f981df8601..f6e5a211db 100644
--- a/src/core/lib/gprpp/status_helper.cc
+++ b/src/core/lib/gprpp/status_helper.cc
@@ -224,7 +224,7 @@ absl::optional<std::string> StatusGetStr(const absl::Status& status,
void StatusSetTime(absl::Status* status, StatusTimeProperty key,
absl::Time time) {
-#if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1910
+#if !defined(__clang__) && defined(_MSC_VER) && _MSC_VER < 1930
// Abseil has a workaround for MSVC 2015 which prevents absl::Time
// from being is_trivially_copyable but it's still safe to be
// memcopied. That way, the vanilla version of PTAL. |
@davido Thanks! However, |
Sure, will upload the PR to BCR project in a moment. Update: Done in bazelbuild/bazel-central-registry#589 |
Bazel depends transitvely on abseil-cpp through grpc. Root bazel's MODULE.bazel doesn't reference abseil-cpp directly. Only grpc 1.47.0 module references it, in: modules/grpc/1.47.0/MODULE.bazel bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20211102.0") I guess we would need to bump abseil in existing module, that way deviating from the upstream's dependent version? Alternative approach would be to publish yet another grpc module version, say 1.47.1, Any advice how to proceed in that case? |
I think we can just add an direct dependency on |
But we would also need to patch grpc in addition to updating abseil-cpp, like it was done in this PR to be compatible with newer absei-cpp version: https://github.com/bazelbuild/bazel/pull/18184/commits/024347e35e83a604a9c0c136b6fb0aec28b40d26m right? |
Yeah, you can use single_version_override to patch grpc with Bzlmod enabled, but in that case, it's better to use a separate patch file because we don't need other changes that's needed in WORKSPACE. |
BTW, are those patches still needed in newer version of grpc or abseil-cpp? Should we upstream the patch? |
I don't think though, because as I said in my previous comment, the gRpc code in question was re-written in this CL, that is included in official releases, starting from gRpc v1.48.0, but Bazel is currently using 1.47.0. There are no other changes between those two releases, except abseil-cpp update:
So that a different option to avoid the patching altogether is to just bump grpc from 1.47.0 to 1.48.1. |
I am working on bumping grpc version to 1.48.1 in bazel. Will upload another PR in a moment. |
Superseded by #18216. |
Closes #18167.
abseil is missing stdint.h include, that broke recent compiler versions. This problem was fixed in this commit upstream:
abseil/abseil-cpp@36a4b07
Note, that we cannot update to the latst abseil-cpp version, because this breaking change: "Abseil now requires at least C++14" starting from LTS release 20230125 and Bazel is passing per default -std=c++0x option, see:
#18181