From 731c6aafc203b62946795068d8adb91e00f99c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Thu, 9 Jul 2026 23:19:11 +0300 Subject: [PATCH 1/5] Enable beman-tidy v0.5.1 in default mode for beman.task. Upgrade from v0.4.0 and fix requirement-level Beman Standard violations (readme badges, cmake alias, SPDX license IDs) so default mode passes without --require-all. Closes bemanproject/beman-tidy#262 --- .beman-tidy.yaml | 9 +++++++++ .github/workflows/pre-commit-check.yml | 1 + .github/workflows/pre-commit.yml | 1 + .pre-commit-config.yaml | 5 ++++- CMakeLists.txt | 1 + README.md | 2 +- src/beman/task/CMakeLists.txt | 1 - tests/beman/task/msvc-asan-issue.test.cpp | 2 ++ 8 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .beman-tidy.yaml diff --git a/.beman-tidy.yaml b/.beman-tidy.yaml new file mode 100644 index 0000000..e108008 --- /dev/null +++ b/.beman-tidy.yaml @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# This is the config file for beman-tidy, which checks compliance with the Beman Standard (https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md) +# Check documentation for beman-tidy here: +# https://github.com/bemanproject/beman-tidy/blob/main/README.md + +disabled_rules: [] +ignored_paths: + - infra/ diff --git a/.github/workflows/pre-commit-check.yml b/.github/workflows/pre-commit-check.yml index 2f91103..d3cc6af 100644 --- a/.github/workflows/pre-commit-check.yml +++ b/.github/workflows/pre-commit-check.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception name: Lint Check (pre-commit) on: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2409d2f..834b4c1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception name: Lint Check (pre-commit) on: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d28bd4..cfce730 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: @@ -19,10 +20,12 @@ repos: files: ^.*\.(cmake|cpp|cppm|hpp|txt|md|mds|json|js|in|yaml|yml|py|toml)$ args: ["--write", "--ignore-words", ".codespellignore" ] + # Beman Standard checking via beman-tidy - repo: https://github.com/bemanproject/beman-tidy - rev: v0.4.0 + rev: v0.5.1 hooks: - id: beman-tidy + args: [".", "--verbose"] # Clang-format for C++ # This brings in a portable version of clang-format. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c3f3c4..bb349f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ FetchContent_Declare( FetchContent_MakeAvailable(execution) add_subdirectory(src/beman/task) +add_library(beman::task ALIAS beman.task) #=============================================================================== # NOTE: this must be done before tests! CK diff --git a/README.md b/README.md index 3dd2eff..7601e9c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ![Continuous Integration Tests](https://github.com/bemanproject/task/actions/workflows/ci_tests.yml/badge.svg) ![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg) ![Coverage](https://coveralls.io/repos/github/bemanproject/task/badge.svg?branch=main) -![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) +[![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) `beman::execution::task` is a class template which is used as the the type of coroutine tasks. The corresponding objects diff --git a/src/beman/task/CMakeLists.txt b/src/beman/task/CMakeLists.txt index bbd5f89..f93a468 100644 --- a/src/beman/task/CMakeLists.txt +++ b/src/beman/task/CMakeLists.txt @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception add_library(beman.task STATIC) -add_library(beman::task ALIAS beman.task) target_sources(beman.task PRIVATE task.cpp) diff --git a/tests/beman/task/msvc-asan-issue.test.cpp b/tests/beman/task/msvc-asan-issue.test.cpp index 0414de4..1c71a87 100644 --- a/tests/beman/task/msvc-asan-issue.test.cpp +++ b/tests/beman/task/msvc-asan-issue.test.cpp @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include struct task { From 2990317c40ab7aa2e3b327182792c973e7e9934b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Fri, 10 Jul 2026 01:53:32 +0300 Subject: [PATCH 2/5] Enable beman-tidy v0.5.1 in default mode for beman.task. Upgrade from v0.4.0 and fix requirement-level Beman Standard violations (readme badges, cmake alias, SPDX license IDs) so default mode passes without --require-all. Use C++ comment style for SPDX in msvc-asan-issue.test.cpp so clang-format does not rewrite the license header. Closes bemanproject/beman-tidy#262 --- tests/beman/task/msvc-asan-issue.test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/beman/task/msvc-asan-issue.test.cpp b/tests/beman/task/msvc-asan-issue.test.cpp index 1c71a87..666317b 100644 --- a/tests/beman/task/msvc-asan-issue.test.cpp +++ b/tests/beman/task/msvc-asan-issue.test.cpp @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include From 012cc50bf27a486cf6b0aef772d811e527bdb3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Fri, 10 Jul 2026 02:57:53 +0300 Subject: [PATCH 3/5] Fix MSVC CI and broken pre-commit workflow. Force BEMAN_USE_MODULES OFF to match CMake presets and avoid execution product_type.cppm C7760 on MSVC build-and-test jobs (pre-existing on main). Point pre-commit.yml at infra-workflows reusable workflow; the local reusable file was missing and caused immediate workflow failure. --- .github/workflows/pre-commit.yml | 2 +- CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 834b4c1..d3cc6af 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,4 +11,4 @@ on: jobs: pre-commit: - uses: ./.github/workflows/reusable-beman-pre-commit.yml + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.3.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index bb349f8..2e1bd12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,10 @@ option( ${PROJECT_IS_TOP_LEVEL} ) +# Match CMake presets. MSVC CI enables modules via Ninja by default, which +# triggers execution C7760 in product_type.cppm (pre-existing on main). +set(BEMAN_USE_MODULES OFF CACHE BOOL "Build CXX modules" FORCE) + include(FetchContent) FetchContent_Declare( From c783057f70a637227558992a4366be421d5a5a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Fri, 10 Jul 2026 03:03:21 +0300 Subject: [PATCH 4/5] Remove duplicate pre-commit workflow. pre-commit-check.yml already runs the same infra-workflows reusable hook. The legacy pre-commit.yml referenced a missing local reusable file and duplicated the workflow name, causing immediate workflow validation failures on every PR. --- .github/workflows/pre-commit.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index d3cc6af..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,14 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -name: Lint Check (pre-commit) - -on: - # We have to use pull_request_target here as pull_request does not grant - # enough permission for reviewdog - pull_request_target: - push: - branches: - - main - -jobs: - pre-commit: - uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.3.0 From d642e3fb3b8a14b68972b6350eaa9b71ce0e9817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darius=20Nea=C8=9Bu?= Date: Fri, 10 Jul 2026 03:50:24 +0300 Subject: [PATCH 5/5] Bump beman-tidy to v0.5.2 --- .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 cfce730..57dc893 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: # Beman Standard checking via beman-tidy - repo: https://github.com/bemanproject/beman-tidy - rev: v0.5.1 + rev: v0.5.2 hooks: - id: beman-tidy args: [".", "--verbose"]