Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove vendored boost file to compile with boost 1.87. #471

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions libs/client-sdk/src/flag_manager/flag_store.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <boost/json/system_error.hpp>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import was not used, and has been removed.

#include "flag_store.hpp"

#include <launchdarkly/encoding/sha_256.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libs/internal/src/events/asio_event_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void AsioEventProcessor<SDK>::ScheduleFlush() {
LD_LOG(logger_, LogLevel::kDebug) << "event-processor: scheduling flush in "
<< flush_interval_.count() << "ms";

timer_.expires_from_now(flush_interval_);
timer_.expires_after(flush_interval_);
timer_.async_wait([this](boost::system::error_code ec) {
if (ec) {
LD_LOG(logger_, LogLevel::kDebug)
Expand Down
2 changes: 1 addition & 1 deletion libs/internal/src/events/request_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

namespace launchdarkly::events::detail {

RequestWorker::RequestWorker(boost::asio::any_io_executor io,

Check warning on line 6 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:6:59 [performance-unnecessary-value-param]

the parameter 'io' is copied for each invocation but only used as a const reference; consider making it a const reference
std::chrono::milliseconds retry_after,
std::size_t id,
std::optional<std::locale> date_header_locale,
config::shared::built::TlsOptions tls_options,

Check warning on line 10 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:10:64 [performance-unnecessary-value-param]

the parameter 'tls_options' is copied for each invocation but only used as a const reference; consider making it a const reference
Logger& logger)
: timer_(std::move(io)),

Check warning on line 12 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:12:14 [performance-move-const-arg]

passing result of std::move() as a const reference argument; no move will actually happen
retry_delay_(retry_after),
state_(State::Idle),
requester_(timer_.get_executor(), tls_options),
Expand Down Expand Up @@ -51,7 +51,7 @@
}

void RequestWorker::OnDeliveryAttempt(network::HttpResult const& result,
ResultCallback callback) {

Check warning on line 54 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:54:54 [performance-unnecessary-value-param]

the parameter 'callback' is copied for each invocation but only used as a const reference; consider making it a const reference
auto [next_state, action] = NextState(state_, result);

LD_LOG(logger_, LogLevel::kDebug)
Expand All @@ -63,12 +63,12 @@
case Action::Reset:
if (result.IsError()) {
LD_LOG(logger_, LogLevel::kWarn)
<< tag_ << "error posting " << batch_->Count()

Check warning on line 66 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:66:52 [bugprone-unchecked-optional-access]

unchecked access to optional value
<< " event(s) (some events were dropped): "
<< result.ErrorMessage().value_or("unknown IO error");
} else {
LD_LOG(logger_, LogLevel::kWarn)
<< tag_ << "error posting " << batch_->Count()

Check warning on line 71 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:71:52 [bugprone-unchecked-optional-access]

unchecked access to optional value
<< " event(s) (some events were dropped): "
"HTTP error "
<< result.Status();
Expand All @@ -77,10 +77,10 @@
break;
case Action::NotifyPermanentFailure:
LD_LOG(logger_, LogLevel::kWarn)
<< tag_ << "error posting " << batch_->Count()

Check warning on line 80 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:80:48 [bugprone-unchecked-optional-access]

unchecked access to optional value
<< " event(s) (giving up permanently): HTTP error "
<< result.Status();
callback(batch_->Count(), result.Status());

Check warning on line 83 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:83:22 [bugprone-unchecked-optional-access]

unchecked access to optional value
batch_.reset();
break;
case Action::ParseDateAndReset: {
Expand All @@ -93,7 +93,7 @@
if (auto server_time =
ParseDateHeader<std::chrono::system_clock>(
date->second, *date_header_locale_)) {
callback(batch_->Count(), *server_time);

Check warning on line 96 in libs/internal/src/events/request_worker.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/src/events/request_worker.cpp:96:30 [bugprone-unchecked-optional-access]

unchecked access to optional value
}
}
batch_.reset();
Expand All @@ -109,7 +109,7 @@
<< tag_ << "error posting " << batch_->Count()
<< " event(s) (will retry): HTTP error " << result.Status();
}
timer_.expires_from_now(retry_delay_);
timer_.expires_after(retry_delay_);
timer_.async_wait([this, callback](boost::system::error_code ec) {
if (ec) {
return;
Expand Down
2 changes: 1 addition & 1 deletion libs/server-sent-events/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class FoxyClient : public Client,

create_session();
create_parser();
backoff_timer_.expires_from_now(backoff_.delay());
backoff_timer_.expires_after(backoff_.delay());
backoff_timer_.async_wait(beast::bind_front_handler(
&FoxyClient::on_backoff, shared_from_this()));
}
Expand Down
Loading
Loading