diff --git a/ports/asio/fix_coro_compile_error_msvc.patch b/ports/asio/fix_coro_compile_error_msvc.patch new file mode 100644 index 0000000000..bde1d1d267 --- /dev/null +++ b/ports/asio/fix_coro_compile_error_msvc.patch @@ -0,0 +1,131 @@ +diff --git a/asio/include/asio/experimental/impl/coro.hpp b/asio/include/asio/experimental/impl/coro.hpp +index a4d8d277..9f01687e 100644 +--- a/asio/include/asio/experimental/impl/coro.hpp ++++ b/asio/include/asio/experimental/impl/coro.hpp +@@ -1069,17 +1069,17 @@ struct coro::initiate_async_resume + std::true_type /* error is noexcept */, + std::true_type /* result is void */) //noexcept + { +- return [this, coro = coro_, ++ return [this, coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- assert(coro); ++ assert(coro_promise_); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + assert(ch && !ch.done()); + +- coro->awaited_from = post_coroutine(std::move(exec), std::move(h)); +- coro->reset_error(); ++ coro_promise_->awaited_from = post_coroutine(std::move(exec), std::move(h)); ++ coro_promise_->reset_error(); + ch.resume(); + }; + } +@@ -1090,18 +1090,18 @@ struct coro::initiate_async_resume + std::true_type /* error is noexcept */, + std::false_type /* result is void */) //noexcept + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- assert(coro); ++ assert(coro_promise_); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + assert(ch && !ch.done()); + +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->result_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->result_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + }; + } +@@ -1111,16 +1111,16 @@ struct coro::initiate_async_resume + std::false_type /* error is noexcept */, + std::true_type /* result is void */) + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- if (!coro) ++ if (!coro_promise_) + return asio::post(exec, + asio::append(std::move(h), + detail::coro_error::invalid())); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + if (!ch) + return asio::post(exec, + asio::append(std::move(h), +@@ -1131,9 +1131,9 @@ struct coro::initiate_async_resume + detail::coro_error::done())); + else + { +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->error_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->error_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + } + }; +@@ -1144,17 +1144,17 @@ struct coro::initiate_async_resume + std::false_type /* error is noexcept */, + std::false_type /* result is void */) + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- if (!coro) ++ if (!coro_promise_) + return asio::post(exec, + asio::append(std::move(h), + detail::coro_error::invalid(), result_type{})); + + auto ch = +- detail::coroutine_handle::from_promise(*coro); ++ detail::coroutine_handle::from_promise(*coro_promise_); + if (!ch) + return asio::post(exec, + asio::append(std::move(h), +@@ -1165,9 +1165,9 @@ struct coro::initiate_async_resume + detail::coro_error::done(), result_type{})); + else + { +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->error_, coro->result_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->error_, coro_promise_->result_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + } + }; +@@ -1203,9 +1203,9 @@ struct coro::initiate_async_resume + [h = handle(exec, std::forward(handler), + std::integral_constant{}, + std::is_void{}), +- in = std::forward(input), coro = coro_]() mutable ++ in = std::forward(input), coro_promise_ = coro_]() mutable + { +- coro->input_ = std::move(in); ++ coro_promise_->input_ = std::move(in); + std::move(h)(); + }); + } diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index bcc7244a93..1fca290e9f 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF asio-1-28-0 SHA512 0d635c40a28b6427e2cb6b9c89ab53dba7d3a237df2279148ca05fa899d6f8039a131929230e5ca1dbc7477be784e3da9a6cb68456cbf194178510621556e467 HEAD_REF master + PATCHES fix_coro_compile_error_msvc.patch #upstream PR: https://github.com/chriskohlhoff/asio/pull/1313 ) # Always use "ASIO_STANDALONE" to avoid boost dependency diff --git a/ports/asio/vcpkg.json b/ports/asio/vcpkg.json index d804b96022..3886e667b7 100644 --- a/ports/asio/vcpkg.json +++ b/ports/asio/vcpkg.json @@ -1,6 +1,7 @@ { "name": "asio", "version": "1.28.0", + "port-version": 1, "description": "Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.", "homepage": "https://github.com/chriskohlhoff/asio", "documentation": "https://think-async.com/Asio/asio-1.28.0/doc/", diff --git a/ports/boost-asio/fix_coro_compile_error_msvc.patch b/ports/boost-asio/fix_coro_compile_error_msvc.patch new file mode 100644 index 0000000000..05c14e190e --- /dev/null +++ b/ports/boost-asio/fix_coro_compile_error_msvc.patch @@ -0,0 +1,131 @@ +diff --git a/include/boost/asio/experimental/impl/coro.hpp b/include/boost/asio/experimental/impl/coro.hpp +index ec7d956e..ba219453 100644 +--- a/include/boost/asio/experimental/impl/coro.hpp ++++ b/include/boost/asio/experimental/impl/coro.hpp +@@ -1070,17 +1070,17 @@ struct coro::initiate_async_resume + std::true_type /* error is noexcept */, + std::true_type /* result is void */) //noexcept + { +- return [this, coro = coro_, ++ return [this, coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- assert(coro); ++ assert(coro_promise_); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + assert(ch && !ch.done()); + +- coro->awaited_from = post_coroutine(std::move(exec), std::move(h)); +- coro->reset_error(); ++ coro_promise_->awaited_from = post_coroutine(std::move(exec), std::move(h)); ++ coro_promise_->reset_error(); + ch.resume(); + }; + } +@@ -1091,18 +1091,18 @@ struct coro::initiate_async_resume + std::true_type /* error is noexcept */, + std::false_type /* result is void */) //noexcept + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- assert(coro); ++ assert(coro_promise_); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + assert(ch && !ch.done()); + +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->result_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->result_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + }; + } +@@ -1112,16 +1112,16 @@ struct coro::initiate_async_resume + std::false_type /* error is noexcept */, + std::true_type /* result is void */) + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- if (!coro) ++ if (!coro_promise_) + return boost::asio::post(exec, + boost::asio::append(std::move(h), + detail::coro_error::invalid())); + +- auto ch = detail::coroutine_handle::from_promise(*coro); ++ auto ch = detail::coroutine_handle::from_promise(*coro_promise_); + if (!ch) + return boost::asio::post(exec, + boost::asio::append(std::move(h), +@@ -1132,9 +1132,9 @@ struct coro::initiate_async_resume + detail::coro_error::done())); + else + { +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->error_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->error_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + } + }; +@@ -1145,17 +1145,17 @@ struct coro::initiate_async_resume + std::false_type /* error is noexcept */, + std::false_type /* result is void */) + { +- return [coro = coro_, ++ return [coro_promise_ = coro_, + h = std::forward(handler), + exec = std::move(exec)]() mutable + { +- if (!coro) ++ if (!coro_promise_) + return boost::asio::post(exec, + boost::asio::append(std::move(h), + detail::coro_error::invalid(), result_type{})); + + auto ch = +- detail::coroutine_handle::from_promise(*coro); ++ detail::coroutine_handle::from_promise(*coro_promise_); + if (!ch) + return boost::asio::post(exec, + boost::asio::append(std::move(h), +@@ -1166,9 +1166,9 @@ struct coro::initiate_async_resume + detail::coro_error::done(), result_type{})); + else + { +- coro->awaited_from = detail::post_coroutine( +- exec, std::move(h), coro->error_, coro->result_).handle; +- coro->reset_error(); ++ coro_promise_->awaited_from = detail::post_coroutine( ++ exec, std::move(h), coro_promise_->error_, coro_promise_->result_).handle; ++ coro_promise_->reset_error(); + ch.resume(); + } + }; +@@ -1204,9 +1204,9 @@ struct coro::initiate_async_resume + [h = handle(exec, std::forward(handler), + std::integral_constant{}, + std::is_void{}), +- in = std::forward(input), coro = coro_]() mutable ++ in = std::forward(input), coro_promise_ = coro_]() mutable + { +- coro->input_ = std::move(in); ++ coro_promise_->input_ = std::move(in); + std::move(h)(); + }); + } diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index 4a209cdb1f..2698ac760e 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -6,7 +6,9 @@ vcpkg_from_github( REF boost-1.82.0 SHA512 d54fd77ca7996da138b10408df1eae28bbcae0c6475467cc19837bf6f6624c38ad7f9e1eec87ceae27f516583b204fdbaeb04daad7cc28e6aeec02ab5f188731 HEAD_REF master - PATCHES windows_alloca_header.patch + PATCHES + windows_alloca_header.patch + fix_coro_compile_error_msvc.patch #upstream PR: https://github.com/chriskohlhoff/asio/pull/1313 ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-asio/vcpkg.json b/ports/boost-asio/vcpkg.json index 1564ef1d99..8d131a4be6 100644 --- a/ports/boost-asio/vcpkg.json +++ b/ports/boost-asio/vcpkg.json @@ -2,7 +2,7 @@ "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "name": "boost-asio", "version": "1.82.0", - "port-version": 2, + "port-version": 3, "description": "Boost asio module", "homepage": "https://github.com/boostorg/asio", "license": "BSL-1.0", diff --git a/versions/a-/asio.json b/versions/a-/asio.json index 74372bc53e..440a513e99 100644 --- a/versions/a-/asio.json +++ b/versions/a-/asio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "726d66784925af6062a5a8f285c76dab2469572f", + "version": "1.28.0", + "port-version": 1 + }, { "git-tree": "7dde6674d23759f187d73d08f3bd869562a41e8d", "version": "1.28.0", diff --git a/versions/b-/boost-asio.json b/versions/b-/boost-asio.json index dd9f262928..1321e4ae80 100644 --- a/versions/b-/boost-asio.json +++ b/versions/b-/boost-asio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2ae81c27afef052cdab26f3bbadb1154905cfecc", + "version": "1.82.0", + "port-version": 3 + }, { "git-tree": "12dc4325ca29b508676211dfadc95ff688a00395", "version": "1.82.0", diff --git a/versions/baseline.json b/versions/baseline.json index 97ebccf0b3..01c72fab5a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -234,7 +234,7 @@ }, "asio": { "baseline": "1.28.0", - "port-version": 0 + "port-version": 1 }, "asio-grpc": { "baseline": "2.5.1", @@ -650,7 +650,7 @@ }, "boost-asio": { "baseline": "1.82.0", - "port-version": 2 + "port-version": 3 }, "boost-assert": { "baseline": "1.82.0",