Execution: Migrate transform_completion_signatures to avoid deprecation warnings (#7251)#7252
Conversation
…on warnings Upstream stdexec deprecated the `stdexec::transform_completion_signatures` and `stdexec::transform_completion_signatures_of` type aliases in favor of the new `exec::transform_completion_signatures` consteval function API. To retain existing semantics in HPX while suppressing deprecation warnings (especially on MSVC with modules), this patch updates the HPX re-exports in `stdexec_forward.hpp` to wrap the private but stable non-deprecated internal `__transform_completion_signatures_t` helpers instead. This also removes now-obsolete `#pragma clang diagnostic` warning suppression blocks from various sender implementations.
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull request overview
This PR updates HPX’s stdexec forwarding layer to eliminate deprecation warnings caused by upstream deprecating the stdexec::transform_completion_signatures* type-alias APIs, particularly impacting MSVC + C++20 modules builds. It preserves the existing HPX type-alias-based call sites by re-exporting equivalent functionality via non-deprecated internal stdexec helpers and removes now-unnecessary Clang warning-suppression pragmas from affected senders.
Changes:
- Re-exports
transform_completion_signaturesandtransform_completion_signatures_ofas alias templates backed bystdexec::__transform_completion_signatures*_tinternal helpers. - Removes obsolete
#pragma clang diagnosticsuppression blocks from sender completion-signature customizations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/core/execution_base/include/hpx/execution_base/stdexec_forward.hpp | Replaces deprecated stdexec type-alias re-exports with non-deprecated internal helper-backed alias templates. |
| libs/core/execution/include/hpx/execution/algorithms/bulk.hpp | Removes Clang deprecation-warning suppression around completion signature computation. |
| libs/core/execution/include/hpx/execution/algorithms/when_all_vector.hpp | Removes Clang deprecation-warning suppression around completion signature computation. |
| libs/core/executors/include/hpx/executors/thread_pool_scheduler_bulk.hpp | Removes Clang deprecation-warning suppression around completion signature computation. |
|
The test for |
Fixed the async_mpi test failures. I updated the transform_mpi receiver to use the modern receiver_concept tag required by stdexec and re-enabled the unit test by removing an old guard that was skipping it. |
This test is still failing. Also, gcc12 fails utterly as well. |
stdexec::sync_wait drives its own run_loop and never yields back to the HPX thread pool, so the MPI background poller registered via register_polling() can never fire completion callbacks, causing a deadlock on all platforms. Replace all tt::sync_wait(sender) calls with ex::make_future(sender).get() which converts the sender to an hpx::future and yields the calling HPX thread via hpx::util::yield_while, allowing the background MPI poller to drain the completion queue. Fixes: tests.unit.modules.async_mpi.algorithm_transform_mpi
|
@arpittkhandelwal FWIW the gcc errors are caused by timeouts in the CIs that may get fixed by some of the other PRs that are open. For this reason, I'd like to get #7257 finalized first before going ahead with more s&r merges. |
|
@arpittkhandelwal This is a temporary workaround only, a full fix is available as part of #7257. I'm closing this as duplicate. Thanks for contributing. |
Fixes #7251
Description
Upstream
stdexecrecently deprecated thestdexec::transform_completion_signaturesandstdexec::transform_completion_signatures_oftemplate type aliases in favor of the newexec::transform_completion_signaturesconstevalfunction API.This was causing heavy deprecation warnings to surface, particularly when compiling with MSVC and
HPX_WITH_CXX_MODULES=ON, where warnings leak across module boundaries more aggressively.To retain existing semantics in HPX while completely suppressing these deprecation warnings across all compilers, this patch updates the HPX re-exports in
stdexec_forward.hppto wrap the private but stable, non-deprecated internal__transform_completion_signatures_thelpers instead. This is a 100% backwards-compatible, non-invasive fix that avoids the need to immediately refactor all HPX sender architectures to use the newconstevalfunctions.Additionally, this patch cleans up and removes the now-obsolete
#pragma clang diagnosticwarning suppression blocks from various sender implementations (bulk.hpp,when_all_vector.hpp, andthread_pool_scheduler_bulk.hpp).How to test
Compile the project on MSVC with
HPX_WITH_CXX_MODULES=ONand verify that thestdexec::transform_completion_signaturesdeprecation warnings are no longer present. The standardsenders_receiverstest suite will ensure no functionality has changed.