-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Use install-boost
instead of install-outcome
and install-quickcpplib
.
#62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes replace the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TaskRunner
participant BoostRepo
User->>TaskRunner: Run install-boost
TaskRunner->>BoostRepo: Download Boost 1.86.0 tarball
BoostRepo-->>TaskRunner: Return tarball
TaskRunner->>TaskRunner: Verify SHA256 checksum
TaskRunner->>TaskRunner: Extract source, run bootstrap.sh with targets
TaskRunner->>TaskRunner: Build Boost with b2 and concurrency control
TaskRunner->>TaskRunner: Install Boost and optionally write CMake settings
TaskRunner-->>User: Installation complete
Possibly related PRs
Suggested reviewers
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
taskfiles/deps.yaml
(1 hunks)tools/yscope-dev-utils
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: unit-tests
tools/yscope-dev-utils
[error] 1-1: File not found: 'utils.yaml' is missing in the specified directory, causing the task 'test-all' to fail.
🪛 GitHub Actions: code-linting-checks
tools/yscope-dev-utils
[error] 1-1: File not found: 'utils.yaml' is missing in the specified directory, causing the lint:check task to fail.
🪛 YAMLlint (1.37.1)
taskfiles/deps.yaml
[error] 89-89: trailing spaces
(trailing-spaces)
🔇 Additional comments (1)
tools/yscope-dev-utils (1)
1-1
:❓ Verification inconclusive
Verify subproject commit bump
Ensure that the updated subproject commit76aecbd6d0db6e2078005431946b5c2e716c4291
exists in the remote and is compatible with the new Boost-based install workflow. Update the submodule and run a local build to confirm there are no regressions.To automate this check, you can run:
🏁 Script executed:
#!/bin/bash # Initialise or update the submodule git submodule update --init tools/yscope-dev-utils # Verify that the specified commit exists git -C tools/yscope-dev-utils cat-file -t 76aecbd6d0db6e2078005431946b5c2e716c4291^{commit} \ && echo "Commit 76aecbd6d0db6e2078005431946b5c2e716c4291 found." \ || { echo "ERROR: Commit not found in tools/yscope-dev-utils."; exit 1; }Length of output: 622
Subproject commit verified
Commit76aecbd6d0db6e2078005431946b5c2e716c4291
exists intools/yscope-dev-utils
. Please update the submodule and perform a local build to confirm compatibility with the new Boost-based install workflow and ensure there are no regressions.Next steps:
git submodule update --init tools/yscope-dev-utils
- Run the full build & test suite locally
🧰 Tools
🪛 GitHub Actions: unit-tests
[error] 1-1: File not found: 'utils.yaml' is missing in the specified directory, causing the task 'test-all' to fail.
🪛 GitHub Actions: code-linting-checks
[error] 1-1: File not found: 'utils.yaml' is missing in the specified directory, causing the lint:check task to fail.
install-boost: | ||
internal: true | ||
run: "once" | ||
deps: | ||
- "install-quickcpplib" | ||
cmds: | ||
- task: ":utils:cmake-install-remote-tar" | ||
vars: | ||
NAME: "{{.G_OUTCOME_LIB_NAME}}" | ||
WORK_DIR: "{{.G_OUTCOME_WORK_DIR}}" | ||
FILE_SHA256: "0382248cbb00806ce4b5f3ce6939797dc3b597c85fd3531614959e31ef488b39" | ||
URL: "https://github.com/ned14/outcome/archive/refs/tags/v2.2.11.tar.gz" | ||
GEN_ARGS: | ||
- "-C {{.G_DEPS_CMAKE_SETTINGS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}.cmake" | ||
- "-DBUILD_TESTING=OFF" | ||
- "-DCMAKE_BUILD_TYPE=Release" | ||
- "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" | ||
- task: "add-package-root-to-cmake-settings" | ||
- task: "boost-download-and-install" | ||
vars: | ||
NAME: "{{.G_OUTCOME_LIB_NAME}}" | ||
INSTALL_PREFIX: "{{.G_OUTCOME_WORK_DIR}}/{{.G_OUTCOME_LIB_NAME}}-install" | ||
WORK_DIR: "{{.G_DEPS_DIR}}/boost" | ||
FILE_SHA256: "2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26" | ||
URL: "https://github.com/boostorg/boost/releases/download/boost-1.86.0/\ | ||
boost-1.86.0-b2-nodocs.tar.gz" | ||
CMAKE_SETTINGS_DIR: "{{.G_DEPS_CMAKE_SETTINGS_DIR}}" | ||
TARGETS: | ||
- "filesystem" | ||
- "iostreams" | ||
- "process" | ||
- "program_options" | ||
- "regex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Essential: Validate integration of new install-boost
task and update CMake settings
The new install-boost
task is defined correctly, but it isn’t hooked into the aggregate install-all-run
workflow, so Boost will never actually be installed. Additionally, to mirror how other dependencies expose their root dirs to CMake, you should emit a BOOST_ROOT
cache entry via the add-package-root-to-cmake-settings
helper. For consistency, consider introducing G_BOOST_LIB_NAME
and G_BOOST_WORK_DIR
in the vars
section as well. Finally, double-check that the listed TARGETS
cover all Boost modules your project uses.
Proposed diffs:
- Define Boost variables with the other libs (outside this range):
vars:
G_QUICKCPPLIB_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}"
+ G_BOOST_LIB_NAME: "boost"
+ G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"
- Wire
install-boost
intoinstall-all-run
(around lines 29–31):
install-all-run:
internal: true
deps:
- - "install-Catch2"
- - "install-outcome"
+ - "install-Catch2"
+ - "install-boost"
- Emit
BOOST_ROOT
after download (within lines 72–88):
install-boost:
internal: true
run: "once"
cmds:
- task: "boost-download-and-install"
vars:
WORK_DIR: "{{.G_DEPS_DIR}}/boost"
FILE_SHA256: "2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26"
URL: "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-b2-nodocs.tar.gz"
CMAKE_SETTINGS_DIR: "{{.G_DEPS_CMAKE_SETTINGS_DIR}}"
TARGETS:
- "filesystem"
- "iostreams"
- "process"
- "program_options"
- "regex"
- - "system"
+ - "system"
- task: "add-package-root-to-cmake-settings"
vars:
NAME: "{{.G_BOOST_LIB_NAME}}"
INSTALL_PREFIX: "{{.G_BOOST_WORK_DIR}}/{{.G_BOOST_LIB_NAME}}-install"
Please verify that this change installs Boost as expected and that your CMake scripts pick up BOOST_ROOT
correctly.
🏁 Script executed:
#!/bin/bash
set -e
echo "=== install-all-run section ==="
rg -n "install-all-run" -A20 -B2 taskfiles/deps.yaml || true
echo ""
echo "=== add-package-root-to-cmake-settings usages ==="
rg -n "add-package-root-to-cmake-settings" -A3 taskfiles/deps.yaml || true
echo ""
echo "=== G_BOOST variables ==="
rg -n "G_BOOST" taskfiles/deps.yaml || true
Length of output: 1585
🏁 Script executed:
#!/bin/bash
set -e
echo "=== Search for G_QUICKCPPLIB_LIB_NAME ==="
rg -n "G_QUICKCPPLIB_LIB_NAME" -A2 -B2 taskfiles/deps.yaml || true
echo ""
echo "=== Global vars section context ==="
rg -n "^vars:" -A10 -B2 taskfiles/deps.yaml || true
Length of output: 963
Hook Boost into the install workflow and expose BOOST_ROOT
Please apply the following updates to taskfiles/deps.yaml
:
-
Add Boost variables alongside the other libs:
vars: G_CATCH2_LIB_NAME: "Catch2" G_CATCH2_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_CATCH2_LIB_NAME}}" G_OUTCOME_LIB_NAME: "outcome" G_OUTCOME_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_OUTCOME_LIB_NAME}}" G_QUICKCPPLIB_LIB_NAME: "quickcpplib" G_QUICKCPPLIB_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}" + G_BOOST_LIB_NAME: "boost" + G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"
-
Wire
install-boost
into theinstall-all-run
aggregate task:install-all-run: internal: true deps: - "install-Catch2" - "install-outcome" + - "install-boost"
-
Emit
BOOST_ROOT
in CMake settings after downloading Boost:install-boost: internal: true run: "once" cmds: - task: "boost-download-and-install" vars: WORK_DIR: "{{.G_DEPS_DIR}}/boost" FILE_SHA256: "2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26" URL: "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-b2-nodocs.tar.gz" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CMAKE_SETTINGS_DIR}}" TARGETS: - "filesystem" - "iostreams" - "process" - "program_options" - "regex" - "system" + - task: "add-package-root-to-cmake-settings" + vars: + NAME: "{{.G_BOOST_LIB_NAME}}" + INSTALL_PREFIX: "{{.G_BOOST_WORK_DIR}}/{{.G_BOOST_LIB_NAME}}-install"
-
Finally, confirm that your CMake scripts honour
BOOST_ROOT
and that the listedTARGETS
include every Boost component your project needs.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In taskfiles/deps.yaml around lines 72 to 88, the install-boost task is defined
but not integrated into the install-all-run workflow, so Boost is never
installed. Fix this by adding Boost-related variables (e.g., G_BOOST_LIB_NAME,
G_BOOST_WORK_DIR) alongside other libs in the vars section. Then, include the
install-boost task in the install-all-run aggregate task (around lines 29-31).
Also, after the boost-download-and-install step, emit a BOOST_ROOT cache entry
using the add-package-root-to-cmake-settings helper to expose Boost's root
directory to CMake. Finally, verify your CMake scripts use BOOST_ROOT and that
the TARGETS list covers all required Boost modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (1)
taskfiles/deps.yaml (1)
70-87
: 🧹 Nitpick (assertive)Add consistent variable naming for Boost dependency.
The
install-boost
task implementation is functionally correct, but it lacks the consistent variable naming pattern used by other dependencies. Consider addingG_BOOST_LIB_NAME
andG_BOOST_WORK_DIR
variables to thevars
section for consistency with Catch2's variable usage.Add these variables to the
vars
section (around lines 3-8):vars: G_CATCH2_LIB_NAME: "Catch2" G_CATCH2_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_CATCH2_LIB_NAME}}" G_QUICKCPPLIB_LIB_NAME: "quickcpplib" G_QUICKCPPLIB_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_QUICKCPPLIB_LIB_NAME}}" + G_BOOST_LIB_NAME: "boost" + G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"Then update the
WORK_DIR
reference on line 76:- WORK_DIR: "{{.G_DEPS_DIR}}/boost" + WORK_DIR: "{{.G_BOOST_WORK_DIR}}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (10)
CMakeLists.txt
(0 hunks)src/ystdlib/error_handling/CMakeLists.txt
(0 hunks)src/ystdlib/error_handling/Result.hpp
(3 hunks)src/ystdlib/error_handling/test/test_Result.cpp
(5 hunks)taskfile.yaml
(1 hunks)taskfiles/build.yaml
(4 hunks)taskfiles/deps.yaml
(2 hunks)taskfiles/lint-cpp.yaml
(4 hunks)taskfiles/lint-venv.yaml
(1 hunks)taskfiles/lint-yaml.yaml
(1 hunks)
💤 Files with no reviewable changes (2)
- src/ystdlib/error_handling/CMakeLists.txt
- CMakeLists.txt
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}
: - Preferfalse == <expression>
rather than!<expression>
.
src/ystdlib/error_handling/test/test_Result.cpp
src/ystdlib/error_handling/Result.hpp
🧬 Code Graph Analysis (1)
src/ystdlib/error_handling/test/test_Result.cpp (1)
src/ystdlib/error_handling/Result.hpp (1)
success
(29-29)
🔇 Additional comments (14)
taskfile.yaml (1)
7-7
: LGTM! Path reorganization is consistent.The utility taskfile path update aligns with the broader reorganization moving utilities under the
exports
directory structure.taskfiles/lint-yaml.yaml (1)
27-27
: LGTM! Lint configuration path update is consistent.The yamllint configuration path update follows the same exports directory reorganization pattern seen across other files.
taskfiles/build.yaml (1)
13-13
: LGTM! Task namespace reorganization is systematic.The utility task references have been consistently updated to use the new hierarchical namespace structure (e.g.,
:utils:cmake:build
instead of:utils:cmake-build
). This reorganization is applied systematically across all cmake-related tasks.Also applies to: 24-24, 52-52, 62-62
taskfiles/lint-venv.yaml (1)
18-18
: LGTM! Logical namespace grouping improves organization.The task references have been updated to use more logical namespace groupings (
:utils:checksum:validate
,:utils:misc:create-venv
, etc.). This reorganization enhances task discoverability and organization.Also applies to: 23-23, 29-29
src/ystdlib/error_handling/test/test_Result.cpp (1)
53-54
: LGTM! Macro usage correctly updated for void return types.The migration from
YSTDLIB_ERROR_HANDLING_TRYV
toYSTDLIB_ERROR_HANDLING_TRY
followed byreturn success()
is correct for these functions that returnResult<void>
.Also applies to: 77-78, 116-117
src/ystdlib/error_handling/Result.hpp (4)
6-9
: LGTM! Clean transition to Boost.Outcome headers.The header includes have been properly updated from the generic
outcome
library to the Boost.Outcome equivalents. All necessary headers are included for the functionality used in this file.
23-23
: LGTM! Correct namespace usage for Boost.Outcome.The Result alias has been properly updated to use
BOOST_OUTCOME_V2_NAMESPACE::std_result
, which is the correct way to reference Boost.Outcome types.
29-30
: LGTM! Consistent namespace usage in success function.The success function implementation correctly uses the Boost.Outcome namespace, maintaining consistency with the alias definition above.
45-45
: LGTM! Proper macro mapping to Boost.Outcome.The macro has been correctly renamed from
YSTDLIB_ERROR_HANDLING_TRYV
toYSTDLIB_ERROR_HANDLING_TRY
and properly mapped toBOOST_OUTCOME_TRY
. This provides a clean abstraction while leveraging Boost.Outcome's implementation.taskfiles/deps.yaml (3)
27-27
: LGTM! Proper dependency update for Boost integration.The
install-all-run
task has been correctly updated to depend oninstall-boost
instead of the removedinstall-outcome
, ensuring Boost gets installed as part of the dependency installation workflow.
152-157
: LGTM! Proper CMake integration for Boost.The
boost-install
task correctly emits theBOOST_ROOT
CMake variable to the settings directory, which will allow CMake scripts to find and use the installed Boost libraries. This follows the same pattern as other dependencies.
187-246
: LGTM! Comprehensive Boost installation implementation.The
boost-download-and-install
composite task is well-structured with proper parameter documentation, variable defaults, and task decomposition. The implementation correctly handles the Boost-specific build process (bootstrap → b2 build → b2 install) and provides flexibility through configurable parameters.taskfiles/lint-cpp.yaml (2)
31-33
: LGTM! Updated parameter format for new utility task.The FLAGS parameter has been correctly changed from string to list format, and the new
INCLUDE_FILENAME_PATTERNS
andROOT_PATHS
parameters provide better control over which files to process. The anchor reference to*cpp_format_src_files
maintains consistency.
72-81
: LGTM! Comprehensive clang-tidy task update.The task has been properly updated to use the new
:utils:cpp-lint:clang-tidy-find
namespace with well-structured parameters. The FLAGS, INCLUDE_PATTERNS, and OUTPUT_DIR parameters provide good control over the static analysis process.
@@ -58,53 +56,190 @@ tasks: | |||
internal: true | |||
run: "once" | |||
cmds: | |||
- task: ":utils:cmake-install-remote-tar" | |||
- task: ":utils:cmake:install-remote-tar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify updated utility task namespace.
The task reference has been updated to use the new :utils:cmake:install-remote-tar
namespace. Ensure this utility task exists at the new location.
🏁 Script executed:
#!/bin/bash
# Description: Verify the new utility task namespace exists
# Expected: Find the cmake:install-remote-tar task definition
rg -n "install-remote-tar" tools/yscope-dev-utils/ -A 5 -B 2 || echo "Task not found"
Length of output: 99
🏁 Script executed:
#!/bin/bash
# Search for both hyphenated and camelCase task definitions across the repository
rg -n "install-remote-tar" -A5 -B2 || echo "Hyphenated task not found"
rg -n "installRemoteTar" -A5 -B2 || echo "CamelCase task not found"
Length of output: 675
Missing install-remote-tar
utility task definition
No matching task named install-remote-tar
(nor installRemoteTar
) was found in the repository under the utils:cmake
namespace. Please add or import the task definition so that the reference in your deps file resolves correctly.
• Location needing attention:
- taskfiles/deps.yaml:59 –
- task: ":utils:cmake:install-remote-tar"
Ensure you’ve defined this task (for example in tools/yscope-dev-utils/cmake/tasks.yaml) or corrected the namespace to an existing task.
🤖 Prompt for AI Agents
In taskfiles/deps.yaml at line 59, the task reference
":utils:cmake:install-remote-tar" points to a utility task that does not exist
in the repository. To fix this, either define the "install-remote-tar" task
under the utils:cmake namespace (for example, in
tools/yscope-dev-utils/cmake/tasks.yaml) or update the task reference to point
to an existing task with the correct namespace and name.
@@ -26,11 +26,11 @@ tasks: | |||
- "cpp-configs" | |||
- "venv" | |||
cmds: | |||
- task: ":utils:clang-format" | |||
- task: ":utils:cpp-lint:clang-format" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify updated utility task namespace.
The task reference has been updated to use the new :utils:cpp-lint:clang-format
namespace. Ensure this utility task exists at the new location and accepts the updated parameter format.
🏁 Script executed:
#!/bin/bash
# Description: Verify the new cpp-lint utility tasks exist
# Expected: Find the clang-format and clang-tidy-find task definitions
echo "=== Searching for clang-format task ==="
rg -n "clang-format:" tools/yscope-dev-utils/ -A 10 -B 2 || echo "clang-format task not found"
echo ""
echo "=== Searching for clang-tidy-find task ==="
rg -n "clang-tidy-find:" tools/yscope-dev-utils/ -A 10 -B 2 || echo "clang-tidy-find task not found"
Length of output: 447
Fix missing :utils:cpp-lint
task references
The new references to :utils:cpp-lint:clang-format
and :utils:cpp-lint:clang-tidy-find
cannot be found in tools/yscope-dev-utils/
. Please ensure these task definitions exist or update the namespace to the correct location.
• taskfiles/lint-cpp.yaml
line 29
- task: ":utils:cpp-lint:clang-format"
has no matching definition.
•taskfiles/lint-cpp.yaml
line 72 (and related clang-tidy entries):utils:cpp-lint:clang-tidy-find
not found.
Action items:
- Confirm the correct namespace/path for your
clang-format
andclang-tidy-find
tasks intools/yscope-dev-utils/
. - Either move/rename those task definitions under a
cpp-lint
folder or adjust the YAML to point to the existing task names.
🤖 Prompt for AI Agents
In taskfiles/lint-cpp.yaml at lines 29 and 72, the task references to
:utils:cpp-lint:clang-format and :utils:cpp-lint:clang-tidy-find do not match
any existing task definitions in tools/yscope-dev-utils/. Verify the actual
namespace or folder structure where these tasks are defined. Then update the
YAML to either point to the correct existing task paths or move/rename the task
definitions to match the :utils:cpp-lint namespace as referenced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
CMakeLists.txt
(1 hunks)src/ystdlib/error_handling/CMakeLists.txt
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build-ystdlib-cpp (ubuntu-22.04)
- GitHub Check: build-ystdlib-cpp (macos-15)
- GitHub Check: build-ystdlib-cpp (ubuntu-24.04)
- GitHub Check: build-ystdlib-cpp (macos-14)
- GitHub Check: lint-check (macos-15)
- GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (1)
src/ystdlib/error_handling/CMakeLists.txt (1)
10-10
: Linking to Boost header-only target is correct.Replacing
outcome::hl
withBoost::headers
aligns with the header-only nature of Boost.Outcome and will propagate include directories without requiring an actual library.
CMakeLists.txt
Outdated
find_package(Boost REQUIRED) | ||
if(Boost_FOUND) | ||
message(STATUS "Found Boost ${Boost_VERSION}.") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Pin Boost version and request headers component.
To ensure consistency with your install-boost
task (Boost 1.86.0) and enable the Boost::headers
imported target, update the find_package
call:
-find_package(Boost REQUIRED)
+find_package(Boost 1.86.0 REQUIRED COMPONENTS headers)
This guards against mismatched Boost versions and makes the header-only target available for linking.
📝 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.
find_package(Boost REQUIRED) | |
if(Boost_FOUND) | |
message(STATUS "Found Boost ${Boost_VERSION}.") | |
endif() | |
find_package(Boost 1.86.0 REQUIRED COMPONENTS headers) | |
if(Boost_FOUND) | |
message(STATUS "Found Boost ${Boost_VERSION}.") | |
endif() |
🤖 Prompt for AI Agents
In CMakeLists.txt around lines 42 to 45, the find_package call for Boost does
not specify a version or request the headers component. Update the find_package
call to require Boost version 1.86.0 and include the headers component by
changing it to find_package(Boost 1.86.0 REQUIRED COMPONENTS headers). This
ensures version consistency and makes the Boost::headers target available for
linking.
🧹 Nitpick (assertive)
Streamline the Boost_FOUND guard.
Since find_package(Boost … REQUIRED …)
will abort the configuration on failure, you can drop the if(Boost_FOUND)
block and unconditionally emit the status:
-find_package(Boost 1.86.0 REQUIRED COMPONENTS headers)
-if(Boost_FOUND)
- message(STATUS "Found Boost ${Boost_VERSION}.")
-endif()
+find_package(Boost 1.86.0 REQUIRED COMPONENTS headers)
+message(STATUS "Found Boost ${Boost_VERSION}.")
This simplifies the CMake logic.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In CMakeLists.txt around lines 42 to 45, remove the if(Boost_FOUND) conditional
block because find_package(Boost REQUIRED) already stops configuration if Boost
is not found. Instead, unconditionally call message(STATUS "Found Boost
${Boost_VERSION}.") right after find_package to simplify the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
src/ystdlib/error_handling/test/test_Result.cpp (2)
91-92
: Good fix for the return type issue.The change correctly addresses the previous issue where
success()
was being returned instead of the actual value. The new pattern properly extracts and returns the integer value from the Result.
130-131
: Good fix for the return type issue.The change correctly addresses the previous issue where
success()
was being returned instead of the actual unique_ptr value. The new pattern properly extracts and returns the unique_ptr from the Result.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/ystdlib/error_handling/Result.hpp
(3 hunks)src/ystdlib/error_handling/test/test_Result.cpp
(2 hunks)taskfiles/lint-cpp.yaml
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}
: - Preferfalse == <expression>
rather than!<expression>
.
src/ystdlib/error_handling/Result.hpp
src/ystdlib/error_handling/test/test_Result.cpp
🔇 Additional comments (5)
src/ystdlib/error_handling/Result.hpp (3)
6-9
: Include changes look correct.All necessary Boost.Outcome headers are included for the functionality used in this file.
23-23
: Namespace migration is consistent.The transition from
OUTCOME_V2_NAMESPACE
toBOOST_OUTCOME_V2_NAMESPACE
is properly applied throughout.Also applies to: 29-30
45-46
: Macro updates align with Boost.Outcome migration.The TRYV macro is correctly updated to use the Boost version, and the new TRY macro properly implements the two-parameter pattern used in the test files.
taskfiles/lint-cpp.yaml (2)
20-32
: Formatting task: concise source specification and patternsThe
cpp-format-check
task now uses{{.G_CPP_SRC_DIR}}
combined withINCLUDE_FILENAME_PATTERNS
to target files. This streamlines the previous explicit file globs while maintaining file-type restrictions. Ensure thatG_CPP_SRC_DIR
correctly references your root C++ source directory and doesn’t inadvertently include generated or third-party files.
41-47
: Fix formatting task retains appropriate patternsThe
cpp-format-fix
task correctly reuses the same include patterns and root paths, switching only theFLAGS
to["-i"]
for in-place fixes. This aligns well with the dry-run and fix modes of clang-format.
sources: &cpp_format_src_files | ||
- "{{.G_CMAKE_CACHE}}" | ||
- "{{.G_COMPILE_COMMANDS_DB}}" | ||
- "{{.G_LINT_VENV_CHECKSUM_FILE}}" | ||
- "{{.G_CPP_SRC_DIR}}/**/*.cpp" | ||
- "{{.G_CPP_SRC_DIR}}/**/*.h" | ||
- "{{.G_CPP_SRC_DIR}}/**/*.hpp" | ||
- "{{.G_CPP_SRC_DIR}}" | ||
- "{{.ROOT_DIR}}/.clang-tidy" | ||
- "{{.TASKFILE}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Separate anchors and narrow static analysis scope
The static-analysis task reuses the cpp_format_src_files
anchor for both its sources:
and as ROOT_PATHS
, but that list currently includes config and build artefacts (e.g. .clang-tidy
, compile commands DB). To prevent clang-tidy from scanning non-source files, extract a dedicated anchor for source directories only (e.g. cpp_static_src_files
) and use that in ROOT_PATHS
.
Example diff:
@@ -56,7 +56,8 @@
- sources: &cpp_format_src_files
+ sources:
+ &cpp_static_src_files
deps:
- ":build:init"
- "cpp-configs"
@@ -76,7 +77,7 @@
vars:
FLAGS:
- "--config-file '{{.ROOT_DIR}}/.clang-tidy'"
- ROOT_PATHS: *cpp_format_src_files
+ ROOT_PATHS: *cpp_static_src_files
VENV_DIR: "{{.G_LINT_VENV_DIR}}"
Also applies to: 68-79
🤖 Prompt for AI Agents
In taskfiles/lint-cpp.yaml around lines 56 to 62 and 68 to 79, the
cpp_format_src_files anchor includes config and build artifact files that should
not be scanned by clang-tidy. Create a new anchor, e.g., cpp_static_src_files,
that only lists source directories and use this new anchor for the
static-analysis task's ROOT_PATHS to narrow the analysis scope. Keep
cpp_format_src_files for formatting tasks that require the broader list.
- "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-format" | ||
- "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-tidy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify lint-config and symlink script locations
The cpp-configs
task now references tools/yscope-dev-utils/exports/lint-configs/
for .clang-format
, .clang-tidy
, and the symlink script. Please confirm these paths exist in your repository:
Also applies to: 91-91
🏁 Script executed:
#!/bin/bash
# Verify lint config files and script exist
ls -l tools/yscope-dev-utils/exports/lint-configs/{.clang-format,.clang-tidy,symlink-cpp-lint-configs.sh}
Length of output: 520
🏁 Script executed:
#!/bin/bash
# Locate .clang-format, .clang-tidy, and symlink script anywhere in the repo
find . -type f \( -name ".clang-format" -o -name ".clang-tidy" -o -name "symlink-cpp-lint-configs.sh" \) -print
echo "---- Exports directory contents ----"
find tools/yscope-dev-utils/exports -maxdepth 5 -type f -print
Length of output: 343
Update lint-config and symlink script paths in taskfiles/lint-cpp.yaml
The tools/yscope-dev-utils/exports/lint-configs/
directory doesn’t exist in the repo. We only have src/.clang-format
(no .clang-tidy
or symlink script in that location). Please correct the file references:
• In taskfiles/lint-cpp.yaml
, lines 83–84:
- "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-format"
- "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/.clang-tidy"
+ "{{.ROOT_DIR}}/src/.clang-format"
+ "{{.ROOT_DIR}}/src/.clang-tidy" # update if .clang-tidy lives elsewhere
• At line 91 (symlink script):
- "{{.ROOT_DIR}}/tools/yscope-dev-utils/exports/lint-configs/symlink-cpp-lint-configs.sh"
+ "{{.ROOT_DIR}}/<correct-path>/symlink-cpp-lint-configs.sh" # adjust or remove if not present
If .clang-tidy
or symlink-cpp-lint-configs.sh
are intended to live in a different directory, please add them there or update these references accordingly.
🤖 Prompt for AI Agents
In taskfiles/lint-cpp.yaml at lines 83-84 and line 91, the paths referencing
tools/yscope-dev-utils/exports/lint-configs/ for .clang-format, .clang-tidy, and
the symlink-cpp-lint-configs.sh script are incorrect because this directory does
not exist in the repository. Update these file references to point to the
correct existing locations, such as src/.clang-format for the clang-format file,
and either remove or correct the paths for .clang-tidy and the symlink script
based on their actual locations or add those files to the expected directory if
needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
lint-requirements.txt
(1 hunks)src/ystdlib/error_handling/ErrorCode.hpp
(1 hunks)src/ystdlib/error_handling/Result.hpp
(3 hunks)src/ystdlib/error_handling/test/test_Result.cpp
(3 hunks)src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}
: - Preferfalse == <expression>
rather than!<expression>
.
src/ystdlib/error_handling/test/test_Result.cpp
src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp
src/ystdlib/error_handling/ErrorCode.hpp
src/ystdlib/error_handling/Result.hpp
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: lint-check (ubuntu-24.04)
- GitHub Check: lint-check (macos-15)
- GitHub Check: build-ystdlib-cpp (macos-15)
- GitHub Check: build-ystdlib-cpp (ubuntu-22.04)
- GitHub Check: build-ystdlib-cpp (ubuntu-24.04)
- GitHub Check: build-ystdlib-cpp (macos-14)
🔇 Additional comments (4)
src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp (1)
7-169
: Good practice: Added anonymous namespace for test cases.Wrapping test cases in an anonymous namespace ensures internal linkage and prevents symbol collisions across translation units.
src/ystdlib/error_handling/test/test_Result.cpp (1)
91-92
: Correct adaptation to new TRY macro.The migration from
YSTDLIB_ERROR_HANDLING_TRYX
toYSTDLIB_ERROR_HANDLING_TRY
with explicit value binding is implemented correctly. The pattern properly captures the result and returns it, maintaining the expected return types.Also applies to: 130-131
src/ystdlib/error_handling/ErrorCode.hpp (1)
90-90
: Style improvement: Conventional specifier ordering.Using
static constexpr
follows the more common C++ convention for specifier ordering.src/ystdlib/error_handling/Result.hpp (1)
4-7
:✅ Verification successful
Complete migration to boost::outcome.
The migration from the standalone outcome library to boost::outcome is implemented correctly with all namespace and macro references properly updated.
Run the following script to verify boost::outcome headers are accessible:
Also applies to: 22-22, 28-29, 44-45
🏁 Script executed:
#!/bin/bash # Description: Verify boost outcome headers exist and check for any remaining references to old outcome library # Check if boost outcome headers exist in common locations fd -t f "outcome.hpp" -E "*/boost/*" || echo "No non-boost outcome headers found (good)" # Search for any remaining references to non-boost outcome rg "OUTCOME_V2_NAMESPACE" --glob "!*.md" --glob "!**/boost/**" || echo "No references to OUTCOME_V2_NAMESPACE found (good)" # Verify boost headers are referenced consistently rg -A 2 "#include.*boost/outcome" --glob "*.hpp" --glob "*.cpp"Length of output: 902
Migration to boost::outcome verified – no remaining standalone outcome references
All checks pass and the migration is complete:
boost/outcome/*.hpp
headers are correctly included.- No non-boost Outcome headers remain.
- References to
BOOST_OUTCOME_V2_NAMESPACE
are deliberate and come from Boost.Outcome’s configuration.No further changes required.
@@ -1,7 +1,7 @@ | |||
# Lock to v19.x until we can upgrade our code to fix new v20 issues. | |||
clang-format~=19.1 | |||
clang-format>=20.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Update comment to reflect new clang-format constraint.
The comment immediately above line 2 still reads “Lock to v19.x until we can upgrade our code to fix new v20 issues.” but the requirement now allows clang-format >=20.1.0. Please update or remove the comment so it accurately describes the policy. For example:
-# Lock to v19.x until we can upgrade our code to fix new v20 issues.
+# Allow clang-format >=20.1.0; ensure code is updated for v20 formatting rules.
📝 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.
clang-format>=20.1.0 | |
# Allow clang-format >=20.1.0; ensure code is updated for v20 formatting rules. | |
clang-format>=20.1.0 |
🤖 Prompt for AI Agents
In lint-requirements.txt at line 2, update or remove the comment above the
clang-format version requirement to reflect the new constraint of clang-format
>=20.1.0. Ensure the comment no longer states locking to v19.x and instead
accurately describes the current version policy or is removed if no longer
relevant.
# Lock to v19.x until we can upgrade our code to fix new v20 issues. | ||
clang-tidy~=19.1 | ||
clang-tidy>=19.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Align comment with clang-tidy requirement.
The comment above line 4 still mentions locking to v19.x, yet the version constraint permits clang-tidy >=19.1.0. Please update or remove that comment to match the new minimum version. For example:
-# Lock to v19.x until we can upgrade our code to fix new v20 issues.
+# Allow clang-tidy >=19.1.0; update code to satisfy newer lint checks.
📝 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.
clang-tidy>=19.1.0 | |
-# Lock to v19.x until we can upgrade our code to fix new v20 issues. | |
+# Allow clang-tidy >=19.1.0; update code to satisfy newer lint checks. | |
clang-tidy>=19.1.0 |
🤖 Prompt for AI Agents
In lint-requirements.txt at line 4, the comment above the clang-tidy version
requirement is outdated as it mentions locking to v19.x, but the version
constraint now allows clang-tidy >=19.1.0. Update or remove the comment to
accurately reflect the new minimum version requirement, ensuring it aligns with
the version constraint specified on line 4.
Description
Install
outcome
andquickcpplib
from Boost's components.Checklist
breaking change.
Validation performed
Summary by CodeRabbit