-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Replace outcome
with Boost's version of outcome
to remove dependence on 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
Conversation
WalkthroughThe changes remove the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant BuildSystem
participant Boost
participant Boost.Outcome
Developer->>BuildSystem: Trigger build
BuildSystem->>Boost: Install Boost 1.87.0
BuildSystem->>CMake: find_package(Boost)
CMake->>Boost.Outcome: Use Boost.Outcome headers
BuildSystem->>Application: Link against Boost::headers
Application->>Boost.Outcome: Use Result, macros, etc.
Possibly related PRs
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.
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.
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.
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.
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.
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: 3
🔭 Outside diff range comments (1)
taskfiles/deps.yaml (1)
157-216
: 🧹 Nitpick (assertive)Orchestrate the full download-to-install pipeline
Theboost-download-and-install
composite task cleanly chains download, generate, build, and install steps with sensible defaults and SHA-256 verification. As an improvement, you could add an optional cleanup step to remove the extracted source directory after installation, and ensure failures in each subtask halt the pipeline early.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
taskfiles/deps.yaml
(2 hunks)taskfiles/lint-cpp.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build-ystdlib-cpp (macos-15)
- GitHub Check: build-ystdlib-cpp (macos-14)
🔇 Additional comments (3)
taskfiles/lint-cpp.yaml (1)
23-23
: Simplify the formatting sources anchor
Relying onINCLUDE_FILENAME_PATTERNS
to filter{{.G_CPP_SRC_DIR}}
reduces duplication of patterns and keeps the anchor concise. Looks good.taskfiles/deps.yaml (2)
25-25
: Hookinstall-boost
into the parallel install workflow
Addinginstall-boost
toinstall-all-parallel
ensures Boost is fetched alongside the other dependencies. This satisfies the PR objective to replace the separate Outcome and QuickCPPLib steps.
79-99
: Define the Boost build step clearly
Theboost-build
task is concise and usesJOBS
for concurrency. You could similarly add arequires: vars: ["SOURCE_DIR"]
stanza to guard against misuse, but the current form is functional.
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.
We should also update this line to replace outcome
with boost
:
Line 9 in 3fbc72e
- Regex: "<(catch2|outcome)" |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/ystdlib/error_handling/Result.hpp
(4 hunks)taskfiles/deps.yaml
(2 hunks)taskfiles/lint-cmake.yaml
(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/Result.hpp
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: lint-check (ubuntu-24.04)
- GitHub Check: lint-check (macos-15)
🔇 Additional comments (9)
taskfiles/lint-cmake.yaml (2)
18-21
: Approve exclusion of CLion build directories
Adding**/cmake-build-*
to the linter’s source exclusions ensures that CLion-generated build folders are skipped, preventing spurious lint errors.
54-61
: Approve updating prune paths in lint command
Including-o -path '**/cmake-build-*'
in thefind
prune expression aligns runtime behavior with the source filters, ensuring generated build directories are not linted.src/ystdlib/error_handling/Result.hpp (5)
4-7
: Transition to Boost.Outcome includes
The include directives have been correctly updated to pull in Boost.Outcome headers (config.hpp
,std_result.hpp
,success_failure.hpp
,try.hpp
). This ensures compatibility with the new error-handling dependency.
22-22
: Update Result alias to use Boost.Outcome
TheResult
alias now correctly referencesBOOST_OUTCOME_V2_NAMESPACE::std_result
, integrating Boost.Outcome’sstd_result
type.
28-30
: Inlinesuccess()
function adjusted
Thesuccess()
helper returns a Boost.Outcomesuccess_type<void>
, matching the new alias semantics.
45-48
: DefineYSTDLIB_ERROR_HANDLING_TRYX
macro
Guarding the macro definition onBOOST_OUTCOME_TRYX
avoids compilation errors when the TRYX extension isn’t available.
62-62
: DefineYSTDLIB_ERROR_HANDLING_TRYV
macro
Mapping directly toBOOST_OUTCOME_TRYV
is acceptable, as this macro is provided by the required Boost version.taskfiles/deps.yaml (2)
23-24
: Boost task integrated into install-all-parallel
Replacing the separateinstall-outcome
/install-quickcpplib
tasks withinstall-boost
ininstall-all-parallel
ensures Boost is installed as part of the dependency pipeline.
57-76
: Skip refining internal documentation comments
These added comment blocks document the Boost task internals; no action needed at this time.
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 (3)
taskfiles/deps.yaml (3)
38-55
: 🧹 Nitpick (assertive)Use shared variables for Boost paths
Theinstall-boost
task hardcodesWORK_DIR: "{{.G_DEPS_DIR}}/boost"
. For consistency with other dependencies, consider definingG_BOOST_LIB_NAME: "boost"
andG_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"
in thevars:
section and referencing them here.
64-76
: 🛠️ Refactor suggestionAdd explicit
requires
block toboost-generate
To catch missing parameters early and prevent confusing failures, declare the required variables at the top of the task:boost-generate: internal: true requires: vars: ["SOURCE_DIR", "INSTALL_PREFIX", "TARGETS"] dir: "{{.SOURCE_DIR}}" cmds: …
118-126
: 🧹 Nitpick (assertive)Centralize CMake settings injection
Rather than embedding a multi-lineecho
with complex quoting, use the existingadd-package-root-to-cmake-settings
helper to emitBOOST_ROOT
into your CMake settings, improving consistency and maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
taskfiles/deps.yaml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build-ystdlib-cpp (macos-15)
- GitHub Check: lint-check (ubuntu-24.04)
- GitHub Check: lint-check (macos-15)
🔇 Additional comments (4)
taskfiles/deps.yaml (4)
23-23
: Hook Boost into the parallel install workflow
Replacinginstall-outcome
andinstall-quickcpplib
withinstall-boost
aligns with the PR objective. Ensure no stray references to the old tasks remain elsewhere.
112-117
: Approveb2 install
invocation
The./b2 install
command and its support forEXTRA_ARGS
are correct.
184-192
: Verify existence of the download utility
The task depends on:utils:remote:download-and-extract-tar
. Ensure this helper is defined in yourutils
namespace or update the namespace if it lives under:utils:cmake
.
193-214
: Approve Boost task chaining
The sequence ofboost-generate
,boost-build
, andboost-install
correctly implements the download-build-install workflow. The passthrough ofGEN_ARGS
,BUILD_ARGS
, andINSTALL_ARGS
looks sound.
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.
For the PR title, how about:
feat: Replace `outcome` with Boost's version of `outcome` to remove dependence on `quickcpplib`.
install-boost
instead of install-outcome
and install-quickcpplib
.outcome
with Boost's version of outcome
to remove dependence on quickcpplib
.
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
🔭 Outside diff range comments (2)
taskfiles/deps.yaml (2)
38-49
: 🧹 Nitpick (assertive)Introduce
G_BOOST_LIB_NAME
andG_BOOST_WORK_DIR
for consistency.Define top-level variables for Boost alongside Catch2 to avoid hardcoded paths:
vars: G_CATCH2_LIB_NAME: "Catch2" G_CATCH2_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_CATCH2_LIB_NAME}}" + G_BOOST_LIB_NAME: "boost" + G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"And reference them in the task:
- WORK_DIR: "{{.G_DEPS_DIR}}/boost" + WORK_DIR: "{{.G_BOOST_WORK_DIR}}"
38-49
: 🧹 Nitpick (assertive)Emit
BOOST_ROOT
to CMake settings after installation.To allow CMake to locate the installed Boost, chain in the
add-package-root-to-cmake-settings
helper:cmds: - task: ":utils:boost:download-and-install" vars: … + - task: ":utils:cmake:add-package-root-to-cmake-settings" + vars: + NAME: "{{.G_BOOST_LIB_NAME}}" + INSTALL_PREFIX: "{{.G_BOOST_WORK_DIR}}/boost-install"
♻️ Duplicate comments (2)
CMakeLists.txt (2)
57-59
: Streamline theBoost_FOUND
guard.Since
find_package(Boost … REQUIRED)
already stops configuration on failure, theif(Boost_FOUND)
block is redundant. You can unconditionally log the status:-find_package(Boost 1.87.0 REQUIRED COMPONENTS headers) -if(Boost_FOUND) - message(STATUS "Found Boost ${Boost_VERSION}.") -endif() +find_package(Boost 1.87.0 REQUIRED COMPONENTS headers) +message(STATUS "Found Boost ${Boost_VERSION}.")
56-56
: 🛠️ Refactor suggestionPin Boost version and request headers component.
To ensure consistent builds and availability of the header-only target, specify the Boost version you install (1.87.0) and request the
headers
component:-find_package(Boost REQUIRED) +find_package(Boost 1.87.0 REQUIRED COMPONENTS headers)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
CMakeLists.txt
(1 hunks)src/.clang-format
(1 hunks)src/ystdlib/error_handling/Result.hpp
(4 hunks)taskfiles/deps.yaml
(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/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-24.04)
- GitHub Check: build-ystdlib-cpp (ubuntu-22.04)
- GitHub Check: build-ystdlib-cpp (macos-14)
🔇 Additional comments (6)
src/.clang-format (1)
9-10
: Approve update to include regex for Boost headers.The regex has been correctly updated from
<outcome>
to<boost>
, ensuring Boost headers are classified in the intended include category.taskfiles/deps.yaml (1)
21-25
: LGTM: Wiredinstall-boost
into parallel install workflow.The new
install-boost
dependency replaces the old outcome/quickcpplib tasks ininstall-all-parallel
, aligning with the PR’s goal to unify dependency installation under Boost.src/ystdlib/error_handling/Result.hpp (4)
6-9
: Approve Boost.Outcome header replacements.All
outcome
includes have been correctly updated to<boost/outcome/...>
and cover the needed config, core, and macro headers.
23-23
: Approve updatedResult
alias.The alias now correctly uses
BOOST_OUTCOME_V2_NAMESPACE::std_result
, aligning with Boost.Outcome’s API.
29-31
: Approvesuccess()
wrapper update.The inline
success()
function correctly delegates to Boost.Outcome’ssuccess_type<void>
and macro.
46-49
: ApproveTRYX
macro redefinition.The conditional definition of
YSTDLIB_ERROR_HANDLING_TRYX
toBOOST_OUTCOME_TRYX
aligns with the move to Boost.Outcome.
- task: ":utils:boost:download-and-install" | ||
vars: |
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 :utils:boost:download-and-install
utility task exists.
Ensure the referenced Boost install helper is present in the yscope-dev-utils
repo so this task resolves:
🏁 Script executed:
#!/bin/bash
# Check for the download-and-install task under utils:boost
rg -n "download-and-install" -A3 -B3 -g "tools/yscope-dev-utils/**/*boost*" .
Length of output: 77
Let’s locate the yscope-dev-utils
directory and search the entire repo for any download-and-install
references.
🏁 Script executed:
#!/bin/bash
# Locate the yscope-dev-utils directory
fd -t d yscope-dev-utils . || echo "yscope-dev-utils directory not found"
# Search for any occurrences of download-and-install across the repo
rg -n "download-and-install" -A3 -B3 .
Length of output: 530
Let’s search directly inside the tools/yscope-dev-utils
directory for any download-and-install
task definitions:
🏁 Script executed:
#!/bin/bash
# Search for download-and-install within yscope-dev-utils
rg -n "download-and-install" -A3 -B3 tools/yscope-dev-utils/
Length of output: 60
Missing :utils:boost:download-and-install
task definition
The task referenced in taskfiles/deps.yaml
(lines 42–43) was not found under tools/yscope-dev-utils
. Please ensure the Boost download-and-install helper is defined or update the task reference accordingly.
• Location: taskfiles/deps.yaml:42–43
• Action: add the download-and-install
task under utils:boost
in tools/yscope-dev-utils
or correct the task name/path.
🤖 Prompt for AI Agents
In taskfiles/deps.yaml at lines 42 to 43, the referenced task
":utils:boost:download-and-install" does not exist in the tools/yscope-dev-utils
directory. To fix this, either add the missing "download-and-install" task
definition under the utils:boost namespace in tools/yscope-dev-utils or update
the task reference in deps.yaml to point to an existing valid task name and
path.
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.
there is a tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml
, and the L128 is where defines download-and-install
.
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.
🧩 Analysis chain
@anlowee Thank you for the clarification! You're absolutely right - I can see that the download-and-install
task is indeed defined in tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml
. The verification agent's search didn't find it initially, but your specific path reference confirms the task exists and is properly defined. The task reference in taskfiles/deps.yaml
is therefore correct and should work as expected.
🐰✨
( •.•)
> 📚 taking notes
🏁 Script executed:
#!/bin/bash
# Check if the boost.yaml file exists at the specified location
ls -la "tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml"
# Search for the download-and-install task definition around line 128
sed -n '125,135p' "tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml"
# Also search for download-and-install task in the entire file
rg -n "download-and-install" "tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml"
Length of output: 533
@anlowee I need to locate the correct path for the boost.yaml file. The specific path you mentioned (tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml
) doesn't exist in the current repository structure. Let me search for where the boost.yaml file and the download-and-install
task definition are actually located so we can verify the task reference is correct.
🏁 Script executed:
#!/bin/bash
# Search for any boost.yaml files in the entire repository
fd -t f "boost.yaml" .
# Search for any files containing "download-and-install" task definition
rg -l "download-and-install" .
# Look at the structure of the yscope-dev-utils directory
find tools/yscope-dev-utils -type f -name "*.yaml" | head -20
# Search specifically for boost-related files in yscope-dev-utils
find tools/yscope-dev-utils -type f -name "*boost*"
# Search for any references to download-and-install in the entire repository
rg -n "download-and-install" --type yaml .
Length of output: 311
@anlowee I've searched the entire repository structure, and the results show that the :utils:boost:download-and-install
task definition is indeed missing:
- No
boost.yaml
files exist anywhere in the repository - The
tools/yscope-dev-utils
directory contains no YAML files at all - The only reference to
download-and-install
is the task call itself intaskfiles/deps.yaml
line 42
The original CodeRabbit verification agent was correct in flagging this as an issue. The download-and-install
task under :utils:boost
namespace doesn't exist in the current repository state.
To resolve this, you would need to either:
- Add the missing
download-and-install
task definition to the appropriate location inyscope-dev-utils
- Update the task reference in
deps.yaml
to use an existing task - Ensure the
yscope-dev-utils
submodule/dependency includes the required boost utilities
Could you check if perhaps the yscope-dev-utils
needs to be updated or if the task should be defined differently?
🐰🔍
( o.o)
> 🔎 searching thoroughly
✏️ Learnings added
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.860Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
Co-authored-by: kirkrodrigues <[email protected]>
Co-authored-by: kirkrodrigues <[email protected]>
Co-authored-by: kirkrodrigues <[email protected]>
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: 1
🔭 Outside diff range comments (1)
taskfiles/deps.yaml (1)
3-6
: 🛠️ Refactor suggestionDefine reusable Boost variables for consistency.
To align with existing patterns, add
G_BOOST_LIB_NAME
andG_BOOST_WORK_DIR
in thevars
section, and referenceG_BOOST_WORK_DIR
in theinstall-boost
task. This avoids hardcoded paths and maintains consistency:vars: G_CATCH2_LIB_NAME: "Catch2" G_CATCH2_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_CATCH2_LIB_NAME}}" + G_BOOST_LIB_NAME: "boost" + G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
src/.clang-format
(1 hunks)taskfiles/deps.yaml
(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
taskfiles/deps.yaml (1)
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.860Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
🪛 GitHub Actions: code-linting-checks
taskfiles/deps.yaml
[error] 46-46: Failed to parse YAML file due to unknown escape character at line 46.
🪛 GitHub Actions: unit-tests
taskfiles/deps.yaml
[error] 46-46: YAML parsing error: found unknown escape character at line 46.
🔇 Additional comments (4)
src/.clang-format (1)
9-9
: Correct grouping for Boost and Catch2 headers.The updated regex
<(boost|catch2)
at priority 4 ensures that Boost and Catch2 includes are sorted into the intended category, reflecting the migration from standalone Outcome to Boost.Outcome.taskfiles/deps.yaml (3)
23-23
: New dependency integration is correct.Adding
install-boost
toinstall-all-parallel
ensures Boost is installed alongside Catch2 in the aggregated dependency workflow.
38-38
: Confirminstall-boost
task placement.The new
install-boost
task follows the pattern of existing tasks (e.g.,install-Catch2
) and is correctly declared asinternal: true
withrun: "once"
. No changes needed here.
42-43
: The:utils:boost:download-and-install
utility task reference appears correct based on existingyscope-dev-utils
exports. No action 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: 1
♻️ Duplicate comments (1)
taskfiles/deps.yaml (1)
45-49
: 🛠️ Refactor suggestion
⚠️ Potential issueFix YAML syntax for URL and centralize Boost path variables
The URL is split across lines with a backslash, causing a YAML parsing error. Collapse it into a single string or use a folded scalar. Also, define and useG_BOOST_LIB_NAME
/G_BOOST_WORK_DIR
in thevars
section to avoid hard-coding paths:--- a/taskfiles/deps.yaml +++ b/taskfiles/deps.yaml @@ vars: + G_BOOST_LIB_NAME: "boost" + G_BOOST_WORK_DIR: "{{.G_DEPS_DIR}}/{{.G_BOOST_LIB_NAME}}" @@ install-boost cmds vars: - FILE_SHA256: "d6c69e4459eb5d6ec208250291221e7ff4a2affde9af6e49c9303b89c687461f" - URL: "https://github.com/boostorg/boost/releases/download/boost-1.87.0\ - /boost-1.87.0-b2-nodocs.tar.gz" - TARGETS: ["headers"] - WORK_DIR: "{{.G_DEPS_DIR}}/boost" + FILE_SHA256: "d6c69e4459eb5d6ec208250291221e7ff4a2affde9af6e49c9303b89c687461f" + URL: "https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-b2-nodocs.tar.gz" + TARGETS: ["headers"] + WORK_DIR: "{{.G_BOOST_WORK_DIR}}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
taskfiles/deps.yaml
(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
taskfiles/deps.yaml (1)
Learnt from: anlowee
PR: y-scope/ystdlib-cpp#62
File: taskfiles/deps.yaml:42-43
Timestamp: 2025-05-31T00:44:47.860Z
Learning: The `:utils:boost:download-and-install` task is defined in `tools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml` at around line 128, providing Boost installation functionality for the project's dependency management.
🔇 Additional comments (1)
taskfiles/deps.yaml (1)
42-43
: Validate Boost download utility task and CMake settings injection
This task references:utils:boost:download-and-install
. Based on your learnings, it exists intools/yscope-dev-utils/exports/taskfiles/utils/boost.yaml
. Please confirm that this helper is available in CI and that it emitsBOOST_ROOT
into the CMake settings (viaadd-package-root-to-cmake-settings
or built-in logic) so Boost can be found by downstream CMake scripts.
@@ -24,8 +20,8 @@ tasks: | |||
install-all-parallel: | |||
internal: true | |||
deps: | |||
- "install-boost" |
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.
🧹 Nitpick (assertive)
Integrate Boost into parallel dependency installation
The PR correctly adds install-boost
to the install-all-parallel
workflow, replacing the removed standalone Outcome tasks. Ensure downstream CI/CMake configurations pick up this new dependency. For consistency, you may alphabetize the deps
list.
🤖 Prompt for AI Agents
In taskfiles/deps.yaml at line 23, add "install-boost" to the
install-all-parallel dependency list to integrate Boost installation into the
parallel workflow. After adding, alphabetize the entire deps list for
consistency. Also, verify that downstream CI and CMake configurations are
updated to recognize and use this new Boost dependency.
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.
lgtm.
Description
Install
outcome
andquickcpplib
from Boost's components.Checklist
breaking change.
Validation performed
Summary by CodeRabbit