Merge pull request #2344 from hzeller/feature-20250128-testing-win-proto

Update to 28.3 protobuf
diff --git a/.bazelrc b/.bazelrc
index fb78ca5..eced6fc 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -30,6 +30,8 @@
 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.
diff --git a/.github/bin/build-and-test.sh b/.github/bin/build-and-test.sh
index 657350f..d06ed61 100755
--- a/.github/bin/build-and-test.sh
+++ b/.github/bin/build-and-test.sh
@@ -128,8 +128,8 @@
   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}
     ;;
@@ -137,8 +137,8 @@
   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}
     ;;
diff --git a/MODULE.bazel b/MODULE.bazel
index cf0fb38..adb123b 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -15,21 +15,11 @@
 bazel_dep(name = "rules_flex", version = "0.3")
 bazel_dep(name = "rules_bison", version = "0.3")
 
-# abseil-cpp and googletest can not be updated beyond the following currently,
-# as newer googletest is not compatible with bazel 6 anymore, and abseil-cpp
-# depends on it :( -- to support all active bazel's, we're stuck till EOL bazel6
-# See https://github.com/chipsalliance/verible/issues/2336
-bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True)
-
+# Last versions compatible w/ bazel6 https://github.com/chipsalliance/verible/issues/2336
 bazel_dep(name = "abseil-cpp", version = "20240116.2")
+bazel_dep(name = "protobuf", version = "28.3")
 
-# 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")
+bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True)
 
 # To build compilation DB and run build-cleaning
 bazel_dep(name = "bant", version = "0.1.13", dev_dependency = True)
diff --git a/third_party/proto/kythe/BUILD b/third_party/proto/kythe/BUILD
index a98c185..0b93b88 100644
--- a/third_party/proto/kythe/BUILD
+++ b/third_party/proto/kythe/BUILD
@@ -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"],