From f407f0cf4f425749061e7e3186ef129096449622 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 29 Nov 2025 19:48:28 -0800 Subject: [PATCH 1/9] Make strong_ptr transitive dependency --- CMakeLists.txt | 6 ++- conanfile.py | 5 ++- modules/async_context.cppm | 2 +- test_package/.clangd | 3 ++ test_package/CMakeLists.txt | 45 +++++++++++++++++++++ test_package/conanfile.py | 51 ++++++++++++++++++++++++ test_package/main.cpp | 78 +++++++++++++++++++++++++++++++++++++ 7 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 test_package/.clangd create mode 100644 test_package/CMakeLists.txt create mode 100644 test_package/conanfile.py create mode 100644 test_package/main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e63f440..bcb3273 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ cmake_minimum_required(VERSION 3.28) # Generate compile commands for anyone using our libraries. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_COLOR_DIAGNOSTICS ON) +set(CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_DEPENDENCIES + "1942b4fa-b2c5-4546-9385-83f254070067") project(async_context LANGUAGES CXX) @@ -48,10 +50,10 @@ install( install( EXPORT async_context_targets - FILE "libasync_context-config.cmake" - NAMESPACE libasync_context:: + FILE "async_context-config.cmake" DESTINATION "lib/cmake" CXX_MODULES_DIRECTORY "cxx-modules" + EXPORT_PACKAGE_DEPENDENCIES ) # ============================================================================== diff --git a/conanfile.py b/conanfile.py index c8b909d..c5bfe0a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -33,7 +33,7 @@ class async_context_conan(ConanFile): description = ("Implementation of C++20 coroutines targeting embedded system by eliminating the usage of the global heap and providing a 'context' which contains a coroutine stack frame and other useful utilities for scheduling.") topics = ("async", "coroutines", "stack", "scheduling", "scheduler") settings = "compiler", "build_type", "os", "arch" - exports_sources = "modules/*", "tests/*", "CMakeLists.txt", "LICENSE" + exports_sources = "modules/*", "tests/*", "CMakeLists.txt", "*.cmake.in", "LICENSE" package_type = "static-library" shared = False @@ -89,7 +89,8 @@ def build_requirements(self): self.test_requires("boost-ext-ut/2.3.1") def requirements(self): - self.requires("strong_ptr/0.0.0") + self.requires("strong_ptr/0.0.0", transitive_libs=True, + transitive_headers=True) def layout(self): cmake_layout(self) diff --git a/modules/async_context.cppm b/modules/async_context.cppm index a51f032..4d31fab 100644 --- a/modules/async_context.cppm +++ b/modules/async_context.cppm @@ -599,7 +599,7 @@ public: constexpr void resume() const { - auto active = handle().promise().context().active_handle(); + auto active = handle().promise().get_context().active_handle(); active.resume(); } diff --git a/test_package/.clangd b/test_package/.clangd new file mode 100644 index 0000000..f8ff8cd --- /dev/null +++ b/test_package/.clangd @@ -0,0 +1,3 @@ +CompileFlags: + CompilationDatabase: . + BuiltinHeaders: QueryDriver diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt new file mode 100644 index 0000000..4437fde --- /dev/null +++ b/test_package/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright 2024 - 2025 Khalil Estell and the libhal contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cmake_minimum_required(VERSION 4.0) + +# Generate compile commands for anyone using our libraries. +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_COLOR_DIAGNOSTICS ON) + +project(test_package LANGUAGES CXX) + +# Require Ninja or Visual Studio for modules +if(NOT CMAKE_GENERATOR MATCHES "Ninja|Visual Studio") + message(FATAL_ERROR "C++20 modules require Ninja or Visual Studio generator") +endif() + +find_package(async_context REQUIRED CONFIG) + +add_executable(${PROJECT_NAME}) +target_sources(${PROJECT_NAME} PUBLIC + FILE_SET CXX_MODULES + TYPE CXX_MODULES + PRIVATE main.cpp +) +target_include_directories(${PROJECT_NAME} PUBLIC .) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) +target_link_libraries(${PROJECT_NAME} PRIVATE async_context) + +# Always run this custom target by making it depend on ALL +add_custom_target(copy_compile_commands ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_BINARY_DIR}/compile_commands.json + ${CMAKE_SOURCE_DIR}/compile_commands.json + DEPENDS ${CMAKE_BINARY_DIR}/compile_commands.json) diff --git a/test_package/conanfile.py b/test_package/conanfile.py new file mode 100644 index 0000000..815789c --- /dev/null +++ b/test_package/conanfile.py @@ -0,0 +1,51 @@ +#!/usr/bin/python +# +# Copyright 2024 - 2025 Khalil Estell and the libhal contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain, CMakeDeps +from pathlib import Path + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + + def build_requirements(self): + self.tool_requires("cmake-modules-toolchain/1.0.2") + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = Path(self.cpp.build.bindirs[0]) / "test_package" + self.run(bin_path.absolute(), env="conanrun") diff --git a/test_package/main.cpp b/test_package/main.cpp new file mode 100644 index 0000000..0cf9ab7 --- /dev/null +++ b/test_package/main.cpp @@ -0,0 +1,78 @@ +// Copyright 2024 - 2025 Khalil Estell and the libhal contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +#include +#include +#include +#include +#include +#include + +import async_context; + +struct my_scheduler : public async::scheduler +{ + int sleep_count = 0; + +private: + void do_schedule( + [[maybe_unused]] async::context& p_context, + [[maybe_unused]] async::blocked_by p_block_state, + [[maybe_unused]] std::variant + p_block_info) override + { + if (std::holds_alternative(p_block_info)) { + sleep_count++; + } + } +}; + +async::future coro_double_delay(async::context&) +{ + using namespace std::chrono_literals; + co_await 100ns; + co_await 100ns; + co_return; +} +int main() +{ + auto scheduler = + mem::make_strong_ptr(std::pmr::new_delete_resource()); + auto buffer = mem::make_strong_ptr>( + std::pmr::new_delete_resource()); + auto buffer_span = mem::make_strong_ptr>( + std::pmr::new_delete_resource(), *buffer); + async::context my_context(scheduler, buffer_span); + + auto future_delay = coro_double_delay(my_context); + + assert(not future_delay.done()); + + future_delay.resume(); + + assert(scheduler->sleep_count == 1); + + future_delay.resume(); + + assert(scheduler->sleep_count == 2); + assert(not scheduler->done()); + + future_delay.resume(); + + assert(scheduler->done()); + + return 0; +} From 9310fb3e54a157c5ba41a9c61165eb8b8fbeeb34 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sun, 30 Nov 2025 07:08:15 -0800 Subject: [PATCH 2/9] Fix errors in test_package/main.cpp --- test_package/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test_package/main.cpp b/test_package/main.cpp index 0cf9ab7..27f46c6 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -42,11 +42,12 @@ struct my_scheduler : public async::scheduler async::future coro_double_delay(async::context&) { - using namespace std::chrono_literals; - co_await 100ns; - co_await 100ns; + // using namespace std::chrono_literals; + // co_await 100ns; + // co_await 100ns; co_return; } + int main() { auto scheduler = @@ -68,11 +69,11 @@ int main() future_delay.resume(); assert(scheduler->sleep_count == 2); - assert(not scheduler->done()); + assert(not future_delay.done()); future_delay.resume(); - assert(scheduler->done()); + assert(future_delay.done()); return 0; } From 1c25dfd2d3c79896c24f820e8d0eeb5e416e34a7 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sun, 30 Nov 2025 07:11:38 -0800 Subject: [PATCH 3/9] Add back co_await 500ms --- test_package/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_package/main.cpp b/test_package/main.cpp index 27f46c6..352095e 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -42,9 +42,9 @@ struct my_scheduler : public async::scheduler async::future coro_double_delay(async::context&) { - // using namespace std::chrono_literals; - // co_await 100ns; - // co_await 100ns; + using namespace std::chrono_literals; + co_await 500ms; + co_await 500ms; co_return; } From 929ca58bd944e35a7bfb944316aa459c1fa44f43 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sun, 30 Nov 2025 09:32:00 -0800 Subject: [PATCH 4/9] Use cmake-modules/1.0.3 --- CMakeLists.txt | 6 ++---- conanfile.py | 2 +- test_package/CMakeLists.txt | 2 ++ test_package/conanfile.py | 2 +- test_package/main.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb3273..0287694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,6 @@ cmake_minimum_required(VERSION 3.28) # Generate compile commands for anyone using our libraries. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_COLOR_DIAGNOSTICS ON) -set(CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_DEPENDENCIES - "1942b4fa-b2c5-4546-9385-83f254070067") project(async_context LANGUAGES CXX) @@ -53,7 +51,7 @@ install( FILE "async_context-config.cmake" DESTINATION "lib/cmake" CXX_MODULES_DIRECTORY "cxx-modules" - EXPORT_PACKAGE_DEPENDENCIES + # EXPORT_PACKAGE_DEPENDENCIES ) # ============================================================================== @@ -65,6 +63,7 @@ find_package(ut REQUIRED) if(CMAKE_CROSSCOMPILING) message(STATUS "Cross compiling, skipping unit test execution") else() + message(STATUS "Building unit tests!") add_executable(async_unit_test) # Add module files target_sources(async_unit_test @@ -77,7 +76,6 @@ else() target_compile_options(async_unit_test PRIVATE -g) target_link_libraries(async_unit_test PRIVATE async_context Boost::ut) - message(STATUS "Executing unit tests!") add_custom_target(run_tests ALL DEPENDS async_unit_test COMMAND async_unit_test) endif() diff --git a/conanfile.py b/conanfile.py index c5bfe0a..4b87452 100644 --- a/conanfile.py +++ b/conanfile.py @@ -85,7 +85,7 @@ def validate(self): def build_requirements(self): # Provides CMake, Ninja, & toolchain scripts for enabling modules - self.tool_requires("cmake-modules-toolchain/1.0.2") + self.tool_requires("cmake-modules-toolchain/1.0.3") self.test_requires("boost-ext-ut/2.3.1") def requirements(self): diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 4437fde..bb3cdeb 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -26,6 +26,7 @@ if(NOT CMAKE_GENERATOR MATCHES "Ninja|Visual Studio") endif() find_package(async_context REQUIRED CONFIG) +find_package(strong_ptr REQUIRED CONFIG) add_executable(${PROJECT_NAME}) target_sources(${PROJECT_NAME} PUBLIC @@ -36,6 +37,7 @@ target_sources(${PROJECT_NAME} PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC .) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) target_link_libraries(${PROJECT_NAME} PRIVATE async_context) +target_link_libraries(${PROJECT_NAME} PRIVATE async_context strong_ptr) # Always run this custom target by making it depend on ALL add_custom_target(copy_compile_commands ALL diff --git a/test_package/conanfile.py b/test_package/conanfile.py index 815789c..db08122 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -25,7 +25,7 @@ class TestPackageConan(ConanFile): generators = "VirtualRunEnv" def build_requirements(self): - self.tool_requires("cmake-modules-toolchain/1.0.2") + self.tool_requires("cmake-modules-toolchain/1.0.3") def requirements(self): self.requires(self.tested_reference_str) diff --git a/test_package/main.cpp b/test_package/main.cpp index 352095e..4b69833 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -43,8 +43,8 @@ struct my_scheduler : public async::scheduler async::future coro_double_delay(async::context&) { using namespace std::chrono_literals; - co_await 500ms; - co_await 500ms; + co_await std::chrono::milliseconds(500); + co_await std::chrono::milliseconds(500); co_return; } From 36b3aaf6ea6ef934d152cd09637171494565a062 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sun, 30 Nov 2025 12:19:52 -0800 Subject: [PATCH 5/9] more attempts --- test_package/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index bb3cdeb..75370a2 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -36,8 +36,10 @@ target_sources(${PROJECT_NAME} PUBLIC ) target_include_directories(${PROJECT_NAME} PUBLIC .) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) -target_link_libraries(${PROJECT_NAME} PRIVATE async_context) +# target_link_libraries(${PROJECT_NAME} PRIVATE async_context) target_link_libraries(${PROJECT_NAME} PRIVATE async_context strong_ptr) +target_compile_options(${PROJECT_NAME} PRIVATE -fno-module-lazy) + # Always run this custom target by making it depend on ALL add_custom_target(copy_compile_commands ALL From 0db09c23e8a94510b411d6f25a89a7b7765402c5 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sun, 7 Dec 2025 18:49:03 -0800 Subject: [PATCH 6/9] Working with current llvm-toolchain conan create . -pr hal/mcu/stm32f103c8 -pr hal/tc/llvm --version=latest --- CMakeLists.txt | 2 +- modules/async_context.cppm | 28 +++++++++++++--------------- test_package/CMakeLists.txt | 7 +------ test_package/main.cpp | 8 ++++---- tests/async.test.cpp | 14 ++++++++------ 5 files changed, 27 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0287694..1d5a738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ install( FILE "async_context-config.cmake" DESTINATION "lib/cmake" CXX_MODULES_DIRECTORY "cxx-modules" - # EXPORT_PACKAGE_DEPENDENCIES + EXPORT_PACKAGE_DEPENDENCIES ) # ============================================================================== diff --git a/modules/async_context.cppm b/modules/async_context.cppm index 4d31fab..dd75104 100644 --- a/modules/async_context.cppm +++ b/modules/async_context.cppm @@ -20,7 +20,6 @@ module; #include #include #include -#include #include #include #include @@ -32,14 +31,13 @@ export module async_context; export import strong_ptr; -export namespace async::inline v0 { +namespace async::inline v0 { -using u8 = std::uint8_t; -using byte = std::uint8_t; -using usize = std::size_t; +export using u8 = std::uint8_t; +export using byte = std::uint8_t; +export using usize = std::size_t; -enum class blocked_by : u8 -{ +export enum class blocked_by : u8 { /// Not blocked by anything, ready to run! nothing = 0, @@ -63,7 +61,7 @@ enum class blocked_by : u8 external = 4, }; -class context; +export class context; /** * @brief Thrown when an async::context runs out of stack memory @@ -72,7 +70,7 @@ class context; * cannot fit withint he context. * */ -struct bad_coroutine_alloc : std::bad_alloc +export struct bad_coroutine_alloc : std::bad_alloc { bad_coroutine_alloc(context const* p_violator) : violator(p_violator) @@ -117,7 +115,7 @@ using sleep_duration = std::chrono::nanoseconds; * @brief * */ -class scheduler +export class scheduler { public: /** @@ -156,7 +154,7 @@ private: std::variant p_block_info) = 0; }; -class context +export class context { public: static auto constexpr default_timeout = sleep_duration(0); @@ -415,10 +413,10 @@ protected: class context* m_context; }; -template +export template class future; -template +export template class future_promise_type : public promise_base { public: @@ -505,7 +503,7 @@ private: usize m_frame_size; }; -template<> +export template<> class future_promise_type : public promise_base { public: @@ -589,7 +587,7 @@ private: usize m_frame_size = 0; }; -template +export template class future { public: diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 75370a2..d544a50 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -26,7 +26,6 @@ if(NOT CMAKE_GENERATOR MATCHES "Ninja|Visual Studio") endif() find_package(async_context REQUIRED CONFIG) -find_package(strong_ptr REQUIRED CONFIG) add_executable(${PROJECT_NAME}) target_sources(${PROJECT_NAME} PUBLIC @@ -34,12 +33,8 @@ target_sources(${PROJECT_NAME} PUBLIC TYPE CXX_MODULES PRIVATE main.cpp ) -target_include_directories(${PROJECT_NAME} PUBLIC .) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) -# target_link_libraries(${PROJECT_NAME} PRIVATE async_context) -target_link_libraries(${PROJECT_NAME} PRIVATE async_context strong_ptr) -target_compile_options(${PROJECT_NAME} PRIVATE -fno-module-lazy) - +target_link_libraries(${PROJECT_NAME} PRIVATE async_context) # Always run this custom target by making it depend on ALL add_custom_target(copy_compile_commands ALL diff --git a/test_package/main.cpp b/test_package/main.cpp index 4b69833..9a8676a 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -31,10 +31,10 @@ struct my_scheduler : public async::scheduler void do_schedule( [[maybe_unused]] async::context& p_context, [[maybe_unused]] async::blocked_by p_block_state, - [[maybe_unused]] std::variant + [[maybe_unused]] std::variant p_block_info) override { - if (std::holds_alternative(p_block_info)) { + if (std::holds_alternative(p_block_info)) { sleep_count++; } } @@ -43,8 +43,8 @@ struct my_scheduler : public async::scheduler async::future coro_double_delay(async::context&) { using namespace std::chrono_literals; - co_await std::chrono::milliseconds(500); - co_await std::chrono::milliseconds(500); + co_await 500ms; + co_await 500ms; co_return; } diff --git a/tests/async.test.cpp b/tests/async.test.cpp index a1def0e..4722b41 100644 --- a/tests/async.test.cpp +++ b/tests/async.test.cpp @@ -45,14 +45,16 @@ boost::ut::suite<"async::context"> async_context_suite = []() { int sleep_count = 0; private: - void do_schedule([[maybe_unused]] context& p_context, - [[maybe_unused]] blocked_by p_block_state, - [[maybe_unused]] std::variant - p_block_info) override + void do_schedule( + [[maybe_unused]] context& p_context, + [[maybe_unused]] blocked_by p_block_state, + [[maybe_unused]] std::variant + p_block_info) override { std::println("Scheduler called!", sleep_count); - if (std::holds_alternative(p_block_info)) { - std::println("sleep for: {}", std::get(p_block_info)); + if (std::holds_alternative(p_block_info)) { + std::println("sleep for: {}", + std::get(p_block_info)); sleep_count++; std::println("Sleep count = {}!", sleep_count); } From 68ddbeb33bbd83a778ddbeb6a3e0638a1c1fff5c Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Fri, 12 Dec 2025 15:15:16 -0800 Subject: [PATCH 7/9] Upgrade CI --- .github/workflows/ci.yml | 2 ++ .github/workflows/deploy.yml | 1 + conanfile.py | 7 +++---- test_package/conanfile.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cd0d8d..e59f50c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,6 @@ on: jobs: package_and_upload_all_check: uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y + with: + modules_support_needed: true secrets: inherit diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9f7ae94..6a0170a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,6 +26,7 @@ jobs: with: version: ${{ github.ref_name }} remote_url: https://libhal.jfrog.io/artifactory/api/conan/trunk-conan + modules_support_needed: true secrets: conan_remote_password: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN }} conan_remote_user: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN_USER }} diff --git a/conanfile.py b/conanfile.py index 4b87452..ec432ef 100644 --- a/conanfile.py +++ b/conanfile.py @@ -84,13 +84,12 @@ def validate(self): self._validate_compiler_version() def build_requirements(self): - # Provides CMake, Ninja, & toolchain scripts for enabling modules - self.tool_requires("cmake-modules-toolchain/1.0.3") + self.tool_requires("cmake/[^4.0.0]") + self.tool_requires("ninja/[^1.3.0]") self.test_requires("boost-ext-ut/2.3.1") def requirements(self): - self.requires("strong_ptr/0.0.0", transitive_libs=True, - transitive_headers=True) + self.requires("strong_ptr/0.0.2") def layout(self): cmake_layout(self) diff --git a/test_package/conanfile.py b/test_package/conanfile.py index db08122..e323cf4 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -25,7 +25,8 @@ class TestPackageConan(ConanFile): generators = "VirtualRunEnv" def build_requirements(self): - self.tool_requires("cmake-modules-toolchain/1.0.3") + self.tool_requires("cmake/[^4.0.0]") + self.tool_requires("ninja/[^1.3.0]") def requirements(self): self.requires(self.tested_reference_str) From 1b0e42481d983c6e8f2b28e0d669350e63cb9fb5 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 13 Dec 2025 06:07:09 -0800 Subject: [PATCH 8/9] Try out coroutine carve out to get architectures passing --- .github/workflows/ci.yml | 3 ++- .github/workflows/deploy.yml | 3 ++- test_package/main.cpp | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e59f50c..453eabc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,8 @@ on: jobs: package_and_upload_all_check: - uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y + uses: libhal/ci/.github/workflows/package_and_upload_all.yml@coro-carve-out with: modules_support_needed: true + coroutine_support_needed: true secrets: inherit diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a0170a..ca58dfe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,11 +22,12 @@ on: jobs: deploy: if: startsWith(github.ref, 'refs/tags/') - uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y + uses: libhal/ci/.github/workflows/package_and_upload_all.yml@coro-carve-out with: version: ${{ github.ref_name }} remote_url: https://libhal.jfrog.io/artifactory/api/conan/trunk-conan modules_support_needed: true + coroutine_support_needed: true secrets: conan_remote_password: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN }} conan_remote_user: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN_USER }} diff --git a/test_package/main.cpp b/test_package/main.cpp index 9a8676a..92d7052 100644 --- a/test_package/main.cpp +++ b/test_package/main.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -43,8 +44,11 @@ struct my_scheduler : public async::scheduler async::future coro_double_delay(async::context&) { using namespace std::chrono_literals; + std::println("Delay for 500ms"); co_await 500ms; + std::println("Delay for another 500ms"); co_await 500ms; + std::println("Returning!"); co_return; } From 67c22b1e0d59f4a2da20b7bdc24b43b26a75b6d6 Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 13 Dec 2025 06:20:14 -0800 Subject: [PATCH 9/9] Restore 5.x.y branch for CI --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 453eabc..3096bd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ on: jobs: package_and_upload_all_check: - uses: libhal/ci/.github/workflows/package_and_upload_all.yml@coro-carve-out + uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y with: modules_support_needed: true coroutine_support_needed: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ca58dfe..21db97c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ on: jobs: deploy: if: startsWith(github.ref, 'refs/tags/') - uses: libhal/ci/.github/workflows/package_and_upload_all.yml@coro-carve-out + uses: libhal/ci/.github/workflows/package_and_upload_all.yml@5.x.y with: version: ${{ github.ref_name }} remote_url: https://libhal.jfrog.io/artifactory/api/conan/trunk-conan