From 1a3853404f956b2929fa13f3ebca41dc3433d5c9 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 30 Jan 2024 18:11:12 -0800 Subject: [PATCH 1/2] Update absl. This brings us VLOG No need to build our own VLOG anymore. Remove all the remnants. --- WORKSPACE | 6 +++--- common/util/BUILD | 6 ++---- common/util/init_command_line.cc | 5 +---- common/util/logging.cc | 18 ------------------ common/util/logging.h | 25 ------------------------- 5 files changed, 6 insertions(+), 54 deletions(-) delete mode 100644 common/util/logging.cc diff --git a/WORKSPACE b/WORKSPACE index 4d362a8bf..8c5de9304 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -44,9 +44,9 @@ http_archive( patches = [ "//bazel:absl.patch", ], - sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", - strip_prefix = "abseil-cpp-20230802.1", - urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz"], + sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440", + strip_prefix = "abseil-cpp-20240116.0", + urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.0.tar.gz"], ) http_archive( diff --git a/common/util/BUILD b/common/util/BUILD index 9a2c3c0bd..230d9935b 100644 --- a/common/util/BUILD +++ b/common/util/BUILD @@ -102,7 +102,6 @@ cc_library( hdrs = ["init_command_line.h"], deps = [ # these deps are needed by init_command_line.cc: - ":logging", # buildcleaner: keep ":build-version", # buildcleaner: keep "@com_google_absl//absl/debugging:failure_signal_handler", # buildcleaner: keep "@com_google_absl//absl/debugging:symbolize", # buildcleaner: keep @@ -110,9 +109,9 @@ cc_library( "@com_google_absl//absl/flags:flag", # buildcleaner: keep "@com_google_absl//absl/flags:parse", # buildcleaner: keep "@com_google_absl//absl/flags:usage", # buildcleaner: keep - "@com_google_absl//absl/log:globals", # buildcleaner: keep + "@com_google_absl//absl/log:globals", "@com_google_absl//absl/log:initialize", # buildcleaner: keep - "@com_google_absl//absl/strings", # buildcleaner: keep + "@com_google_absl//absl/strings", "@com_google_absl//absl/time", # buildcleaner: keep ], ) @@ -153,7 +152,6 @@ cc_library( # this common/util:logging target. cc_library( name = "logging", - srcs = ["logging.cc"], hdrs = ["logging.h"], deps = [ "@com_google_absl//absl/log", diff --git a/common/util/init_command_line.cc b/common/util/init_command_line.cc index b6336a138..6bb46220a 100644 --- a/common/util/init_command_line.cc +++ b/common/util/init_command_line.cc @@ -30,7 +30,6 @@ #include "absl/strings/numbers.h" #include "absl/time/time.h" #include "common/util/generated_verible_build_version.h" -#include "common/util/logging.h" namespace verible { @@ -78,9 +77,7 @@ void SetLoggingLevelsFromEnvironment() { const char *const vlog_level_env = getenv("VERIBLE_VLOG_DETAIL"); int vlog_level = 0; if (vlog_level_env && absl::SimpleAtoi(vlog_level_env, &vlog_level)) { - VERIBLE_INTERNAL_SET_VLOGLEVEL(vlog_level); - } else { - VERIBLE_INTERNAL_SET_VLOGLEVEL(0); + absl::SetGlobalVLogLevel(vlog_level); } } diff --git a/common/util/logging.cc b/common/util/logging.cc deleted file mode 100644 index 5afe35228..000000000 --- a/common/util/logging.cc +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017-2020 The Verible Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace verible { -// Used as 'extern' reference in logging.h. Set in init_command_line.cc -int global_vlog_level_ = 0; -} // namespace verible diff --git a/common/util/logging.h b/common/util/logging.h index 69ba19d53..45b74dbba 100644 --- a/common/util/logging.h +++ b/common/util/logging.h @@ -28,31 +28,6 @@ #include "absl/log/die_if_null.h" #include "absl/log/log.h" -// The VLOG level is set from the VERILOG_VLOG_DETAIL environment variable in -// InitCommandLine(), which calls the VERIBLE_INTERNAL_SET_VLOGLEVEL() macro. -#if defined(VLOG) && defined(ABSL_VLOG_IS_ON) -// If there is an ABSL implementation of VLOG, use that. -#define VERIBLE_INTERNAL_SET_VLOGLEVEL(level) absl::SetGlobalVLogLevel(level) -#else -// ... otherwise provide a minimal local implementation. -namespace verible { -// Used in the VLOG macro to check logging condition. -extern int global_vlog_level_; -} // namespace verible - -#define VERIBLE_INTERNAL_SET_VLOGLEVEL(level) \ - verible::global_vlog_level_ = level - -#define VLOG_IS_ON(x) (::verible::global_vlog_level_ >= (x)) -#define VLOG(x) LOG_IF(INFO, VLOG_IS_ON(x)) - -#ifdef NDEBUG -#define DVLOG(x) LOG_IF(INFO, false) -#else -#define DVLOG(x) VLOG(x) -#endif // NDEBUG -#endif // VLOG - #define CHECK_NOTNULL(p) (void)ABSL_DIE_IF_NULL(p) #endif // VERIBLE_COMMON_UTIL_LOGGING_H_ From 97099e80db8bd5d0c738e225c36ae89afbfa43a4 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 30 Jan 2024 20:19:25 -0800 Subject: [PATCH 2/2] Update protobuf to v25.2 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 8c5de9304..c6381708b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -139,10 +139,10 @@ bison_register_toolchains() http_archive( name = "com_google_protobuf", - sha256 = "9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42", - strip_prefix = "protobuf-25.1", + sha256 = "8ff511a64fc46ee792d3fe49a5a1bcad6f7dc50dfbba5a28b0e5b979c17f9871", + strip_prefix = "protobuf-25.2", urls = [ - "https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz", + "https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protobuf-25.2.tar.gz", ], )