Skip to content
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

chore(deps): update dependency com_google_protobuf to v27 - abandoned #2196

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ build:linux-nixpkgs --config=nixpkgs
build:macos-nixpkgs --config=nixpkgs
build:nixpkgs --host_platform=@rules_nixpkgs_core//platforms:host

# abseil c++ (a dependency of protobuf) needs a C++14 compiler, but rules_nixpkgs cc sets `-std=c++0x`
build:nixpkgs --host_cxxopt=-std=c++14

# Build and Test Filters
# ----------------------
# Note tag filters do not compose. If you wish to augment these filters on the
Expand Down
27 changes: 27 additions & 0 deletions haskell/private/com_google_protobuf-protoc-dbghlp.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl
index f667a4088..da463ca45 100644
--- a/build_defs/cpp_opts.bzl
+++ b/build_defs/cpp_opts.bzl
@@ -44,6 +44,9 @@ LINK_OPTS = select({
"-lm",
"-framework CoreFoundation",
],
+ "@platforms//os:windows": [
+ "-ldbghelp",
+ ],
"//conditions:default": [
"-lpthread",
"-lm",
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 60900d215..10c41b441 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -673,7 +673,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
#error PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED was previously defined
#endif
#if defined(__GNUC__) && defined(__clang__) && !defined(__APPLE__) && \
- !defined(_MSC_VER)
+ !defined(_MSC_VER) && !defined(_WIN32)
#define PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED
#endif

20 changes: 17 additions & 3 deletions haskell/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,25 @@ def rules_haskell_dependencies():
maybe(
http_archive,
name = "com_google_protobuf",
sha256 = "22fdaf641b31655d4b2297f9981fa5203b2866f8332d3c6333f6b0107bb320de",
strip_prefix = "protobuf-21.12",
sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-27.0",
urls = [
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v27.0.tar.gz",
],
patches = [
# see https://github.com/protocolbuffers/protobuf/issues/16844
"@rules_haskell//haskell:private/com_google_protobuf-protoc-dbghlp.diff",
],
patch_args = ["-p1"],
)
maybe(
http_archive,
name = "com_google_absl",
urls = [
"https://github.com/abseil/abseil-cpp/releases/download/20240116.0/abseil-cpp-20240116.0.tar.gz",
],
sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
strip_prefix = "abseil-cpp-20240116.0",
)

maybe(
Expand Down
Loading