diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 0a2df3dcb80..6edeaf5804c 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -168,9 +168,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/nats-io/nats.c/archive/refs/tags/v3.3.0.tar.gz"], ), com_github_neargye_magic_enum = dict( - sha256 = "4fe6627407a656d0d73879c0346b251ccdcfb718c37bef5410ba172c7c7d5f9a", - strip_prefix = "magic_enum-0.7.0", - urls = ["https://github.com/Neargye/magic_enum/archive/refs/tags/v0.7.0.tar.gz"], + sha256 = "b403d3dad4ef542fdc3024fa37d3a6cedb4ad33c72e31b6d9bab89dcaf69edf7", + strip_prefix = "magic_enum-0.9.7", + urls = ["https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.7.tar.gz"], ), com_github_nlohmann_json = dict( sha256 = "87b5884741427220d3a33df1363ae0e8b898099fbc59f1c451113f6732891014", diff --git a/src/carnot/exec/agg_node.cc b/src/carnot/exec/agg_node.cc index b286c77badf..a8881f09825 100644 --- a/src/carnot/exec/agg_node.cc +++ b/src/carnot/exec/agg_node.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include "src/carnot/exec/expression_evaluator.h" #include "src/carnot/plan/scalar_expression.h" diff --git a/src/carnot/exec/udtf_source_node.cc b/src/carnot/exec/udtf_source_node.cc index ba1f8406c8c..1255a0b0e96 100644 --- a/src/carnot/exec/udtf_source_node.cc +++ b/src/carnot/exec/udtf_source_node.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include "src/carnot/plan/scalar_expression.h" #include "src/carnot/udf/registry.h" diff --git a/src/carnot/plan/operators.cc b/src/carnot/plan/operators.cc index bfdb43427f4..357cc318423 100644 --- a/src/carnot/plan/operators.cc +++ b/src/carnot/plan/operators.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "src/carnot/plan/scalar_expression.h" #include "src/carnot/planpb/plan.pb.h" diff --git a/src/carnot/plan/plan_fragment.cc b/src/carnot/plan/plan_fragment.cc index 91d60081347..05a589f4276 100644 --- a/src/carnot/plan/plan_fragment.cc +++ b/src/carnot/plan/plan_fragment.cc @@ -26,7 +26,7 @@ #include #include -#include +#include #include "src/carnot/dag/dag.h" #include "src/carnot/planpb/plan.pb.h" diff --git a/src/carnot/planner/parser/parser.cc b/src/carnot/planner/parser/parser.cc index 3c0a5fc83b6..c3411d3c42b 100644 --- a/src/carnot/planner/parser/parser.cc +++ b/src/carnot/planner/parser/parser.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/common/base/enum_utils.h b/src/common/base/enum_utils.h index 19ccd13f8bd..7cfd31e15cf 100644 --- a/src/common/base/enum_utils.h +++ b/src/common/base/enum_utils.h @@ -21,7 +21,7 @@ #include #include -#include +#include namespace px { diff --git a/src/common/base/error.h b/src/common/base/error.h index cec7024941c..a84938f0ec9 100644 --- a/src/common/base/error.h +++ b/src/common/base/error.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include "src/common/base/status.h" #include "src/common/base/statuspb/status.pb.h" diff --git a/src/common/base/magic_enum_test.cc b/src/common/base/magic_enum_test.cc index c6281c6bd60..0f451a8cf76 100644 --- a/src/common/base/magic_enum_test.cc +++ b/src/common/base/magic_enum_test.cc @@ -16,7 +16,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include "src/common/testing/testing.h" // The following test cases are mostly from MagicEnum docs: https://github.com/Neargye/magic_enum. diff --git a/src/common/base/utils.h b/src/common/base/utils.h index 85e25b3f5e9..9a7b889b48b 100644 --- a/src/common/base/utils.h +++ b/src/common/base/utils.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include "src/common/base/error.h" diff --git a/src/integrations/grpc_clocksync/grpc_clock_converter.h b/src/integrations/grpc_clocksync/grpc_clock_converter.h index e223599e07b..48f0f0462c3 100644 --- a/src/integrations/grpc_clocksync/grpc_clock_converter.h +++ b/src/integrations/grpc_clocksync/grpc_clock_converter.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include "src/common/clock/clock_conversion.h" #include "src/integrations/grpc_clocksync/proto/clocksync.grpc.pb.h" diff --git a/src/shared/types/typespb/wrapper/types_pb_wrapper.h b/src/shared/types/typespb/wrapper/types_pb_wrapper.h index b00b0cefdda..7aa606fc6fb 100644 --- a/src/shared/types/typespb/wrapper/types_pb_wrapper.h +++ b/src/shared/types/typespb/wrapper/types_pb_wrapper.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include "src/shared/types/typespb/types.pb.h" diff --git a/src/stirling/bpf_tools/bcc_wrapper.cc b/src/stirling/bpf_tools/bcc_wrapper.cc index 370f421836d..6505f8e2fc3 100644 --- a/src/stirling/bpf_tools/bcc_wrapper.cc +++ b/src/stirling/bpf_tools/bcc_wrapper.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/common/fs/fs_wrapper.h" diff --git a/src/stirling/bpf_tools/probe_specs/probe_specs.h b/src/stirling/bpf_tools/probe_specs/probe_specs.h index 4eb53071204..0a05851bb9a 100644 --- a/src/stirling/bpf_tools/probe_specs/probe_specs.h +++ b/src/stirling/bpf_tools/probe_specs/probe_specs.h @@ -36,7 +36,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/common/json/json.h" diff --git a/src/stirling/core/source_connector.cc b/src/stirling/core/source_connector.cc index a9566daea49..54fa5137cc3 100644 --- a/src/stirling/core/source_connector.cc +++ b/src/stirling/core/source_connector.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include "src/stirling/core/source_connector.h" diff --git a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.hpp b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.hpp index cc95a6c1b70..afb5e5f0d6a 100644 --- a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.hpp +++ b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.hpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "src/common/base/enum_utils.h" #include "src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.h" diff --git a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/go_grpc_types.hpp b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/go_grpc_types.hpp index baf5ef91a50..faa37bb1ac9 100644 --- a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/go_grpc_types.hpp +++ b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/go_grpc_types.hpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/common.hpp" diff --git a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/protocols_test.cc b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/protocols_test.cc index 003685fa512..6d344b78a1c 100644 --- a/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/protocols_test.cc +++ b/src/stirling/source_connectors/socket_tracer/bcc_bpf_intf/protocols_test.cc @@ -18,7 +18,7 @@ #include #include -#include +#include #include "src/common/base/base.h" diff --git a/src/stirling/source_connectors/socket_tracer/conn_tracker.cc b/src/stirling/source_connectors/socket_tracer/conn_tracker.cc index 35ca7f6fc38..fadc2af95dd 100644 --- a/src/stirling/source_connectors/socket_tracer/conn_tracker.cc +++ b/src/stirling/source_connectors/socket_tracer/conn_tracker.cc @@ -30,7 +30,7 @@ #include #include -#include +#include #include "src/common/base/inet_utils.h" #include "src/common/system/proc_pid_path.h" diff --git a/src/stirling/source_connectors/socket_tracer/conn_tracker.h b/src/stirling/source_connectors/socket_tracer/conn_tracker.h index 5abb9de46de..3a272e4b2c1 100644 --- a/src/stirling/source_connectors/socket_tracer/conn_tracker.h +++ b/src/stirling/source_connectors/socket_tracer/conn_tracker.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "src/common/system/proc_parser.h" #include "src/common/system/socket_info.h" diff --git a/src/stirling/source_connectors/socket_tracer/conn_tracker_test.cc b/src/stirling/source_connectors/socket_tracer/conn_tracker_test.cc index 2bc97e23ec0..66917a1c3f6 100644 --- a/src/stirling/source_connectors/socket_tracer/conn_tracker_test.cc +++ b/src/stirling/source_connectors/socket_tracer/conn_tracker_test.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include "protocols/http/types.h" #include "src/common/testing/testing.h" diff --git a/src/stirling/source_connectors/socket_tracer/metrics.cc b/src/stirling/source_connectors/socket_tracer/metrics.cc index 1c934953e71..609f437c9e3 100644 --- a/src/stirling/source_connectors/socket_tracer/metrics.cc +++ b/src/stirling/source_connectors/socket_tracer/metrics.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include "src/stirling/source_connectors/socket_tracer/metrics.h" diff --git a/src/stirling/source_connectors/socket_tracer/protocols/cql/types.h b/src/stirling/source_connectors/socket_tracer/protocols/cql/types.h index 12c4906bf74..71f28afc532 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/cql/types.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/cql/types.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include "src/stirling/source_connectors/socket_tracer/protocols/common/event_parser.h" // For FrameBase. diff --git a/src/stirling/source_connectors/socket_tracer/protocols/dns/types.h b/src/stirling/source_connectors/socket_tracer/protocols/dns/types.h index 23a99d14ed7..f4408899f80 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/dns/types.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/dns/types.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include "src/stirling/source_connectors/socket_tracer/protocols/common/event_parser.h" // For FrameBase. diff --git a/src/stirling/source_connectors/socket_tracer/protocols/kafka/common/types.h b/src/stirling/source_connectors/socket_tracer/protocols/kafka/common/types.h index b7ade9ad7d2..a7e1820d312 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/kafka/common/types.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/kafka/common/types.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/stirling/source_connectors/socket_tracer/protocols/common/event_parser.h" // For FrameBase diff --git a/src/stirling/source_connectors/socket_tracer/protocols/mux/types.h b/src/stirling/source_connectors/socket_tracer/protocols/mux/types.h index c3c7be2be6a..87c38cb178d 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/mux/types.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/mux/types.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include "src/stirling/source_connectors/socket_tracer/protocols/common/event_parser.h" #include "src/stirling/utils/utils.h" diff --git a/src/stirling/source_connectors/socket_tracer/protocols/mysql/types.h b/src/stirling/source_connectors/socket_tracer/protocols/mysql/types.h index 949b589e2b3..459b973e988 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/mysql/types.h +++ b/src/stirling/source_connectors/socket_tracer/protocols/mysql/types.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/stirling/source_connectors/socket_tracer/protocols/common/event_parser.h" // For FrameBase diff --git a/src/stirling/source_connectors/socket_tracer/protocols/pgsql/parse.cc b/src/stirling/source_connectors/socket_tracer/protocols/pgsql/parse.cc index c5ba21e7b8c..72658a6572d 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/pgsql/parse.cc +++ b/src/stirling/source_connectors/socket_tracer/protocols/pgsql/parse.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include "src/common/base/base.h" #include "src/stirling/utils/binary_decoder.h" diff --git a/src/stirling/source_connectors/socket_tracer/protocols/tls/parse.cc b/src/stirling/source_connectors/socket_tracer/protocols/tls/parse.cc index 9a2d693d09d..d435772271f 100644 --- a/src/stirling/source_connectors/socket_tracer/protocols/tls/parse.cc +++ b/src/stirling/source_connectors/socket_tracer/protocols/tls/parse.cc @@ -23,7 +23,7 @@ #include #include -#include +#include #include "src/stirling/utils/binary_decoder.h" diff --git a/src/stirling/source_connectors/socket_tracer/socket_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/socket_trace_bpf_test.cc index 8de89aa4b22..679b123cef6 100644 --- a/src/stirling/source_connectors/socket_tracer/socket_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/socket_trace_bpf_test.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include "src/common/fs/temp_file.h" #include "src/common/system/clock.h" diff --git a/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc b/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc index d3e08a5efce..d5ae9c02a91 100644 --- a/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc +++ b/src/stirling/source_connectors/socket_tracer/socket_trace_connector.cc @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "src/common/system/kernel_version.h" #include "src/common/base/base.h" diff --git a/src/stirling/source_connectors/socket_tracer/socket_trace_connector_benchmark.cc b/src/stirling/source_connectors/socket_tracer/socket_trace_connector_benchmark.cc index 184d9d67342..6f18db7f90a 100644 --- a/src/stirling/source_connectors/socket_tracer/socket_trace_connector_benchmark.cc +++ b/src/stirling/source_connectors/socket_tracer/socket_trace_connector_benchmark.cc @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "src/common/perf/memory_tracker.h" #include "src/common/perf/tcmalloc.h" @@ -91,8 +91,7 @@ px::StatusOr> GetDisplayStatCategories( absl::flat_hash_set categories; auto case_insensitive_cmp = [](char a, char b) { return tolower(a) == tolower(b); }; for (std::string_view category_str : absl::StrSplit(FLAGS_display, ",")) { - auto cast_opt = magic_enum::enum_cast( - category_str, case_insensitive_cmp); + auto cast_opt = magic_enum::enum_cast(category_str, case_insensitive_cmp); if (!cast_opt.has_value()) { return px::error::InvalidArgument("Invalid DisplayStatCategory: ", category_str); } diff --git a/src/stirling/source_connectors/stirling_error/stirling_error_connector.cc b/src/stirling/source_connectors/stirling_error/stirling_error_connector.cc index e186c53b60b..5489dac77f7 100644 --- a/src/stirling/source_connectors/stirling_error/stirling_error_connector.cc +++ b/src/stirling/source_connectors/stirling_error/stirling_error_connector.cc @@ -16,7 +16,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include "src/common/base/base.h" #include "src/common/system/proc_parser.h" diff --git a/src/stirling/testing/overloads.h b/src/stirling/testing/overloads.h index f29062e857f..e38c540d000 100644 --- a/src/stirling/testing/overloads.h +++ b/src/stirling/testing/overloads.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include "src/stirling/utils/monitor.h" #include "src/stirling/utils/tcp_stats.h" diff --git a/src/stirling/utils/enum_map.h b/src/stirling/utils/enum_map.h index 0024120f720..065693af1e2 100644 --- a/src/stirling/utils/enum_map.h +++ b/src/stirling/utils/enum_map.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include "src/common/base/base.h" @@ -30,6 +30,8 @@ namespace px { namespace stirling { namespace utils { +using magic_enum::as_common; + /** * A map-like data structure backed by vector. The key type must be enum type. * NOTE: This does not work for bool as value type, as the std::vector is specialized and is @@ -38,7 +40,7 @@ namespace utils { template class EnumMap { public: - EnumMap() : values_(magic_enum::detail::reflected_max_v) {} + EnumMap() : values_(magic_enum::detail::reflected_max>()) {} bool Set(TEnumKeyType key, TValueType value) { if (set_keys_.contains(key)) { diff --git a/src/stirling/utils/stat_counter.h b/src/stirling/utils/stat_counter.h index a574b49a9bf..d4ef2e582c0 100644 --- a/src/stirling/utils/stat_counter.h +++ b/src/stirling/utils/stat_counter.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace px { namespace stirling { diff --git a/src/vizier/funcs/md_udtfs/md_udtfs_impl.h b/src/vizier/funcs/md_udtfs/md_udtfs_impl.h index e48dd4ce790..b6af0ca1de8 100644 --- a/src/vizier/funcs/md_udtfs/md_udtfs_impl.h +++ b/src/vizier/funcs/md_udtfs/md_udtfs_impl.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "src/carnot/udf/registry.h" #include "src/carnot/udf/udf.h"