Enable beman-tidy (--require-all mode) into beman.task#98
Merged
Conversation
dietmarkuehl
marked this pull request as ready for review
July 17, 2026 22:40
Contributor
There was a problem hiding this comment.
Pull request overview
Enables stricter beman-tidy enforcement (--require-all) for beman.task, while updating the codebase and examples to match updated beman::execution APIs and naming/layout expectations.
Changes:
- Enable
beman-tidypre-commit hook in--require-allmode. - Update
beman::executionintegration (dependency pin,affine_on→affine, scheduler/env query adjustments). - Normalize example filenames (dash/
c++now-*→ underscore/cppnow_*) and update docs/README links accordingly.
Reviewed changes
Copilot reviewed 40 out of 43 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Updates execution dependency pin and refactors how beman.task is declared/built. |
src/beman/task/CMakeLists.txt |
Adjusts subdir CMake to rely on top-level target creation. |
.pre-commit-config.yaml |
Enables beman-tidy with --require-all. |
README.md |
Updates badges/markdownlint handling and adjusts wording for the implemented proposal reference. |
include/beman/task/detail/task_scheduler.hpp |
Updates scheduler type erasure internals and completion-scheduler query logic. |
include/beman/task/detail/promise_type.hpp |
Switches to execution::affine(...) in await_transform. |
include/beman/task/detail/promise_env.hpp |
Adds get_start_scheduler query support. |
examples/CMakeLists.txt |
Updates example target names to underscore-based filenames. |
examples/task_sender.cpp |
Adds a new example demonstrating env/allocator patterns with task. |
examples/odd_completions.cpp |
Adds a new example intended to exercise non-value completions. |
examples/demo_scope.hpp |
Adds a helper utility used by examples. |
examples/demo_tls_scheduler.hpp |
Updates example domain implementation to affine APIs and naming. |
examples/demo_thread_loop.hpp |
Renames header banner comment to underscore naming. |
examples/tls_scheduler.cpp |
Updates include to match renamed demo header. |
examples/environment.cpp |
Updates includes to underscore naming for demo headers. |
examples/issue_start_reschedules.cpp |
Renames banner comment and include to underscore naming. |
examples/customize.cpp |
Updates affine_on usage to affine. |
examples/async_lock.cpp |
Updates banner comment and adjusts write_env call. |
examples/alloc_1.cpp |
Renames banner comment to underscore naming. |
examples/alloc_2.cpp |
Renames banner comment to underscore naming. |
examples/rvalue_task.cpp |
Renames banner comment to underscore naming. |
examples/odd_return.cpp |
Renames banner comment to underscore naming. |
examples/issue_symmetric_transfer.cpp |
Renames banner comment to underscore naming. |
examples/issue_frame_allocator.cpp |
Renames banner comment to underscore naming. |
examples/issue_affine.cpp |
Renames banner comment to underscore naming. |
examples/http_server.cpp |
Renames banner comment to underscore naming. |
examples/escaped_exception.cpp |
Renames banner comment to underscore naming. |
examples/dangling_references.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_affinity.cpp |
Renames banner comment and demo header include to underscore naming. |
examples/cppnow_allocator.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_basic.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_cancel.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_errors.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_query.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_result_types.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_return.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_stop_token.cpp |
Renames banner comment to underscore naming. |
examples/cppnow_with_error.cpp |
Renames banner comment to underscore naming. |
examples/co_await_task.cpp |
Renames banner comment to underscore naming. |
examples/co_await_result.cpp |
Renames banner comment to underscore naming. |
docs/examples.md |
Updates example links to renamed files/headers. |
Comments suppressed due to low confidence (3)
examples/alloc_2.cpp:1
- The file header comment references
alloc_1.cpp, but this file isalloc_2.cpp. This looks like a copy/paste mistake and makes it harder to track examples when browsing.
examples/async_lock.cpp:1 - The file header comment omits the
.cppextension, while other examples use the full filename. Keeping these consistent helps tooling and readers.
examples/cppnow_allocator.cpp:1 - The file header comment has a typo (
alloctor) and doesn’t match the actual filename (cppnow_allocator.cpp). This can confuse readers and may trip filename/header consistency checks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
33
to
+38
| FetchContent_Declare( | ||
| execution | ||
| # FETCHCONTENT_SOURCE_DIR_EXECUTION ${CMAKE_SOURCE_DIR}/../execution | ||
| FETCHCONTENT_SOURCE_DIR_EXECUTION | ||
| ${CMAKE_SOURCE_DIR}/../execution | ||
| GIT_REPOSITORY https://github.com/bemanproject/execution | ||
| GIT_TAG 7df0f75 | ||
| GIT_TAG cd3211e |
| <details> | ||
| <summary> | ||
| <a href='https://github.com/bemanproject/task/blob/remove-net-and-improve-docs/examples/demo-thread_loop.hpp'><code>demo::thread_loop</code> is a <code>run_loop</code> whose <code>run()</code> is called from a <code>std::thread</code>. | ||
| <a href='https://github.com/bemanproject/task/blob/remove-net-and-improve-docs/examples/demo_thread_loop.hpp'><code>demo::thread_loop</code> is a <code>run_loop</code> whose <code>run()</code> is called from a <code>std::thread</code>. |
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.
Issue: bemanproject/beman-tidy#262