v2.0.5-rc (#41)
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

Reviewed-on: #41
This commit is contained in:
2025-03-26 07:02:38 -05:00
parent 24418ba03d
commit 62555e6125
135 changed files with 6792 additions and 796 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00 *cpp-httplib-0.18.1.tar.gz

BIN
support/3rd_party/cpp-httplib-0.19.0.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608 *cpp-httplib-0.19.0.tar.gz

Binary file not shown.

View File

@ -1 +0,0 @@
5a231145114589491fc52da118f9c7ef8abee885d1cb1ced99c7290e9a352f07 *curl-8.11.0.tar.gz

BIN
support/3rd_party/curl-8.12.1.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f *curl-8.12.1.tar.gz

Binary file not shown.

BIN
support/3rd_party/googletest-1.16.0.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399 *googletest-1.16.0.tar.gz

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf *openssl-3.4.0.tar.gz

BIN
support/3rd_party/openssl-3.4.1.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3 *openssl-3.4.1.tar.gz

Binary file not shown.

View File

@ -1 +0,0 @@
2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015 pugixml-1.14.tar.gz

BIN
support/3rd_party/pugixml-1.15.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a *pugixml-1.15.tar.gz

BIN
support/3rd_party/rocksdb-9.10.0.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724 *rocksdb-9.10.0.tar.gz

Binary file not shown.

View File

@ -1 +0,0 @@
9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47 *rocksdb-9.7.4.tar.gz

Binary file not shown.

View File

@ -1 +0,0 @@
9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5 *spdlog-1.15.0.tar.gz

BIN
support/3rd_party/spdlog-1.15.1.tar.gz (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc *spdlog-1.15.1.tar.gz

Binary file not shown.

View File

@ -1 +0,0 @@
77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784 sqlite-amalgamation-3460100.zip

BIN
support/3rd_party/sqlite-amalgamation-3490100.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3 *sqlite-amalgamation-3490100.zip

Binary file not shown.

View File

@ -399,6 +399,13 @@ using vlc_string_t = std::unique_ptr<char, vlc_string_deleter>;
#include "spdlog/spdlog.h"
#endif // defined(PROJECT_ENABLE_SPDLOG)
#if defined(PROJECT_ENABLE_FMT)
#include "fmt/chrono.h"
#include "fmt/core.h"
#include "fmt/format.h"
#include "fmt/ranges.h"
#endif // defined(PROJECT_ENABLE_FMT)
#if defined(PROJECT_ENABLE_STDUUID)
#include "uuid.h"
#endif // defined(PROJECT_ENABLE_STDUUID)

View File

@ -131,15 +131,6 @@ inline const spdlog_exception_handler default_exception_handler{};
inline const iostream_exception_handler default_exception_handler{};
#endif // defined(PROJECT_ENABLE_SPDLOG) && defined(PROJECT_ENABLE_V2_ERRORS)
#if defined(PROJECT_ENABLE_TESTING)
extern std::atomic<const i_exception_handler *> exception_handler;
[[nodiscard]] inline auto get_exception_handler()
-> const i_exception_handler * {
return exception_handler;
}
#endif // defined(PROJECT_ENABLE_TESTING)
#if defined(PROJECT_ENABLE_V2_ERRORS)
void handle_debug(std::string_view function_name, std::string_view msg);
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
@ -159,6 +150,15 @@ void handle_warn(std::string_view function_name, std::string_view msg);
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
void set_exception_handler(const i_exception_handler *handler);
#if defined(PROJECT_ENABLE_TESTING)
extern std::atomic<const i_exception_handler *> exception_handler;
[[nodiscard]] inline auto get_exception_handler()
-> const i_exception_handler * {
return exception_handler;
}
#endif // defined(PROJECT_ENABLE_TESTING)
} // namespace repertory::utils::error
#endif // REPERTORY_INCLUDE_UTILS_ERROR_HPP_

View File

@ -25,8 +25,8 @@
#include "utils/string.hpp"
namespace repertory::utils {
auto compare_version_strings(std::string version1,
std::string version2) -> std::int32_t {
auto compare_version_strings(std::string version1, std::string version2)
-> std::int32_t {
if (utils::string::contains(version1, "-")) {
version1 = utils::string::split(version1, '-', true)[0U];
@ -131,23 +131,46 @@ auto get_next_available_port(std::uint16_t first_port,
using ip::tcp;
boost::system::error_code error_code{};
while (first_port != 0U) {
io_context ctx{};
tcp::acceptor acceptor(ctx);
acceptor.open(tcp::v4(), error_code) ||
acceptor.bind({tcp::v4(), first_port}, error_code);
if (not error_code) {
break;
std::uint32_t check_port{first_port};
while (check_port <= 65535U) {
{
io_context ctx{};
tcp::socket socket(ctx);
socket.connect(
{
tcp::endpoint(ip::address_v4::loopback(),
static_cast<std::uint16_t>(check_port)),
},
error_code);
if (not error_code) {
++check_port;
continue;
}
}
++first_port;
{
io_context ctx{};
tcp::acceptor acceptor(ctx);
acceptor.open(tcp::v4(), error_code);
if (error_code) {
++check_port;
continue;
}
acceptor.set_option(boost::asio::ip::tcp::acceptor::linger(true, 0));
acceptor.bind({tcp::v4(), static_cast<std::uint16_t>(check_port)},
error_code);
if (error_code) {
++check_port;
continue;
}
}
available_port = static_cast<std::uint16_t>(check_port);
return true;
}
if (not error_code) {
available_port = first_port;
}
return not error_code;
return false;
}
#endif // defined(PROJECT_ENABLE_BOOST)

View File

@ -47,82 +47,4 @@ auto create_exception(std::string_view function_name,
return std::runtime_error(create_error_message(function_name, items));
}
#if defined(PROJECT_ENABLE_V2_ERRORS)
void handle_debug(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_debug(function_name, msg);
return;
}
default_exception_handler.handle_debug(function_name, msg);
}
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
void handle_error(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_error(function_name, msg);
return;
}
default_exception_handler.handle_error(function_name, msg);
}
void handle_exception(std::string_view function_name) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_exception(function_name);
return;
}
default_exception_handler.handle_exception(function_name);
}
void handle_exception(std::string_view function_name,
const std::exception &ex) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_exception(function_name, ex);
return;
}
default_exception_handler.handle_exception(function_name, ex);
}
#if defined(PROJECT_ENABLE_V2_ERRORS)
void handle_info(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_info(function_name, msg);
return;
}
default_exception_handler.handle_info(function_name, msg);
}
void handle_trace(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_trace(function_name, msg);
return;
}
default_exception_handler.handle_trace(function_name, msg);
}
void handle_warn(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_warn(function_name, msg);
return;
}
default_exception_handler.handle_warn(function_name, msg);
}
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
void set_exception_handler(const i_exception_handler *handler) {
exception_handler = handler;
}
} // namespace repertory::utils::error

