Merge pull request #2451 from hzeller/feature-20250827-compdb-on-fail

Allow to finish the compilation db, even if not all sources compile.
diff --git a/.github/bin/make-compilation-db.sh b/.github/bin/make-compilation-db.sh
index 37abec6..e35a55d 100755
--- a/.github/bin/make-compilation-db.sh
+++ b/.github/bin/make-compilation-db.sh
@@ -14,7 +14,6 @@
 # limitations under the License.
 
 set -u
-set -e
 
 # Which bazel and bant to use can be chosen by environment variables
 BAZEL=${BAZEL:-bazel}
@@ -23,13 +22,13 @@
 BAZEL_OPTS="-c opt --noshow_progress"
 # Bazel-build all targets that generate files, so that they can be
 # seen in dependency analysis.
-${BAZEL} build ${BAZEL_OPTS} $(${BANT} list-targets \
+${BAZEL} build -k ${BAZEL_OPTS} $(${BANT} list-targets \
   | awk '/genrule|cc_proto_library|genlex|genyacc/ {print $3}')
 
 # Some selected targets to trigger all dependency fetches from MODULE.bazel
 # verilog-y-final to create a header, kzip creator to trigger build of any.pb.h
 # and some test that triggers fetching nlohmann_json and gtest
-${BAZEL} build ${BAZEL_OPTS} //verible/verilog/parser:verilog-y-final \
+${BAZEL} build -k ${BAZEL_OPTS} //verible/verilog/parser:verilog-y-final \
   //verible/verilog/tools/kythe:verible-verilog-kythe-kzip-writer \
   //verible/common/lsp:json-rpc-dispatcher_test
 
diff --git a/MODULE.bazel b/MODULE.bazel
index 5d1ce6a..c050655 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -15,11 +15,6 @@
 bazel_dep(name = "rules_m4", version = "0.2.3")
 bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
 
-bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)
-
-# To build compilation DB and run build-cleaning
-bazel_dep(name = "bant", version = "0.2.0", dev_dependency = True)
-
 # Make rules_cc more compatible to compile on Posix systems: use /bin/sh
 bazel_dep(name = "rules_cc", version = "0.2.1")
 single_version_override(
@@ -27,3 +22,8 @@
     patch_strip = 1,
     patches = ["//bazel:rules_cc_466.patch"],
 )
+
+bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)
+
+# To build compilation DB and run build-cleaning
+bazel_dep(name = "bant", version = "0.2.2", dev_dependency = True)