Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
restore-keys: |
Windows-sccache-

- name: Start sccache
run: sccache --start-server

- name: Build
run: pixi run build

Expand All @@ -55,5 +58,4 @@ jobs:
retention-days: 30

- name: Stop sccache
if: always()
run: pixi run -- sccache --stop-server 2>$null
run: sccache --stop-server
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether Stop sccache runs unconditionally
rg -n -C2 'name:\s+Stop sccache|if:\s+always\(\)|sccache --stop-server' .github/workflows/generate-docs.yml

Repository: clice-io/clore

Length of output: 161


🏁 Script executed:

cat -n .github/workflows/generate-docs.yml

Repository: clice-io/clore

Length of output: 1927


Add conditional execution to ensure sccache is always shut down.

The "Stop sccache" step only runs when prior steps succeed. If the Build or documentation generation fails, this step is skipped, leaving the sccache server running. Add if: always() to ensure cleanup occurs regardless of job status, and continue-on-error: true to prevent the cleanup failure from failing the job.

Suggested change
       - name: Stop sccache
+        if: always()
+        continue-on-error: true
         run: sccache --stop-server
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Stop sccache
if: always()
run: pixi run -- sccache --stop-server 2>$null
run: sccache --stop-server
- name: Stop sccache
if: always()
continue-on-error: true
run: sccache --stop-server
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/generate-docs.yml around lines 60 - 61, The "Stop sccache"
step (named "Stop sccache") runs only on success and can be skipped on failures,
leaving the sccache server running; update that step to always run by adding if:
always() and make it resilient by adding continue-on-error: true so cleanup
never blocks job results—modify the "Stop sccache" job step to include those two
fields.

5 changes: 5 additions & 0 deletions cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ cmake_minimum_required(VERSION 3.30)
set(CMAKE_C_COMPILER clang CACHE STRING "")
set(CMAKE_CXX_COMPILER clang++ CACHE STRING "")

find_program(CLANG_SCAN_DEPS_PATH "clang-scan-deps")
if(CLANG_SCAN_DEPS_PATH)
set(CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS "${CLANG_SCAN_DEPS_PATH}" CACHE FILEPATH "")
endif()

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
find_program(LLVM_AR_PATH "llvm-ar")
if(LLVM_AR_PATH)
set(CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "")
Expand Down
197 changes: 197 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cmake = ">=3.30"
ninja = "*"
clang = "==20.1.8"
clangxx = "==20.1.8"
clang-tools = "==20.1.8"
lld = "==20.1.8"
llvm-tools = "==20.1.8"
compiler-rt = "==20.1.8"
Expand Down
28 changes: 22 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
file(GLOB_RECURSE CLORE_CORE_SOURCES CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/config/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/extract/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/generate/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/support/*.cpp"
file(GLOB_RECURSE CLORE_MODULE_SOURCES CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/config/*.cppm"
"${CMAKE_CURRENT_SOURCE_DIR}/extract/*.cppm"
"${CMAKE_CURRENT_SOURCE_DIR}/generate/*.cppm"
"${CMAKE_CURRENT_SOURCE_DIR}/support/*.cppm"
)

add_library(clore-core STATIC ${CLORE_CORE_SOURCES})
# ── report clang-scan-deps configuration for C++20 module compilation ───
if(CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS)
message(STATUS "Found clang-scan-deps: ${CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS}")
else()
message(STATUS "clang-scan-deps not found; will rely on CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS cache")
endif()

add_library(clore-core STATIC)
add_library(clore::core ALIAS clore-core)
set_property(TARGET clore-core PROPERTY CXX_SCAN_FOR_MODULES ON)

target_sources(clore-core
PUBLIC
FILE_SET CXX_MODULES FILES
${CLORE_MODULE_SOURCES}
)

target_include_directories(clore-core PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
Expand All @@ -22,6 +36,7 @@ target_link_libraries(clore-core PUBLIC
)

add_executable(clore "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp")
set_property(TARGET clore PROPERTY CXX_SCAN_FOR_MODULES ON)
target_link_libraries(clore PRIVATE clore::core eventide::deco)
install(TARGETS clore RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

Expand Down Expand Up @@ -50,6 +65,7 @@ if(CLORE_ENABLE_TEST)
"${PROJECT_SOURCE_DIR}/tests/unit"
)
target_link_libraries(unit_tests PRIVATE clore::core eventide::zest eventide::deco)
set_property(TARGET unit_tests PROPERTY CXX_SCAN_FOR_MODULES ON)
endif()

if(CLORE_ENABLE_IPO)
Expand Down
6 changes: 6 additions & 0 deletions src/config/config.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export module clore.config;

export import :schema;
export import :load;
export import :normalize;
export import :validate;
6 changes: 0 additions & 6 deletions src/config/config.h

This file was deleted.

Loading
Loading