View File

@ -19,12 +19,15 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "utils/config.hpp"
#include "utils/error.hpp"
#include "utils/config.hpp"
#include "utils/string.hpp"
namespace repertory::utils::error {
std::atomic<const i_exception_handler *> exception_handler{
&default_exception_handler};
&default_exception_handler,
};
#if defined(PROJECT_ENABLE_V2_ERRORS)
void iostream_exception_handler::handle_debug(std::string_view function_name,
@ -238,4 +241,83 @@ void spdlog_exception_handler::handle_warn(std::string_view function_name,
file->warn(utils::error::create_error_message(function_name, {msg}));
}
#endif // defined(PROJECT_ENABLE_SPDLOG) && defined(PROJECT_ENABLE_V2_ERRORS)
#if defined(PROJECT_ENABLE_V2_ERRORS)
void handle_debug(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_debug(function_name, msg);
return;
}
default_exception_handler.handle_debug(function_name, msg);
}
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
void handle_error(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_error(function_name, msg);
return;
}
default_exception_handler.handle_error(function_name, msg);
}
void handle_exception(std::string_view function_name) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_exception(function_name);
return;
}
default_exception_handler.handle_exception(function_name);
}
void handle_exception(std::string_view function_name,
const std::exception &ex) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_exception(function_name, ex);
return;
}
default_exception_handler.handle_exception(function_name, ex);
}
#if defined(PROJECT_ENABLE_V2_ERRORS)
void handle_info(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_info(function_name, msg);
return;
}
default_exception_handler.handle_info(function_name, msg);
}
void handle_trace(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_trace(function_name, msg);
return;
}
default_exception_handler.handle_trace(function_name, msg);
}
void handle_warn(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_warn(function_name, msg);
return;
}
default_exception_handler.handle_warn(function_name, msg);
}
#endif // defined(PROJECT_ENABLE_V2_ERRORS)
void set_exception_handler(const i_exception_handler *handler) {
exception_handler = handler;
}
} // namespace repertory::utils::error