Skip to content

Commit

Permalink
Update to protobuf 28.3.
Browse files Browse the repository at this point in the history
Previously, there was an issue linking it on Windows, but seems that
problem fixed itself.
  • Loading branch information
hzeller committed Jan 28, 2025
1 parent 19aee2c commit f533c3a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ build --cxxopt="-Wno-unknown-warning-option" --host_cxxopt="-Wno-unknown-warning
build --cxxopt="-Wno-dangling-reference" --host_cxxopt="-Wno-dangling-reference"
# Newer bisons create an unused label.
build --cxxopt="-Wno-unused-label" --host_cxxopt="-Wno-unused-label"
# c++20 warning on protobuf 28.1
build --cxxopt="-Wno-missing-requires" --host_cxxopt="-Wno-missing-requires"

# For 3rd party code: Disable warnings entirely.
# They are not actionable and just create noise.
Expand Down
8 changes: 4 additions & 4 deletions .github/bin/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ case "$MODE" in
test-c++20|test-c++20-clang)
# Compile with C++ 20 to make sure to be compatible with the next version.
if [[ ${MODE} == "test-c++20" ]]; then
# Assignment of 1-char strings: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-restrict"
# Assignment of 1-char strings: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-restrict --cxxopt=-Wno-missing-requires"
fi
bazel test --keep_going --test_output=errors ${BAZEL_OPTS} --cxxopt=-std=c++20 -- ${CHOSEN_TARGETS}
;;

test-c++23|test-c++23-clang)
# Same; c++23
if [[ ${MODE} == "test-c++23" ]]; then
# Assignment of 1-char strings: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-restrict"
# Assignment of 1-char strings: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-restrict --cxxopt=-Wno-missing-requires"
fi
bazel test --keep_going --test_output=errors ${BAZEL_OPTS} --cxxopt=-std=c++2b -- ${CHOSEN_TARGETS}
;;
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ jobs:
uses: actions/cache@v3
with:
path: "c:/users/runneradmin/_bazel_runneradmin"
key: bazelcache_windows_${{ steps.cache_timestamp.outputs.time }}
restore-keys: bazelcache_windows_
key: bazelcache_windows_clean_${{ steps.cache_timestamp.outputs.time }}
restore-keys: bazelcache_windows_clean_

- name: Install dependencies
run: |
Expand Down
8 changes: 1 addition & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1")
bazel_dep(name = "re2", version = "2024-07-02.bcr.1")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
bazel_dep(name = "protobuf", version = "28.3")

# Parsing tools.
bazel_dep(name = "rules_m4", version = "0.2.3")
Expand All @@ -23,13 +24,6 @@ bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True)

bazel_dep(name = "abseil-cpp", version = "20240116.2")

# Last protobuf version working with windows without strange linking errors.
# This also means that we unfortunately can't use the @protobuf//bazel rules
# but have to use rules_cc and rules_proto.
# TODO: figure out how we can make proto compile beyond 24.4 on Windows.
bazel_dep(name = "protobuf", version = "24.4")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")

# To build compilation DB and run build-cleaning
bazel_dep(name = "bant", version = "0.1.13", dev_dependency = True)
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ verible_used_stdenv.mkDerivation {
name = "verible-build-environment";
buildInputs = with pkgs;
[
bazel_6
bazel_7
jdk11
git

Expand Down
5 changes: 1 addition & 4 deletions third_party/proto/kythe/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Unfortunately, can't use @protobuf//bazel:cc_proto_library.bzl
# here, as this does not seem to work with windows.
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")

package(
default_visibility = ["//visibility:public"],
Expand Down

0 comments on commit f533c3a

Please sign in to comment.