diff --git a/.gitmodules b/.gitmodules index f433a706e..5eb798197 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,9 +14,6 @@ [submodule "components/core/submodules/log-surgeon"] path = components/core/submodules/log-surgeon url = https://github.com/y-scope/log-surgeon.git -[submodule "components/core/submodules/boost-outcome"] - path = components/core/submodules/boost-outcome - url = https://github.com/boostorg/outcome.git [submodule "components/core/submodules/simdjson"] path = components/core/submodules/simdjson url = https://github.com/simdjson/simdjson.git @@ -26,3 +23,6 @@ [submodule "tools/yscope-dev-utils"] path = tools/yscope-dev-utils url = https://github.com/y-scope/yscope-dev-utils.git +[submodule "components/core/submodules/outcome"] + path = components/core/submodules/outcome + url = https://github.com/ned14/outcome.git diff --git a/components/core/.clang-format b/components/core/.clang-format index 18195cc31..c8e66579c 100644 --- a/components/core/.clang-format +++ b/components/core/.clang-format @@ -75,7 +75,7 @@ IncludeCategories: # Library headers. Update when adding new libraries. # NOTE: clang-format retains leading white-space on a line in violation of the YAML spec. - Regex: "<(absl|antlr4|archive|boost|bsoncxx|catch2|curl|date|fmt|json|log_surgeon|mariadb\ -|mongocxx|msgpack|simdjson|spdlog|sqlite3|string_utils|yaml-cpp|zstd)" +|mongocxx|msgpack|outcome|simdjson|spdlog|sqlite3|string_utils|yaml-cpp|zstd)" Priority: 3 # C system headers - Regex: "^<.+\\.h>" diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.cpp b/components/core/src/clp/ffi/ir_stream/Serializer.cpp index 770a6a78c..5a9325553 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.cpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.cpp @@ -10,9 +10,9 @@ #include #include -#include #include #include +#include #include "../../ir/types.hpp" #include "../../time_types.hpp" @@ -235,7 +235,7 @@ auto serialize_value_array( template auto Serializer::create( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result> { +) -> OUTCOME_V2_NAMESPACE::std_result> { static_assert( (std::is_same_v || std::is_same_v) @@ -493,9 +493,9 @@ auto Serializer::serialize_val( // Explicitly declare template specializations so that we can define the template methods in this // file template auto Serializer::create( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto Serializer::create( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto Serializer::change_utc_offset(UtcOffset utc_offset ) -> void; diff --git a/components/core/src/clp/ffi/ir_stream/Serializer.hpp b/components/core/src/clp/ffi/ir_stream/Serializer.hpp index 82863bc7e..950d8481f 100644 --- a/components/core/src/clp/ffi/ir_stream/Serializer.hpp +++ b/components/core/src/clp/ffi/ir_stream/Serializer.hpp @@ -6,8 +6,8 @@ #include #include -#include #include +#include #include "../../time_types.hpp" #include "../SchemaTree.hpp" @@ -44,7 +44,7 @@ class Serializer { * - std::errc::protocol_error on failure to serialize the preamble. */ [[nodiscard]] static auto create( - ) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; + ) -> OUTCOME_V2_NAMESPACE::std_result>; // Disable copy constructor/assignment operator Serializer(Serializer const&) = delete; diff --git a/components/core/src/clp/ir/LogEventDeserializer.cpp b/components/core/src/clp/ir/LogEventDeserializer.cpp index b158a2712..9e0bf1723 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.cpp +++ b/components/core/src/clp/ir/LogEventDeserializer.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" @@ -12,7 +13,7 @@ namespace clp::ir { template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result> { +) -> OUTCOME_V2_NAMESPACE::std_result> { ffi::ir_stream::encoded_tag_t metadata_type{0}; std::vector metadata; auto ir_error_code = ffi::ir_stream::deserialize_preamble(reader, metadata_type, metadata); @@ -68,7 +69,7 @@ auto LogEventDeserializer::create(ReaderInterface& reader template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result> { +) -> OUTCOME_V2_NAMESPACE::std_result> { // Process any packets before the log event ffi::ir_stream::encoded_tag_t tag{}; while (true) { @@ -129,11 +130,11 @@ auto LogEventDeserializer::deserialize_log_event( // Explicitly declare template specializations so that we can define the template methods in this // file template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; } // namespace clp::ir diff --git a/components/core/src/clp/ir/LogEventDeserializer.hpp b/components/core/src/clp/ir/LogEventDeserializer.hpp index 5fb72579d..a8bb4dc20 100644 --- a/components/core/src/clp/ir/LogEventDeserializer.hpp +++ b/components/core/src/clp/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../time_types.hpp" @@ -35,7 +35,7 @@ class LogEventDeserializer { * or uses an unsupported version */ static auto create(ReaderInterface& reader - ) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; + ) -> OUTCOME_V2_NAMESPACE::std_result>; // Delete copy constructor and assignment LogEventDeserializer(LogEventDeserializer const&) = delete; @@ -62,7 +62,7 @@ class LogEventDeserializer { * - std::errc::protocol_error if the IR stream is corrupted */ [[nodiscard]] auto deserialize_log_event( - ) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; + ) -> OUTCOME_V2_NAMESPACE::std_result>; private: // Constructors diff --git a/components/core/src/glt/ir/LogEventDeserializer.cpp b/components/core/src/glt/ir/LogEventDeserializer.cpp index 00cd880e9..c22f22bb7 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.cpp +++ b/components/core/src/glt/ir/LogEventDeserializer.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include "../ffi/ir_stream/decoding_methods.hpp" @@ -11,7 +12,7 @@ namespace glt::ir { template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result> { +) -> OUTCOME_V2_NAMESPACE::std_result> { ffi::ir_stream::encoded_tag_t metadata_type{0}; std::vector metadata; auto ir_error_code = ffi::ir_stream::deserialize_preamble(reader, metadata_type, metadata); @@ -67,7 +68,7 @@ auto LogEventDeserializer::create(ReaderInterface& reader template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result> { +) -> OUTCOME_V2_NAMESPACE::std_result> { epoch_time_ms_t timestamp_or_timestamp_delta{}; std::string logtype; std::vector dict_vars; @@ -106,11 +107,11 @@ auto LogEventDeserializer::deserialize_log_event( // Explicitly declare template specializations so that we can define the template methods in this // file template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::create(ReaderInterface& reader -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; template auto LogEventDeserializer::deserialize_log_event( -) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; +) -> OUTCOME_V2_NAMESPACE::std_result>; } // namespace glt::ir diff --git a/components/core/src/glt/ir/LogEventDeserializer.hpp b/components/core/src/glt/ir/LogEventDeserializer.hpp index 9667f889a..4fbfb3c53 100644 --- a/components/core/src/glt/ir/LogEventDeserializer.hpp +++ b/components/core/src/glt/ir/LogEventDeserializer.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../ReaderInterface.hpp" #include "../TimestampPattern.hpp" @@ -34,7 +34,7 @@ class LogEventDeserializer { * or uses an unsupported version */ static auto create(ReaderInterface& reader - ) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; + ) -> OUTCOME_V2_NAMESPACE::std_result>; // Delete copy constructor and assignment LogEventDeserializer(LogEventDeserializer const&) = delete; @@ -59,7 +59,7 @@ class LogEventDeserializer { * - std::errc::result_out_of_range if the IR stream is corrupted */ [[nodiscard]] auto deserialize_log_event( - ) -> BOOST_OUTCOME_V2_NAMESPACE::std_result>; + ) -> OUTCOME_V2_NAMESPACE::std_result>; private: // Constructors diff --git a/components/core/submodules/boost-outcome b/components/core/submodules/boost-outcome deleted file mode 160000 index 39500a331..000000000 --- a/components/core/submodules/boost-outcome +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 39500a33117c23596673c1925479c7ff01b602f6 diff --git a/components/core/submodules/outcome b/components/core/submodules/outcome new file mode 160000 index 000000000..571f9c930 --- /dev/null +++ b/components/core/submodules/outcome @@ -0,0 +1 @@ +Subproject commit 571f9c930e672950e99d5d30f743603aaaf8014c diff --git a/components/core/tools/scripts/deps-download/boost-outcome.json b/components/core/tools/scripts/deps-download/boost-outcome.json deleted file mode 100644 index 01e89b394..000000000 --- a/components/core/tools/scripts/deps-download/boost-outcome.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "url": "https://github.com/boostorg/outcome/archive/refs/tags/boost-1.83.0.zip", - "unzip": true, - "targets": [ - { - "source": "outcome-boost-1.83.0", - "destination": "submodules/boost-outcome" - } - ] -} diff --git a/components/core/tools/scripts/deps-download/download-all.sh b/components/core/tools/scripts/deps-download/download-all.sh index ded2b2612..b552f1247 100755 --- a/components/core/tools/scripts/deps-download/download-all.sh +++ b/components/core/tools/scripts/deps-download/download-all.sh @@ -19,11 +19,11 @@ if [ -e "$project_root_dir/.git" ] ; then git submodule update --init --recursive else python3 "${script_dir}/download-dep.py" "${script_dir}/abseil-cpp.json" - python3 "${script_dir}/download-dep.py" "${script_dir}/boost-outcome.json" python3 "${script_dir}/download-dep.py" "${script_dir}/Catch2.json" python3 "${script_dir}/download-dep.py" "${script_dir}/date.json" python3 "${script_dir}/download-dep.py" "${script_dir}/json.json" python3 "${script_dir}/download-dep.py" "${script_dir}/log-surgeon.json" + python3 "${script_dir}/download-dep.py" "${script_dir}/outcome.json" python3 "${script_dir}/download-dep.py" "${script_dir}/simdjson.json" python3 "${script_dir}/download-dep.py" "${script_dir}/yaml-cpp.json" fi diff --git a/components/core/tools/scripts/deps-download/outcome.json b/components/core/tools/scripts/deps-download/outcome.json new file mode 100644 index 000000000..1a0725f4b --- /dev/null +++ b/components/core/tools/scripts/deps-download/outcome.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/ned14/outcome/archive/refs/tags/v2.2.9.zip", + "unzip": true, + "targets": [ + { + "source": "outcome-2.2.9", + "destination": "submodules/outcome" + } + ] +}