From 22d0e0a8c25a68db68c62ed9d51a5b7f45126b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Tue, 14 Jul 2026 01:58:03 +0300 Subject: [PATCH 1/3] Enable beman-tidy (--require-all mode) into beman.execution --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a2c991c..117f209e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,6 +65,6 @@ repos: rev: v0.5.2 hooks: - id: beman-tidy - args: [".", "--verbose"] + args: [".", "--verbose", "--require-all"] exclude: 'infra/' From 260504850a43a2418600b68c4ba607e996d0a87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Thu, 16 Jul 2026 21:23:47 +0100 Subject: [PATCH 2/3] attempt at fixing README.md (essentially, moving things around) --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4555f96f..daf718d9 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ +# beman.execution: Building Block For Asynchronous Programs -# beman.execution: Building Block For Asynchronous Programs [![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model) ![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg) [![Coverage](https://coveralls.io/repos/github/bemanproject/execution/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/execution?branch=main) + `beman.execution` provides the basic vocabulary for asynchronous programming as well as important algorithms implemented in terms -of this vocabulary. The key entities of the vocabulary are: +of this vocabulary. + +**Implements:** [`std::execution` (P2300R10)](http://wg21.link/P2300R10). + +The key entities of the vocabulary are: - `scheduler` used to control where operations are executed. - The key operation is `schedule(scheduler) -> sender`. @@ -38,8 +43,6 @@ e.g.: completed. - `bulk(...)` to executed execute work, potentially concurrently. -**Implements:** [`std::execution` (P2300R10)](http://wg21.link/P2300R10). - **Status**: [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#under-development-and-not-yet-ready-for-production-use) ## Help Welcome! From fc196242ff79cecfd3c65b43e66b7a8c9bd11b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Thu, 16 Jul 2026 21:40:50 +0100 Subject: [PATCH 3/3] fixed various beman.tidy issues --- docs/{intro-examples.md => intro_examples.md} | 8 ++++---- examples/CMakeLists.txt | 20 +++++++++---------- examples/{doc-just.cpp => doc_just.cpp} | 2 +- ...{doc-just_error.cpp => doc_just_error.cpp} | 2 +- ...-just_stopped.cpp => doc_just_stopped.cpp} | 2 +- ...ello-world.cpp => intro_1_hello_world.cpp} | 4 ++-- ...ello-async.cpp => intro_2_hello_async.cpp} | 6 +++--- ...ro-5-consumer.cpp => intro_5_consumer.cpp} | 2 +- examples/{intro-timer.hpp => intro_timer.hpp} | 2 +- ...-and-header.cpp => modules_and_header.cpp} | 2 +- examples/{sender-demo.cpp => sender_demo.cpp} | 2 +- ...hen_all-cancel.cpp => when_all_cancel.cpp} | 2 +- include/beman/execution/detail/just.hpp | 6 +++--- 13 files changed, 30 insertions(+), 30 deletions(-) rename docs/{intro-examples.md => intro_examples.md} (96%) rename examples/{doc-just.cpp => doc_just.cpp} (87%) rename examples/{doc-just_error.cpp => doc_just_error.cpp} (92%) rename examples/{doc-just_stopped.cpp => doc_just_stopped.cpp} (88%) rename examples/{intro-1-hello-world.cpp => intro_1_hello_world.cpp} (86%) rename examples/{intro-2-hello-async.cpp => intro_2_hello_async.cpp} (89%) rename examples/{intro-5-consumer.cpp => intro_5_consumer.cpp} (98%) rename examples/{intro-timer.hpp => intro_timer.hpp} (98%) rename examples/{modules-and-header.cpp => modules_and_header.cpp} (77%) rename examples/{sender-demo.cpp => sender_demo.cpp} (97%) rename examples/{when_all-cancel.cpp => when_all_cancel.cpp} (98%) diff --git a/docs/intro-examples.md b/docs/intro_examples.md similarity index 96% rename from docs/intro-examples.md rename to docs/intro_examples.md index 0ab96501..c49ecb6b 100644 --- a/docs/intro-examples.md +++ b/docs/intro_examples.md @@ -8,8 +8,8 @@ This page provides a series of examples showing how to use the
`"Hello, world"` - synchronous using asynchronous components -Code: [`examples/intro-1-hello-world.cpp`]() -@include examples/intro-1-hello-world.cpp +Code: [`examples/intro_1_hello_world.cpp`]() +@include examples/intro_1_hello_world.cpp The first example is a very complicated way to a version of `"Hello, world"`: it uses components for dealing with asynchronous work to @@ -126,7 +126,7 @@ The components used in this example do all of that synchronously:
`"Hello, async"` - a simple asynchronous example -Code: [`examples/intro-2-hello-async.cpp`]() -@include examples/intro-2-hello-async.cpp +Code: [`examples/intro_2_hello_async.cpp`]() +@include examples/intro_2_hello_async.cpp
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index aba158af..effe9928 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -22,23 +22,23 @@ set(TODO suspend_never) #-dk:TODO including that causes ASAN errors set(EXAMPLES allocator - doc-just - doc-just_error - doc-just_stopped + doc_just + doc_just_error + doc_just_stopped inspect - intro-1-hello-world - intro-2-hello-async - intro-5-consumer + intro_1_hello_world + intro_2_hello_async + intro_5_consumer playground - sender-demo + sender_demo stackoverflow stopping - when_all-cancel + when_all_cancel ) if(BEMAN_USE_MODULES) - #-dk:TODO gcc doesn't like the modules: list(APPEND EXAMPLES modules modules-and-header) - list(APPEND EXAMPLES modules-and-header) + #-dk:TODO gcc doesn't like the modules: list(APPEND EXAMPLES modules modules_and_header) + list(APPEND EXAMPLES modules_and_header) endif() foreach(EXAMPLE ${EXAMPLES}) diff --git a/examples/doc-just.cpp b/examples/doc_just.cpp similarity index 87% rename from examples/doc-just.cpp rename to examples/doc_just.cpp index d25ded01..8f9013df 100644 --- a/examples/doc-just.cpp +++ b/examples/doc_just.cpp @@ -1,4 +1,4 @@ -// examples/doc-just.cpp -*-C++-*- +// examples/doc_just.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/doc-just_error.cpp b/examples/doc_just_error.cpp similarity index 92% rename from examples/doc-just_error.cpp rename to examples/doc_just_error.cpp index 7acba327..30abf8a7 100644 --- a/examples/doc-just_error.cpp +++ b/examples/doc_just_error.cpp @@ -1,4 +1,4 @@ -// examples/doc-just_error.cpp -*-C++-*- +// examples/doc_just_error.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/doc-just_stopped.cpp b/examples/doc_just_stopped.cpp similarity index 88% rename from examples/doc-just_stopped.cpp rename to examples/doc_just_stopped.cpp index b4fe76f0..43a027ac 100644 --- a/examples/doc-just_stopped.cpp +++ b/examples/doc_just_stopped.cpp @@ -1,4 +1,4 @@ -// examples/doc-just_stopped.cpp -*-C++-*- +// examples/doc_just_stopped.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/intro-1-hello-world.cpp b/examples/intro_1_hello_world.cpp similarity index 86% rename from examples/intro-1-hello-world.cpp rename to examples/intro_1_hello_world.cpp index 92fb6bc7..095fd263 100644 --- a/examples/intro-1-hello-world.cpp +++ b/examples/intro_1_hello_world.cpp @@ -1,4 +1,4 @@ -// examples/intro-1-hello-world.cpp -*-C++-*- +// examples/intro_1_hello_world.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include @@ -16,7 +16,7 @@ namespace ex = ::beman::execution; using namespace std::string_literals; // ---------------------------------------------------------------------------- -// Please see the explanation in docs/intro-examples.md for an explanation. +// Please see the explanation in docs/intro_examples.md for an explanation. int main() { // clang-format off diff --git a/examples/intro-2-hello-async.cpp b/examples/intro_2_hello_async.cpp similarity index 89% rename from examples/intro-2-hello-async.cpp rename to examples/intro_2_hello_async.cpp index 58483a0d..4a798970 100644 --- a/examples/intro-2-hello-async.cpp +++ b/examples/intro_2_hello_async.cpp @@ -1,4 +1,4 @@ -// examples/intro-2-hello-async.cpp -*-C++-*- +// examples/intro_2_hello_async.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include @@ -12,14 +12,14 @@ import beman.execution; #else #include #endif -#include "intro-timer.hpp" +#include "intro_timer.hpp" namespace ex = ::beman::execution; using namespace std::string_literals; using namespace std::chrono_literals; // ---------------------------------------------------------------------------- -// Please see the explanation in docs/intro-examples.md for an explanation. +// Please see the explanation in docs/intro_examples.md for an explanation. int main() { std::cout << std::unitbuf; diff --git a/examples/intro-5-consumer.cpp b/examples/intro_5_consumer.cpp similarity index 98% rename from examples/intro-5-consumer.cpp rename to examples/intro_5_consumer.cpp index c85802e4..ad525eb3 100644 --- a/examples/intro-5-consumer.cpp +++ b/examples/intro_5_consumer.cpp @@ -1,4 +1,4 @@ -// examples/intro-5-consumer.cpp -*-C++-*- +// examples/intro_5_consumer.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/intro-timer.hpp b/examples/intro_timer.hpp similarity index 98% rename from examples/intro-timer.hpp rename to examples/intro_timer.hpp index acc79871..25ec0e01 100644 --- a/examples/intro-timer.hpp +++ b/examples/intro_timer.hpp @@ -1,4 +1,4 @@ -// examples/intro-timer.hpp -*-C++-*- +// examples/intro_timer.hpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #ifndef INCLUDED_EXAMPLES_INTRO_TIMER diff --git a/examples/modules-and-header.cpp b/examples/modules_and_header.cpp similarity index 77% rename from examples/modules-and-header.cpp rename to examples/modules_and_header.cpp index b531140c..f7ba4c5b 100644 --- a/examples/modules-and-header.cpp +++ b/examples/modules_and_header.cpp @@ -1,4 +1,4 @@ -// examples/modules-and-header.cpp -*-C++-*- +// examples/modules_and_header.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/sender-demo.cpp b/examples/sender_demo.cpp similarity index 97% rename from examples/sender-demo.cpp rename to examples/sender_demo.cpp index c7522737..c8486abd 100644 --- a/examples/sender-demo.cpp +++ b/examples/sender_demo.cpp @@ -1,4 +1,4 @@ -// examples/sender-demo.cpp -*-C++-*- +// examples/sender_demo.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/examples/when_all-cancel.cpp b/examples/when_all_cancel.cpp similarity index 98% rename from examples/when_all-cancel.cpp rename to examples/when_all_cancel.cpp index 17d51f06..345d931f 100644 --- a/examples/when_all-cancel.cpp +++ b/examples/when_all_cancel.cpp @@ -1,4 +1,4 @@ -// examples/when_all-cancel.cpp -*-C++-*- +// examples/when_all_cancel.cpp -*-C++-*- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include diff --git a/include/beman/execution/detail/just.hpp b/include/beman/execution/detail/just.hpp index b1fb576c..cb4bce24 100644 --- a/include/beman/execution/detail/just.hpp +++ b/include/beman/execution/detail/just.hpp @@ -134,7 +134,7 @@ using just_stopped_t = ::beman::execution::detail::just_t<::beman::execution::se * `tuple` containing the value copied/moved from the original arguments * (an `optional` is returned to indicate cancellation). * - *
+ * 
  * #include 
  * #include 
  * #include 
@@ -188,7 +188,7 @@ inline constexpr ::beman::execution::just_t just{};
  * the expected code was produced and also sets the flag `had_error` indicating it was called at all. This flag is
  * checked after waiting for the result in `sync_wait`.
  *
- * 
+ * 
  * #include 
  * #include 
  * #include 
@@ -242,7 +242,7 @@ inline constexpr ::beman::execution::just_error_t just_error{};
  * was called at all. This flag is checked after waiting for the result
  * in `sync_wait`.
  *
- * 
+ * 
  * #include 
  * #include 
  * #include