feat: upgrade Boost and migrate io_service to io_context#49
Merged
Conversation
d8ce45a to
ee4aa5a
Compare
Build Artifacts
10 succeeded, 0 failed | View workflow run |
ee4aa5a to
b698986
Compare
Port of monero-project/monero#9628 and #9162. - Upgrade depends Boost from 1.64.0 to 1.89.0 - Remove old Boost 1.64 patches (fix_aroptions, fix_arm_arch) - Migrate boost::asio::io_service to boost::asio::io_context - Replace io_service::work with executor_work_guard - Replace strand.wrap() with boost::asio::bind_executor() - Replace strand.post()/dispatch() with boost::asio::post()/dispatch() - Replace deprecated Boost.Asio APIs (expires_from_now, reset, etc.) - Replace GET_IO_SERVICE macro with MONERO_GET_EXECUTOR - Add SSL hostname verification compatibility macro for Boost >= 1.73 - Remove Boost/ICU version pins from CI Windows and macOS builds Fixes #44
- Replace deadline_timer with steady_timer in async_blocked_mode_client - Replace resolver::query/iterator with resolver::resolve()/results_type - Replace mutable_buffers_1/const_buffers_1 with mutable_buffer/const_buffer - Replace io_context::strand with strand<any_io_executor> in socks client - Update smtp async_resolve to use new callback signature
- Replace io_context::strand with strand<any_io_executor> in connection_basic, levin_notify, and socks client - Remove -ffile-prefix-map from Darwin Boost build (unsupported by cross-compilation clang)
Rename icuin to icui18n to match the actual library name in modern ICU versions shipped by MSYS2. Boost.Locale 1.89 links against ICU and needs these libraries resolved at link time.
Revert icui18n back to icuin (correct MSYS2 name). Add mingw-w64-x86_64-icu to Windows build dependencies since Boost 1.89's locale library requires ICU dev libraries at link time.
MSYS2's boost_locale is compiled against ICU shared libraries, so its object files contain __imp_ (DLL import) references. When building statically, the linker only finds .a files but needs .dll.a import libraries to resolve these symbols. Explicitly link the .dll.a import libraries when STATIC is set on MINGW.
Add mingw-w64-x86_64-icu to MSYS2 dependencies (required by Boost.Locale). Bump minimum Boost version from 1.58 to 1.66 to reflect the modern Boost.Asio APIs now used.
b698986 to
38527d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boost::asio::io_servicetoboost::asio::io_contextacross 33 filesio_service::work,strand.wrap(),expires_from_now,address::from_string,rfc2818_verification,deadline_timer,resolver::query,mutable_buffers_1/const_buffers_1,io_context::strand, etc.) with modern equivalentsio_context::strandtoboost::asio::strand<executor_type>across connection, socks, and levin_notify codemingw-w64-x86_64-icudependency for Windows CI builds-ffile-prefix-mapflag from Darwin depends Boost buildFixes #44
Test plan