Skip to content

Conversation

@Bill-hbrhbr
Copy link
Contributor

@Bill-hbrhbr Bill-hbrhbr commented Oct 3, 2025

Description

To address #1477, we split each library install task into its own file inside taskfiles/deps/installs. In addition, we also group tasks for each major target into respective files. So far the major targets are core, log-viewer and spider.

Other than the structural copy-paste refactoring, this PR also includes several one big and several small adjustments.

Big adjustment:

  • antlr-runtime has been modified to be installable via utils:install-remote-cmake-lib. Instead of extracting the downloaded tar and removing the external layers outside the Cpp directory, we directly specify the directory where CMakelists.txt lives.

Small adjustments:

  • deps:core and deps:spider-dep no longer resets the cmake settings directory, which is already done by yscope-dev-utils:cmake:install-deps-and-generate-settings
  • The deps: sections of deps:<target>-all-parallel now iterate over list variables.
    • Easier to add common arguments to deps tasks in the future.
    • Easier to perform additional actions on libraries before/after the actual lib install tasks.
    • Similar adjustments have been made to deps: sections of lib install tasks that depend on other libraries.
  • The utils:init task has been moved into main.yaml.
  • Tasks prefixed with utils: and yscope-dev-utils: inside some taskfiles are now prefixed with a leading colon (:) to align with updated namespaces.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Existing workflows pass after refactorizations.

Summary by CodeRabbit

  • Chores
    • Reorganized and centralized dependency orchestration for more reliable initialisation and checksum handling.
    • Modularised workflows to enable parallel per-dependency generation/install flows and clearer platform checks.
    • Added automated install workflows for numerous third‑party libraries and tools, with integrity verification and reusable install steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Introduces modular YAML taskfiles for C++ dependency installs and orchestration: new per-library install taskfiles, a registry mapping, refactored main/core/spider workflows that centralize init/dirs/checksum handling, and parallel per-dependency task expansion via internal "*-all-parallel" tasks.

Changes

Cohort / File(s) Summary
Orchestration & Core workflows
taskfiles/deps/main.yaml, taskfiles/deps/core.yaml, taskfiles/deps/spider.yaml
Add/replace orchestration: centralized :init (run: "once"), directory creation for G_DEPS_DIR/G_DEPS_CPP_DIR/G_DEPS_CPP_CHECKSUMS_DIR, core task that runs init → clean outdated C++ checksum files → install/generate settings (with CMAKE_SETTINGS_DIR/FILE) → combine checksums, and internal parallel expansion tasks (e.g., core-all-parallel, spider-all-parallel) that iterate over CPP task lists to invoke per-item :<item> tasks.
Utilities & helpers
taskfiles/deps/utils.yaml, taskfiles/deps/log-viewer.yaml
Remove yscope-dev-utils from public includes; convert task references to colon-prefixed internal names (e.g., :yscope-dev-utils:...); make clean-outdated-cpp-checksum-files run once; add/adjust steps for install helpers and checksum/file flags used by installs.
Install registry
taskfiles/deps/installs/all.yaml
New registry mapping listing ~23 third-party dependencies to their respective install YAML taskfile paths.
Library installs — homogeneous patterns
taskfiles/deps/installs/...
taskfiles/deps/installs/{absl,catch2,date,fmt,lz4,liblzma,nlohmann_json,simdjson,sqlite3,utfcpp,yaml-cpp,zlib,zstd,boost,microsoft.gsl,mongocxx}
Add per-library taskfiles (internal, run: once) that delegate to a reusable :utils:install-remote-cmake-lib or similar helper with library-specific CMAKE_GEN_ARGS, LIB_NAME, TARBALL_URL, and TARBALL_SHA256. Some create CMake settings files or perform extraction+symlink steps (e.g., sqlite3, utfcpp).
Library installs — dependency-aware / iterative installs
taskfiles/deps/installs/{msgpack-cxx,spdlog,ystdlib,log-surgeon}
Add installs that declare DEPS lists and iterate to invoke prerequisite per-item tasks (via :... task invocation) before or as part of the install step.
Special installs
taskfiles/deps/installs/antlr-jar.yaml, taskfiles/deps/installs/antlr-runtime.yaml, taskfiles/deps/installs/mariadb-connector-cpp.yaml, taskfiles/deps/log-viewer.yaml
Add single-file download (ANTLR jar) via remote curl helper; ANTLR runtime and mariadb connector via remote CMake helper (mariadb restricted to Ubuntu); log-viewer defined as a tar download with checksum validation.
Removed / retired per-component tasks
taskfiles/deps/...
Numerous previous per-component task graphs removed or consolidated under the new :init/install registry approach; G_DEPS_LOG_VIEWER_CHECKSUM_FILE public var removed, G_DEPS_CPP_CHECKSUMS_DIR added.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer/Invoker
  participant Main as deps:core / deps:spider
  participant Init as :init
  participant Clean as :utils:clean-outdated-cpp-checksum-files
  participant InstallGen as :utils:install-deps-and-generate-settings
  participant Combine as :utils:combine-cpp-checksums
  participant Parallel as core-all-parallel / spider-all-parallel
  participant Item as :<per-item>

  Dev->>Main: run core (or spider)
  Main->>Init: depend -> run once
  Main->>Clean: run once
  Main->>InstallGen: install/generate settings (CMAKE_SETTINGS_DIR/FILE)
  InstallGen->>Combine: write/emit per-lib checksum files
  Combine->>Main: combined checksum
  Main->>Parallel: trigger internal parallel task (run: once)
  Parallel->>Item: for each CPP_*_TASKS -> invoke :<item>
  Item-->>Parallel: done
  Parallel-->>Main: all per-item tasks invoked
  Main-->>Dev: complete
Loading

Notes: diagram focuses on primary control flow for core/spider orchestration: init → clean → install/generate → combine → parallel per-item expansion.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Rationale: Many new, mostly-homogeneous install files reduce per-file complexity, but orchestration changes (main/utils/core/spider), checksum handling, colon-prefixed refactors, platform preconditions, and dependency iteration require careful verification of control flow, URLs/SHA256, and interaction order.

Possibly related issues

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title accurately reflects the main changes in the changeset. It identifies the two primary objectives: splitting the monolithic dependency taskfile into category-specific modules (core.yaml, log-viewer.yaml, spider.yaml, and numerous files under taskfiles/deps/installs/) and migrating antlr-runtime and utfcpp to use the utils:install-remote-cmake-lib utility. The title is specific and descriptive, clearly communicating the refactoring work and targeted library migrations without vague language. The content aligns well with the raw summary and PR objectives provided.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Bill-hbrhbr Bill-hbrhbr changed the title refactor(taskfile): Modularize deps tasks. refactor(taskfile): Split dependency installation tasks into modular categorized taskfiles. Oct 5, 2025
@Bill-hbrhbr Bill-hbrhbr changed the title refactor(taskfile): Split dependency installation tasks into modular categorized taskfiles. refactor(taskfile): Split main dependency Taskfile into category-specific modules. Oct 5, 2025
@Bill-hbrhbr Bill-hbrhbr marked this pull request as ready for review October 5, 2025 09:48
@Bill-hbrhbr Bill-hbrhbr requested a review from a team as a code owner October 5, 2025 09:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
taskfile.yaml (1)

130-162: Restore the dependency on the Spider build task.

deps:spider:spider-dep stops after installing Spider’s prerequisites; it never runs the spider build that produces {{.G_SPIDER_BUILD_DIR}}/spider-build/src/spider/spider_scheduler and spider_worker. The rsync in the package recipe will therefore fail with missing inputs. Please depend on the full Spider build (e.g., deps:spider) so these binaries exist before packaging.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 212200a and 9160b55.

📒 Files selected for processing (8)
  • taskfile.yaml (1 hunks)
  • taskfiles/deps/cmake-libs.yaml (1 hunks)
  • taskfiles/deps/core.yaml (1 hunks)
  • taskfiles/deps/log-viewer.yaml (1 hunks)
  • taskfiles/deps/main.yaml (1 hunks)
  • taskfiles/deps/misc-libs.yaml (1 hunks)
  • taskfiles/deps/spider.yaml (1 hunks)
  • taskfiles/deps/utils.yaml (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
PR: y-scope/clp#925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.

Applied to files:

  • taskfiles/deps/misc-libs.yaml
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: package-image
  • GitHub Check: musllinux_1_2-x86_64-static-linked-bins
  • GitHub Check: ubuntu-jammy-lint
  • GitHub Check: musllinux_1_2-x86_64-dynamic-linked-bins
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: build-macos (macos-15, true)

@davidlion
Copy link
Member

davidlion commented Oct 6, 2025

If I understand correctly the scenario is that:

  • In the package spider and clp are two separate projects/entities.
  • The tasks changes from spider and clp in feat(clp-package): Add Spider and its dependencies to the build. #1318 called their dependencies tasks as if they were separate projects.
  • The install-deps-and-generate-settings task is made to be called once CMAKE_SETTINGS_FILE.
    • If install-deps-and-generate-settings is called from multiple projects with the same CMAKE_SETTINGS_DIR and different CMAKE_SETTINGS_FILEs any shared deps will be handled correctly (but the files may include unnecessary deps from other projects).
  • The dependency tasks for spider were added as if spider was a shared dependency of clp (in order to share dependencies between the projects).
    • This is the root of the problem.

Is it correct to say the fix in this PR is splitting all.cmake into two files (basically changing 2 lines) and all other changes are organizational/visual improvements? If my understanding is correct, we should separate the fix into its own PR as this PR is currently both a fix and a refactor.

====

(Assuming my understanding above is correct.)
We should open an issue in dev-utils to track/remember this problem (add better support for dependencies shared between multiple projects aka multiple install-deps-and-generate-settings calls). However, I think a proper solution for shared-deps in non-trivial and the solution in this PR is probably fine in the few cases we have multiple projects inside one repo.

====

On a side note, in the future only request a single reviewer at a time to reduce confusion and prevent duplicate comments. The yscope-maintainers group automatically notifies a bunch of people, but you probably want to talk to people to figure out the order of reviews (if you want multiple) or who has time.

@sitaowang1998
Copy link
Contributor

@CodeRabbit Open a PR in yscope-dev-utils repo to better support dependency sharing between multiple projects.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Tip

For best results, initiate chat on the files or code changes.

@sitaowang1998: I want to clarify your request. Based on the comment chain, davidlion mentioned opening an issue to track this problem. However, you mentioned opening a PR.

I can help you:

  • Open an issue in the yscope-dev-utils repository to track the need for better support for dependency sharing between multiple projects
  • Cannot open a PR - I'm not able to create pull requests with code changes

Would you like me to open an issue in the yscope-dev-utils repository to track this enhancement? If so, I'll create it with:

  • A clear description of the problem (multiple projects sharing dependencies with different CMAKE_SETTINGS_FILE values)
  • Reference to this PR and the discussion
  • Assignee as you requested

Please confirm if you'd like me to proceed with creating an issue.

@sitaowang1998
Copy link
Contributor

@CodeRabbit. Sorry I meant opening an issue

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create an issue in yscope-dev-utils repository for tracking dependency sharing support

gh issue create \
  --repo y-scope/yscope-dev-utils \
  --title "Better support for dependencies shared between multiple projects" \
  --assignee sitaowang1998 \
  --body "## Problem

When multiple projects within a single repository (e.g., \`spider\` and \`clp\`) call \`install-deps-and-generate-settings\` with:
- The same \`CMAKE_SETTINGS_DIR\`
- Different \`CMAKE_SETTINGS_FILE\` values (e.g., \`all-core.cmake\` and \`all-spider.cmake\`)

The current implementation handles shared dependencies correctly, but the generated CMake settings files may include unnecessary dependencies from other projects.

## Context

This issue was identified during the refactoring of dependency tasks in y-scope/clp#1377. The PR works around the limitation by splitting dependency tasks into separate modular files, but a proper solution in dev-utils would provide better support for this use case.

## Requested Enhancement

Add better support for scenarios where multiple projects in the same repository share dependencies and need to call \`install-deps-and-generate-settings\` multiple times with different output files.

## References

- PR discussion: https://github.com/y-scope/clp/pull/1377#discussion_r1871429583
- Original PR introducing spider deps: y-scope/clp#1318
- Follow-up mitigation: y-scope/clp#1331
- Requested by: @sitaowang1998"

Length of output: 53


@sitaowang1998: No problem! I've created the issue in the yscope-dev-utils repository to track better support for dependency sharing between multiple projects:

🔗 Issue #89: y-scope/yscope-dev-utils#89

The issue includes:

The issue is now ready for tracking and future implementation.

@sitaowang1998
Copy link
Contributor

sitaowang1998 commented Oct 6, 2025

Is it correct to say the fix in this PR is splitting all.cmake into two files (basically changing 2 lines) and all other changes are organizational/visual improvements? If my understanding is correct, we should separate the fix into its own PR as this PR is currently both a fix and a refactor.

This is already done in #1331. This PR is just a refactor of the taskfile structure with some minor fixes.

The main problem is that install-deps-and-generate-settings removes and recreates the CMAKE_SETTING_DIR. This leads to concurrency issue when both core and spider-deps executes this task, which might crash the workflow.

The problem of including unnecessary settings in combined cmake setting files is not a big issue, as it does not affect the correctness of the build system.

Copy link
Contributor

@sitaowang1998 sitaowang1998 left a comment

Choose a reason for hiding this comment

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

The PR description is much border than what this PR is targeting. Maybe we could open an issue in clp to track the problem, which links the issue and PRs in yscope-dev-utils and this PR.

Comment on lines 36 to 37
- "-DANTLR4_INSTALL=ON"
- "-DCMAKE_BUILD_TYPE=Release"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- "-DANTLR4_INSTALL=ON"
- "-DCMAKE_BUILD_TYPE=Release"
- "-DANTLR4_INSTALL=ON"
- "-DBUILD_TESTING=OFF"
- "-DCMAKE_BUILD_TYPE=Release"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BUILD_TESTING does not exist in antlr4-runtime.

Copy link
Contributor

@sitaowang1998 sitaowang1998 Oct 13, 2025

Choose a reason for hiding this comment

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

BUILD_TESTING is a variable in CTest. If a project use enable_testing, we can set BUILD_TESTING to turn off the test build. See https://cmake.org/cmake/help/latest/variable/BUILD_TESTING.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've found a better flag: -DANTLR_BUILD_CPP_TESTS=OFF

- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_INSTALL_MESSAGE=LAZY"
- "-DCMAKE_INSTALL_PREFIX={{.G_DEPS_CPP_DIR}}/{{.LIB_NAME}}-install"
- "-DZLIB_BUILD_EXAMPLES=OFF"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- "-DZLIB_BUILD_EXAMPLES=OFF"
- "-DZLIB_BUILD_EXAMPLES=OFF"
- "-DZLIB_BUILD_TESTING=OFF"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ZLIB_BUILD_TESTING is not present in zlib-1.3.1

Copy link
Contributor

Choose a reason for hiding this comment

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

In 1.3.1, zlib uses enable_testing. However, it does not build test if example build if off. Same with utf8, let's leave it here with a comment.

@Bill-hbrhbr
Copy link
Contributor Author

@sitaowang1998 @kirkrodrigues

To provide some context:
Kirk and I discussed when to add flags/options to the library CMake generate step.
Our criteria for adding a flag are:

  • The flag exists in CMakeLists.txt (or a file it includes).
  • We intend to change its default value (e.g., ON → OFF or OFF → ON).
  • Exceptions (always include):
    • -DCMAKE_BUILD_TYPE=Release
    • -DCMAKE_INSTALL_MESSAGE=LAZY

Many libraries expose test-related flags, but most are already OFF. To recognize Sitao’s effort
collecting them, I added a commit that includes all valid suggestions for our current lib versions:

Policy options we can adopt going forward:

  1. Make -DBUILD_TESTING=OFF universal, and turn off all related testing flags.
  2. Not universal, but always disable testing flags when present, regardless of their defaults.
    This is what the code does now after the commit above.
  3. Only disable testing flags that default to ON.
    This is what main currently does.

Thoughts or preferences?

@Bill-hbrhbr
Copy link
Contributor Author

As a side note, I'm trying to avoid scope creep in this PR. We should do as much copy-paste and moving code around as possible.

But I guess I did modify the install methods of two libraries (utfcpp, antlr4-runtime) to shorten the future PR pipeline length.

@sitaowang1998
Copy link
Contributor

Policy options we can adopt going forward:

1. **Make `-DBUILD_TESTING=OFF` universal**, and turn off all related testing flags.

2. **Not universal, but always disable testing flags** when present, regardless of their defaults.
   _This is what the code does now after the commit above._

3. **Only disable testing flags that default to `ON`.**
   _This is what `main` currently does._

For 1. I think we can only apply -DBUILD_TESTING=OFF to the libraries where this is the one and only way to turn off test building.
I am ok with either 2 or 3.

@kirkrodrigues
Copy link
Member

For 1. I think we can only apply -DBUILD_TESTING=OFF to the libraries where this is the one and only way to turn off test building. I am ok with either 2 or 3.

I prefer to stick with 3 since it's the clearest to reason about.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (3)
taskfiles/deps/cmake-libs.yaml (3)

220-238: Add test build flag.

Based on past review comments, explicitly setting -DENABLE_TESTS=OFF was suggested to disable test building for mongocxx.

Apply this diff to disable test building:

            - "-DBUILD_SHARED_AND_STATIC_LIBS=ON"
            - "-DBUILD_SHARED_LIBS_WITH_STATIC_MONGOC=ON"
            - "-DCMAKE_BUILD_TYPE=Release"
            - "-DCMAKE_INSTALL_MESSAGE=LAZY"
            - "-DENABLE_EXAMPLES=OFF"
+            - "-DENABLE_TESTS=OFF"
            - "-DENABLE_UNINSTALL=OFF"

68-79: Add test build flag.

Based on past review comments, explicitly setting -DENABLE_DATE_TESTING=OFF was suggested to disable test building for the date library.

Apply this diff to disable test building:

          CMAKE_GEN_ARGS:
            - "-DCMAKE_BUILD_TYPE=Release"
            - "-DCMAKE_INSTALL_MESSAGE=LAZY"
+            - "-DENABLE_DATE_TESTING=OFF"

295-316: Add test build flag.

Based on past review comments, explicitly setting -DSPDLOG_BUILD_TESTS=OFF was suggested. The current configuration includes SPDLOG_BUILD_TESTS_HO=OFF but is missing the main SPDLOG_BUILD_TESTS flag.

Apply this diff to disable test building:

            - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW"
            - "-DSPDLOG_BUILD_EXAMPLE=OFF"
+            - "-DSPDLOG_BUILD_TESTS=OFF"
            - "-DSPDLOG_BUILD_TESTS_HO=OFF"
            - "-DSPDLOG_BUILD_SHARED=ON"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2150c and 4a6e774.

📒 Files selected for processing (2)
  • taskfiles/deps/cmake-libs.yaml (1 hunks)
  • taskfiles/deps/main.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
📚 Learning: 2025-09-15T18:53:15.844Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1226
File: taskfiles/deps/main.yaml:522-527
Timestamp: 2025-09-15T18:53:15.844Z
Learning: When ystdlib is built with -Dystdlib_BUILD_TESTING=OFF in taskfiles/deps/main.yaml, it does not require Catch2 settings to be injected via CMAKE_GEN_ARGS since testing is disabled and Catch2 is not needed during the build process.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
📚 Learning: 2025-08-19T07:08:15.583Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1229
File: taskfiles/deps/main.yaml:494-504
Timestamp: 2025-08-19T07:08:15.583Z
Learning: In zlib v1.3.1's CMake build system, only ZLIB_BUILD_EXAMPLES is a valid option. Other ZLIB_BUILD_* flags (MINIZIP, SHARED, STATIC, TESTING) and ZLIB_INSTALL are not defined in the CMakeLists.txt and have no effect. Use BUILD_SHARED_LIBS=ON for shared library control and ZLIB_BUILD_EXAMPLES=OFF to disable examples.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
📚 Learning: 2025-08-06T07:32:28.462Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1156
File: taskfiles/deps/main.yaml:70-71
Timestamp: 2025-08-06T07:32:28.462Z
Learning: In LZ4's CMake build system (build/cmake/CMakeLists.txt), the option to build static libraries is `BUILD_STATIC_LIBS=ON`, not `LZ4_BUILD_STATIC=ON`. The correct options for building both shared and static LZ4 libraries are `-DBUILD_SHARED_LIBS=ON` and `-DBUILD_STATIC_LIBS=ON`.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
📚 Learning: 2025-08-09T04:07:27.083Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.

Applied to files:

  • taskfiles/deps/cmake-libs.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: rust-checks (ubuntu-22.04)
  • GitHub Check: rust-checks (ubuntu-24.04)
🔇 Additional comments (21)
taskfiles/deps/main.yaml (4)

3-22: LGTM! Well-organized includes structure.

The categorization of includes (project targets, utils, component libraries) improves clarity and maintainability. The flattening of component library tasks is appropriate for direct access.


29-30: LGTM! Checksums directory properly exposed.

Making G_DEPS_CPP_CHECKSUMS_DIR a public variable supports the modular dependency structure and aligns with the checksum management workflow described in the PR objectives.


42-46: LGTM! Spider correctly added to default dependencies.

The explicit inclusion of spider in the default task aligns with the PR objectives and addresses the discussion in past review comments about keeping spider as a default task.


48-54: LGTM! Init task properly consolidated.

The init task correctly creates directories in hierarchical order (G_DEPS_DIR → G_DEPS_CPP_DIR → G_DEPS_CPP_CHECKSUMS_DIR → G_DEPS_CPP_CMAKE_SETTINGS_DIR). The internal: true and run: "once" attributes are appropriate for this initialization task.

taskfiles/deps/cmake-libs.yaml (17)

3-12: LGTM! Clear variable definitions and policy documentation.

The library name constants promote consistency, and the NOTE about CMP0074 policy provides valuable context for when and why the policy is set to NEW.


29-48: LGTM! ANTLR runtime correctly configured.

The task properly addresses the test build flag discussion from past comments by using -DANTLR_BUILD_CPP_TESTS=OFF. The CMAKE_SOURCE_DIR: "runtime/Cpp" correctly points to the ANTLR runtime subdirectory, and the CMP0135 policy ensures extracted files use current timestamps.


50-66: LGTM! Catch2 properly configured.

The test framework is correctly configured with testing disabled (-DCATCH_BUILD_TESTING=OFF) and unnecessary extras excluded. The C++20 requirement aligns with the project's standards.


81-95: LGTM! fmt library properly configured.

The task correctly builds shared libraries and disables both documentation and tests with -DFMT_DOC=OFF and -DFMT_TEST=OFF.


97-143: LGTM! LibLZMA correctly configured with dual builds.

The dual-build structure (shared and static) is necessary for LibLZMA and is implemented correctly. The test flag (-DBUILD_TESTING=OFF) and tool flags are properly set. The join pattern on lines 139-140 works correctly in this context, as confirmed in past review discussions.


145-162: LGTM! log-surgeon properly configured with dependencies.

The task correctly declares dependencies on fmt and microsoft.gsl, injects their CMake settings via -C flags, and disables test building with -Dlog_surgeon_BUILD_TESTING=OFF.


181-204: LGTM! MariaDB connector properly configured with platform restrictions.

The Linux-only platform restriction and Ubuntu precondition are appropriate for Spider dependencies. The unit tests are correctly disabled with -DWITH_UNIT_TESTS=OFF.


206-218: LGTM! Microsoft.GSL correctly configured.

The task properly disables tests with -DGSL_TEST=OFF and uses the library name variable consistently.


262-278: LGTM! nlohmann_json properly configured.

The task correctly disables tests with -DJSON_BuildTests=OFF. The NOTE about using the GitHub-generated tarball is helpful context for developers facing firewall restrictions.


280-293: LGTM! simdjson correctly configured.

The task properly builds both shared and static libraries. Per past review discussions, simdjson does not support a BUILD_TESTING flag, so the configuration is complete as-is.


318-329: LGTM! utfcpp correctly configured.

The task uses v4.0.6 which, per past review discussions, does not support UTF8CPP_ENABLE_TESTS flag. The configuration is appropriate for this version.


331-343: LGTM! yaml-cpp properly configured.

The task correctly disables tests with -DYAML_CPP_BUILD_TESTS=OFF.


345-359: LGTM! ystdlib properly configured.

The task correctly depends on Boost, disables testing with -Dystdlib_BUILD_TESTING=OFF, and sets position-independent code generation. Per previous learnings, with testing disabled, Catch2 is not required during the build.

Based on learnings


361-377: LGTM! zlib correctly configured.

The task properly disables examples with -DZLIB_BUILD_EXAMPLES=OFF. Per previous learnings, zlib v1.3.1 uses enable_testing but does not build tests when examples are disabled, so the configuration is complete. The custom install prefix is appropriate.

Based on learnings


379-395: LGTM! zstd properly configured.

The task correctly builds both shared and static libraries, disables programs and tests with appropriate flags, and specifies the correct CMAKE_SOURCE_DIR for zstd's build system.


14-27: No explicit ABSL_BUILD_TESTING flag required.

Abseil’s CMakeLists defaults ABSL_BUILD_TESTING to OFF, so adding -DABSL_BUILD_TESTING=OFF is unnecessary.


164-179: No test-related CMake options found; no change required.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a6e774 and 2c12c0f.

📒 Files selected for processing (26)
  • taskfiles/deps/installs/absl.yaml (1 hunks)
  • taskfiles/deps/installs/all.yaml (1 hunks)
  • taskfiles/deps/installs/antlr-jar.yaml (1 hunks)
  • taskfiles/deps/installs/antlr-runtime.yaml (1 hunks)
  • taskfiles/deps/installs/boost.yaml (1 hunks)
  • taskfiles/deps/installs/catch2.yaml (1 hunks)
  • taskfiles/deps/installs/date.yaml (1 hunks)
  • taskfiles/deps/installs/fmt.yaml (1 hunks)
  • taskfiles/deps/installs/liblzma.yaml (1 hunks)
  • taskfiles/deps/installs/log-surgeon.yaml (1 hunks)
  • taskfiles/deps/installs/lz4.yaml (1 hunks)
  • taskfiles/deps/installs/mariadb-connector-cpp.yaml (1 hunks)
  • taskfiles/deps/installs/microsoft.gsl.yaml (1 hunks)
  • taskfiles/deps/installs/mongocxx.yaml (1 hunks)
  • taskfiles/deps/installs/msgpack-cxx.yaml (1 hunks)
  • taskfiles/deps/installs/nlohmann_json.yaml (1 hunks)
  • taskfiles/deps/installs/simdjson.yaml (1 hunks)
  • taskfiles/deps/installs/spdlog.yaml (1 hunks)
  • taskfiles/deps/installs/sqlite3.yaml (1 hunks)
  • taskfiles/deps/installs/utfcpp.yaml (1 hunks)
  • taskfiles/deps/installs/yaml-cpp.yaml (1 hunks)
  • taskfiles/deps/installs/ystdlib.yaml (1 hunks)
  • taskfiles/deps/installs/zlib.yaml (1 hunks)
  • taskfiles/deps/installs/zstd.yaml (1 hunks)
  • taskfiles/deps/main.yaml (1 hunks)
  • taskfiles/deps/utils.yaml (4 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
📚 Learning: 2025-09-15T18:53:15.844Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1226
File: taskfiles/deps/main.yaml:522-527
Timestamp: 2025-09-15T18:53:15.844Z
Learning: When ystdlib is built with -Dystdlib_BUILD_TESTING=OFF in taskfiles/deps/main.yaml, it does not require Catch2 settings to be injected via CMAKE_GEN_ARGS since testing is disabled and Catch2 is not needed during the build process.

Applied to files:

  • taskfiles/deps/installs/catch2.yaml
  • taskfiles/deps/installs/ystdlib.yaml
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
PR: y-scope/clp#925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.

Applied to files:

  • taskfiles/deps/installs/antlr-runtime.yaml
  • taskfiles/deps/installs/antlr-jar.yaml
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.

Applied to files:

  • taskfiles/deps/installs/zlib.yaml
  • taskfiles/deps/installs/lz4.yaml
  • taskfiles/deps/installs/liblzma.yaml
📚 Learning: 2025-08-25T07:27:19.449Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1262
File: docs/src/dev-guide/components-core/index.md:50-50
Timestamp: 2025-08-25T07:27:19.449Z
Learning: In the CLP project, nlohmann_json version 3.11.3 is installed through their dependency management process, but they don't enforce version constraints in CMake find_package calls - they control versions through installation rather than CMake version pinning.

Applied to files:

  • taskfiles/deps/installs/nlohmann_json.yaml
🪛 GitHub Actions: clp-lint
taskfiles/deps/installs/msgpack-cxx.yaml

[error] 31-31: empty-lines: too many blank lines (1 > 0) in YAML file.

🪛 GitHub Check: lint-check (ubuntu-24.04)
taskfiles/deps/installs/antlr-runtime.yaml

[failure] 25-25:
25:1 [empty-lines] too many blank lines (1 > 0)

taskfiles/deps/installs/mongocxx.yaml

[failure] 24-24:
24:1 [empty-lines] too many blank lines (1 > 0)

taskfiles/deps/installs/msgpack-cxx.yaml

[failure] 31-31:
31:1 [empty-lines] too many blank lines (1 > 0)

🪛 YAMLlint (1.37.1)
taskfiles/deps/installs/antlr-runtime.yaml

[error] 25-25: too many blank lines (1 > 0)

(empty-lines)

taskfiles/deps/installs/mongocxx.yaml

[error] 24-24: too many blank lines (1 > 0)

(empty-lines)

taskfiles/deps/installs/msgpack-cxx.yaml

[error] 31-31: too many blank lines (1 > 0)

(empty-lines)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: musllinux_1_2-x86_64-dynamic-linked-bins
  • GitHub Check: musllinux_1_2-x86_64-static-linked-bins
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: manylinux_2_28-x86_64-static-linked-bins
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: manylinux_2_28-x86_64-dynamic-linked-bins
  • GitHub Check: package-image
  • GitHub Check: ubuntu-jammy-lint
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: build-macos (macos-14, true)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-15, false)
  • GitHub Check: build-macos (macos-14, false)
  • GitHub Check: rust-checks (ubuntu-22.04)
  • GitHub Check: rust-checks (ubuntu-24.04)
  • GitHub Check: rust-checks (macos-15)
🔇 Additional comments (14)
taskfiles/deps/utils.yaml (2)

54-64: LGTM! Well-structured dynamic source glob.

The INSTALL_SOURCE_GLOB logic correctly constructs a Task glob pattern that includes the install task's own YAML file plus all dependency YAML files. This ensures proper source tracking and cache invalidation when dependencies change.


74-97: LGTM! Namespace alignment with colon-prefixed task references.

The task dependencies and commands now use fully-qualified colon-prefixed references (e.g., :yscope-dev-utils:checksum:validate), which improves namespace clarity and aligns with the PR's modularization objectives.

taskfiles/deps/main.yaml (1)

47-54: LGTM! Centralized initialization addresses concurrency concerns.

Moving the init task to main.yaml centralizes directory creation and ensures it's invoked only by top-level dependency tasks. This aligns with the PR's objective to address the race condition where multiple targets (core, spider) were invoking install-deps-and-generate-settings concurrently with the same CMAKE_SETTINGS_DIR.

taskfiles/deps/installs/spdlog.yaml (1)

30-32: LGTM! Helpful compatibility note.

The comment about spdlog-fmt version compatibility is valuable documentation for future maintainers who may need to upgrade either library.

taskfiles/deps/installs/catch2.yaml (1)

15-16: Verify C++20 requirement is necessary.

The explicit C++20 requirement may constrain projects that need to build with earlier C++ standards. Ensure this is intentional and aligns with the project's minimum C++ standard requirements.

taskfiles/deps/installs/ystdlib.yaml (1)

19-19: LGTM! Testing disabled as expected.

As per learnings, when ystdlib is built with -Dystdlib_BUILD_TESTING=OFF, it does not require Catch2 settings since testing is disabled. This is correctly implemented here.

Based on learnings

taskfiles/deps/installs/zstd.yaml (1)

10-21: zstd install config looks good.

Flags match upstream CMake options; source dir and tarball details look correct.

taskfiles/deps/installs/all.yaml (1)

8-31: Mapping file looks consistent.

Includes are coherent and align with per-dependency taskfiles.

taskfiles/deps/installs/absl.yaml (1)

10-18: absl install config LGTM.

Reasonable defaults (Release, C++20); tarball URL/SHA provided.

taskfiles/deps/installs/microsoft.gsl.yaml (1)

14-16: LIB_NAME is correctly sourced. G_GSL_LIB_NAME is defined in taskfiles/deps/main.yaml as "Microsoft.GSL", matching the expected CMake package name.

taskfiles/deps/installs/lz4.yaml (1)

11-16: Retain BUILD_STATIC_LIBS as valid LZ4 option
BUILD_STATIC_LIBS is a supported, LZ4-specific CMake switch that LZ4 honours alongside BUILD_SHARED_LIBS.

taskfiles/deps/installs/mongocxx.yaml (1)

12-18: No changes required
BUILD_SHARED_AND_STATIC_LIBS and BUILD_SHARED_LIBS_WITH_STATIC_MONGOC are valid upstream CMake flags in mongo-cxx-driver ≥ 3.5 (including r4.1.1).

taskfiles/deps/installs/log-surgeon.yaml (1)

3-13: Structure and deps orchestration look good.

The deps loop and once semantics align with the modularised flow. No issues spotted with namespacing or invocation order.

taskfiles/deps/installs/sqlite3.yaml (1)

17-23: Cannot verify task parameter contract; submodule not available in sandbox.

The yscope-dev-utils repository is a Git submodule (https://github.com/y-scope/yscope-dev-utils.git) that is not cloned in this environment. Without access to the actual download-and-extract-zip task definition, I cannot confirm whether both CHECKSUM_FILE and FILE_SHA256 are valid simultaneously, nor can I determine the task's validation logic.

Your original concern remains valid: passing both an MD5-named checksum file and an inline SHA256 hash to the same task is potentially ambiguous and warrants clarification from the external task's documentation or source code.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/installs/log-surgeon.yaml (1)

24-24: Prefer full commit SHA in the TARBALL_URL for reproducibility.

The URL uses a short 7-character commit SHA, which can be ambiguous and less stable than a full 40-character commit SHA. After updating the URL to use the full commit SHA, ensure TARBALL_SHA256 is updated to match the new tarball.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c12c0f and a143bda.

📒 Files selected for processing (27)
  • taskfiles/deps/core.yaml (1 hunks)
  • taskfiles/deps/installs/absl.yaml (1 hunks)
  • taskfiles/deps/installs/antlr-jar.yaml (1 hunks)
  • taskfiles/deps/installs/antlr-runtime.yaml (1 hunks)
  • taskfiles/deps/installs/boost.yaml (1 hunks)
  • taskfiles/deps/installs/catch2.yaml (1 hunks)
  • taskfiles/deps/installs/date.yaml (1 hunks)
  • taskfiles/deps/installs/fmt.yaml (1 hunks)
  • taskfiles/deps/installs/liblzma.yaml (1 hunks)
  • taskfiles/deps/installs/log-surgeon.yaml (1 hunks)
  • taskfiles/deps/installs/lz4.yaml (1 hunks)
  • taskfiles/deps/installs/mariadb-connector-cpp.yaml (1 hunks)
  • taskfiles/deps/installs/microsoft.gsl.yaml (1 hunks)
  • taskfiles/deps/installs/mongocxx.yaml (1 hunks)
  • taskfiles/deps/installs/msgpack-cxx.yaml (1 hunks)
  • taskfiles/deps/installs/nlohmann_json.yaml (1 hunks)
  • taskfiles/deps/installs/simdjson.yaml (1 hunks)
  • taskfiles/deps/installs/spdlog.yaml (1 hunks)
  • taskfiles/deps/installs/sqlite3.yaml (1 hunks)
  • taskfiles/deps/installs/utfcpp.yaml (1 hunks)
  • taskfiles/deps/installs/yaml-cpp.yaml (1 hunks)
  • taskfiles/deps/installs/ystdlib.yaml (1 hunks)
  • taskfiles/deps/installs/zlib.yaml (1 hunks)
  • taskfiles/deps/installs/zstd.yaml (1 hunks)
  • taskfiles/deps/main.yaml (2 hunks)
  • taskfiles/deps/spider.yaml (1 hunks)
  • taskfiles/deps/utils.yaml (3 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1156
File: components/core/CMakeLists.txt:772-772
Timestamp: 2025-08-09T04:07:27.083Z
Learning: In the CLP project's CMakeLists.txt, when reviewing changes related to the ${zstd_TARGET} variable usage in test linking, the team is planning a refactoring PR to improve this mechanism. Guards for undefined target variables should be deferred to that separate PR rather than being added in focused dependency migration PRs.
📚 Learning: 2025-07-23T09:54:45.185Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1122
File: components/core/src/clp/clp/CMakeLists.txt:175-195
Timestamp: 2025-07-23T09:54:45.185Z
Learning: In the CLP project, when reviewing CMakeLists.txt changes that introduce new compression library dependencies (BZip2, LibLZMA, LZ4, ZLIB), the team prefers to address conditional linking improvements in separate PRs rather than expanding the scope of focused migration PRs like the LibArchive task-based installation migration.

Applied to files:

  • taskfiles/deps/installs/liblzma.yaml
  • taskfiles/deps/installs/zlib.yaml
  • taskfiles/deps/installs/lz4.yaml
📚 Learning: 2025-09-15T18:53:15.844Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1226
File: taskfiles/deps/main.yaml:522-527
Timestamp: 2025-09-15T18:53:15.844Z
Learning: When ystdlib is built with -Dystdlib_BUILD_TESTING=OFF in taskfiles/deps/main.yaml, it does not require Catch2 settings to be injected via CMAKE_GEN_ARGS since testing is disabled and Catch2 is not needed during the build process.

Applied to files:

  • taskfiles/deps/installs/ystdlib.yaml
  • taskfiles/deps/installs/catch2.yaml
📚 Learning: 2025-08-25T07:27:19.449Z
Learnt from: Bill-hbrhbr
PR: y-scope/clp#1262
File: docs/src/dev-guide/components-core/index.md:50-50
Timestamp: 2025-08-25T07:27:19.449Z
Learning: In the CLP project, nlohmann_json version 3.11.3 is installed through their dependency management process, but they don't enforce version constraints in CMake find_package calls - they control versions through installation rather than CMake version pinning.

Applied to files:

  • taskfiles/deps/installs/nlohmann_json.yaml
📚 Learning: 2025-05-28T18:33:30.155Z
Learnt from: anlowee
PR: y-scope/clp#925
File: taskfiles/deps/main.yaml:97-106
Timestamp: 2025-05-28T18:33:30.155Z
Learning: In the taskfiles dependency system (taskfiles/deps/main.yaml), echo commands are used to generate .cmake settings files that are consumed by the main CMake build process. These files set variables like ANTLR_RUNTIME_HEADER to point to dependency locations for use during compilation.

Applied to files:

  • taskfiles/deps/installs/antlr-runtime.yaml
🔇 Additional comments (24)
taskfiles/deps/installs/absl.yaml (1)

1-17: LGTM — Standard library install pattern.

The task structure and CMake configuration look correct. Verify that the absence of an explicit :init dependency aligns with your top-level orchestrator's invocation strategy (i.e., whether :init is called by deps:core-all-parallel or similar parent tasks before individual library installs).

taskfiles/deps/installs/yaml-cpp.yaml (1)

1-16: LGTM — Consistent testing flag application.

The -DYAML_CPP_BUILD_TESTS=OFF flag aligns with the testing-disable policy discussed in the PR. Configuration and structure are correct.

taskfiles/deps/installs/ystdlib.yaml (1)

1-22: Verify global variable availability and :init dependency consistency.

Two observations:

  1. Line 17 references {{.G_BOOST_LIB_NAME}}, which is not defined locally in this file or in boost.yaml. Confirm this variable is initialized globally (e.g., in main.yaml or utils.yaml).
  2. This file explicitly depends on :init (line 11), but simpler install tasks like absl.yaml and yaml-cpp.yaml do not. Clarify whether individual library installs should depend on :init or if orchestration handles this at the top level (per PR objectives: "utils:init moved into main.yaml and is invoked only by top-level deps tasks").
taskfiles/deps/installs/boost.yaml (1)

1-26: Verify G_BOOST_LIB_NAME is set after boost task completion.

The boost install uses a specialized :yscope-dev-utils:boost:download-and-install task rather than the generic :utils:install-remote-cmake-lib used by other libraries. Verify that this task sets G_BOOST_LIB_NAME = "boost" as a global variable, since downstream tasks (ystdlib.yaml, msgpack-cxx.yaml) reference this variable in their CMake settings path (line 17 of ystdlib.yaml).

Also clarify whether the explicit :init dependency here is required, given the PR objective to move :init invocation to top-level tasks only.

taskfiles/deps/installs/lz4.yaml (1)

1-19: LGTM — Correct library-specific CMake configuration.

The CMAKE_SOURCE_DIR: "build/cmake" override correctly targets lz4's actual CMakeLists.txt location, and the disable flags are appropriate. Note the consistency question about :init dependency mentioned in other files.

taskfiles/deps/installs/mongocxx.yaml (1)

1-22: Verify no trailing blank lines present.

Past review comments flagged a trailing blank line in this file. Ensure the file ends immediately after line 22 with no extra blank lines, per YAML linting requirements.

Otherwise, the mongocxx install task structure and CMake configuration look correct.

taskfiles/deps/installs/utfcpp.yaml (1)

1-24: LGTM — Appropriate header-only library handling.

The approach of downloading, extracting, and generating a CMake include-directory file is correct for header-only libraries like utfcpp. The shell command (lines 21–24) properly generates the .cmake file that downstream tasks can reference.

Confirm that the variable CLP_UTFCPP_INCLUDE_DIRECTORY naming is consistent with how CMakeLists.txt expects it.

taskfiles/deps/installs/msgpack-cxx.yaml (1)

1-27: Verify no trailing blank lines and global variable availability.

Two items:

  1. Past review flagged a trailing blank line in this file. Ensure the file ends immediately after line 27 with no extra blank lines.
  2. Line 18 references {{.G_BOOST_LIB_NAME}}, which must be available globally after the boost task completes (verified by dependency expansion on lines 10–13). Confirm this variable is initialized.

Otherwise, the msgpack-cxx install task structure, per-item dependency expansion, and CMake configuration are correct.

taskfiles/deps/installs/simdjson.yaml (1)

1-17: LGTM! Follows established installation pattern.

The SIMDJSON installation task correctly delegates to the remote CMake installer with appropriate build configuration (shared and static libraries in Release mode).

taskfiles/deps/installs/zlib.yaml (1)

7-18: LIB_NAME is redundantly re-assigned at task scope.

Line 7 defines LIB_NAME: "zlib", which is then re-assigned at line 18 as LIB_NAME: "{{.LIB_NAME}}" (referencing the parent scope). If this is intentional for Taskfile scoping semantics, keep it; otherwise, line 18 can be removed.

taskfiles/deps/installs/catch2.yaml (1)

1-20: LGTM! Comprehensive build flags and C++ standard well configured.

Catch2 installation properly disables testing, documentation, and extras to minimize build overhead, and correctly specifies C++20 standard for v3.8.0 compatibility.

taskfiles/deps/installs/spdlog.yaml (1)

1-29: LGTM! Dependency handling pattern well implemented.

The spdlog task correctly manages fmt dependency by: (1) invoking fmt installation first via the deps: section, (2) including fmt's CMake settings file via -C flag, and (3) enabling external fmt linking. The comment clarifying fmt compatibility is valuable for future maintainers.

taskfiles/deps/installs/microsoft.gsl.yaml (1)

1-16: LGTM! Simple and focused GSL installation configuration.

The templated LIB_NAME variable and focused set of CMake arguments appropriately configure GSL v4.0.0 for installation with tests disabled.

taskfiles/deps/installs/date.yaml (1)

1-15: LGTM! Minimal, clean date library installation.

The date library installation correctly specifies v3.0.1 with standard Release and LAZY install message flags, following the established pattern.

taskfiles/deps/installs/fmt.yaml (1)

1-18: LGTM! fmt library properly configured with shared build and testing disabled.

The fmt v11.2.0 installation appropriately enables shared libraries while disabling documentation and tests, and uses templated LIB_NAME consistent with other global variables.

taskfiles/deps/installs/antlr-runtime.yaml (2)

15-19: LGTM! CMAKE_SOURCE_DIR and CMP0135 policy well configured.

The CMAKE_SOURCE_DIR: "runtime/Cpp" correctly targets ANTLR's subdirectory containing CMakeLists.txt, and the CMP0135 policy with explanatory comment ensures proper timestamp handling for extracted files and rebuild triggers.


22-23: Verify line continuation in TARBALL_URL.

The TARBALL_URL spans lines 22-23 using line continuation. Ensure YAML parser correctly interprets this continuation and that the resulting URL is valid. Verify the URL renders correctly in test execution.

taskfiles/deps/spider.yaml (4)

25-26: Verify external variable definitions.

Line 25 references {{.G_SPIDER_BUILD_DIR}} and line 26 references {{.G_CPP_MAX_PARALLELISM_PER_BUILD_TASK}}, neither of which are defined in the provided snippet. Ensure these variables are defined in a parent Taskfile or included configuration file that feeds into this file.

Also applies to: 28-28


11-31: Correct structure and namespacing for spider build task.

The platform restriction, Ubuntu-only precondition, and namespaced :yscope-dev-utils:cmake:install-remote-tar invocation are all correctly configured. The CMake generator arguments follow the established policy (Release build type, lazy install message, target-specific BUILD_TESTING flag).


33-43: Correct orchestration of spider dependency installation.

The spider-dep task correctly depends on init and checksum cleanup, invokes the settings generator with spider:spider-all-parallel as the dependency task, and finalizes with checksum combination. Namespacing is consistent.


45-62: All CPP_SPIDER_TASKS are correctly defined and available.

Verification confirms that all nine tasks (absl, antlr-jar, antlr-runtime, boost, fmt, mariadb-connector-cpp, msgpack-cxx, spdlog, ystdlib) are defined in taskfiles/deps/installs/all.yaml. The for-loop expansion in spider-all-parallel will correctly generate parallel task dependencies via the :{{.ITEM}} pattern.

taskfiles/deps/main.yaml (3)

3-17: Correct modularization of includes for target-specific workflows.

The public includes now properly expose core, log-viewer, and spider as separate target workflows, with components flattened into the root namespace. This structure enables clean separation of concerns and supports the new modular dependency installation approach described in the PR objectives.


19-29: Clear variable organization and new checksum directory variable.

The vars section correctly adds G_DEPS_CPP_CHECKSUMS_DIR as a derived path and improves documentation through section comments. Naming and scoping are consistent with project conventions.


40-54: Correct default task expansion and centralized init task structure.

The default task now properly includes spider alongside core and log-viewer per prior review approval. The centralized init task correctly creates the full directory hierarchy (parent G_DEPS_CPP_DIR before child directories) with idempotent mkdir -p commands, marked to run exactly once. All referenced directories have corresponding variables defined.

Comment on lines +1 to +20
version: "3"

tasks:
default:
internal: true
run: "once"
cmds:
- task: ":utils:install-remote-cmake-lib"
vars:
CMAKE_GEN_ARGS:
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_INSTALL_MESSAGE=LAZY"
- "-DZSTD_BUILD_PROGRAMS=OFF"
- "-DZSTD_BUILD_SHARED=ON"
- "-DZSTD_BUILD_STATIC=ON"
- "-DZSTD_BUILD_TESTS=OFF"
CMAKE_SOURCE_DIR: "build/cmake"
LIB_NAME: "zstd"
TARBALL_SHA256: "eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"
TARBALL_URL: "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify SHA-256 hash integrity and ZSTD_BUILD_TESTS policy compliance.

The file follows the established installation pattern, but requires verification on two fronts:

  1. SHA-256 hash: Confirm the TARBALL_SHA256 matches the official zstd v1.5.7 release for security.
  2. ZSTD_BUILD_TESTS flag: Per PR discussions, the team is implementing a policy where testing flags are disabled only if they default to ON (option 3). Verify that ZSTD_BUILD_TESTS defaults to ON in zstd's CMakeLists.txt; if it defaults to OFF, this flag is redundant.
  3. CMAKE_SOURCE_DIR: Confirm that "build/cmake" is the correct subdirectory path containing the CMakeLists.txt in the zstd v1.5.7 release.

🏁 Script executed:

#!/bin/bash
# Description: Verify zstd v1.5.7 release integrity and CMakeLists.txt build option defaults

set -e

# Create temp directory for extraction
TEMP_DIR=$(mktemp -d)
trap "rm -rf $TEMP_DIR" EXIT

cd "$TEMP_DIR"

# Download zstd v1.5.7 release
echo "Downloading zstd v1.5.7..."
curl -sLo zstd-1.5.7.tar.gz "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"

# Verify SHA-256
EXPECTED_SHA="eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"
ACTUAL_SHA=$(sha256sum zstd-1.5.7.tar.gz | awk '{print $1}')
echo "Expected SHA-256: $EXPECTED_SHA"
echo "Actual SHA-256:   $ACTUAL_SHA"
if [ "$EXPECTED_SHA" != "$ACTUAL_SHA" ]; then
  echo "ERROR: SHA-256 mismatch!"
  exit 1
fi
echo "✓ SHA-256 verified"

# Extract and check structure
tar -xzf zstd-1.5.7.tar.gz
ls -la zstd-1.5.7/

# Check for CMakeLists.txt in build/cmake directory
if [ -f "zstd-1.5.7/build/cmake/CMakeLists.txt" ]; then
  echo "✓ Found CMakeLists.txt at build/cmake/"
else
  echo "✗ CMakeLists.txt not found at build/cmake/"
  echo "Checking alternative locations..."
  find zstd-1.5.7 -name "CMakeLists.txt" -type f
fi

# Extract ZSTD_BUILD_TESTS default value from CMakeLists.txt
echo ""
echo "Checking ZSTD_BUILD_TESTS default in build/cmake/CMakeLists.txt:"
if grep -n "ZSTD_BUILD_TESTS" zstd-1.5.7/build/cmake/CMakeLists.txt; then
  echo "Found ZSTD_BUILD_TESTS option definition"
else
  echo "ZSTD_BUILD_TESTS not found in build/cmake/CMakeLists.txt"
fi

Length of output: 202



---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Verify zstd v1.5.7 SHA-256 hash using alternative methods and inspect CMakeLists.txt

set -e

# Create temp directory for extraction
TEMP_DIR=$(mktemp -d)
trap "rm -rf $TEMP_DIR" EXIT

cd "$TEMP_DIR"

# Download zstd v1.5.7 release
echo "Downloading zstd v1.5.7..."
curl -sLo zstd-1.5.7.tar.gz "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"

# Verify SHA-256 using Python
EXPECTED_SHA="eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"
echo "Verifying SHA-256 hash using Python..."
ACTUAL_SHA=$(python3 -c "import hashlib; print(hashlib.sha256(open('zstd-1.5.7.tar.gz', 'rb').read()).hexdigest())")
echo "Expected SHA-256: $EXPECTED_SHA"
echo "Actual SHA-256:   $ACTUAL_SHA"
if [ "$EXPECTED_SHA" = "$ACTUAL_SHA" ]; then
  echo "✓ SHA-256 verified successfully"
else
  echo "✗ SHA-256 mismatch detected"
  exit 1
fi

# Extract tarball
echo ""
echo "Extracting zstd-1.5.7.tar.gz..."
tar -xzf zstd-1.5.7.tar.gz

# Check directory structure
echo ""
echo "Checking zstd-1.5.7 directory structure:"
ls -la zstd-1.5.7/

# Check for CMakeLists.txt in build/cmake directory
echo ""
echo "Searching for CMakeLists.txt files in zstd-1.5.7:"
find zstd-1.5.7 -name "CMakeLists.txt" -type f

# Check if build/cmake/CMakeLists.txt exists
if [ -f "zstd-1.5.7/build/cmake/CMakeLists.txt" ]; then
  echo "✓ Found CMakeLists.txt at zstd-1.5.7/build/cmake/CMakeLists.txt"
  
  # Search for ZSTD_BUILD_TESTS option
  echo ""
  echo "Searching for ZSTD_BUILD_TESTS in build/cmake/CMakeLists.txt:"
  grep -n "ZSTD_BUILD_TESTS" zstd-1.5.7/build/cmake/CMakeLists.txt || echo "Not found in build/cmake/CMakeLists.txt"
  
  # Also check parent CMakeLists.txt if it exists
  if [ -f "zstd-1.5.7/CMakeLists.txt" ]; then
    echo ""
    echo "Searching for ZSTD_BUILD_TESTS in zstd-1.5.7/CMakeLists.txt:"
    grep -n "ZSTD_BUILD_TESTS" zstd-1.5.7/CMakeLists.txt || echo "Not found in root CMakeLists.txt"
  fi
  
  # Display the context around ZSTD_BUILD_TESTS for default value inspection
  echo ""
  echo "Context around ZSTD_BUILD_TESTS definitions:"
  grep -B 2 -A 2 "ZSTD_BUILD_TESTS" zstd-1.5.7/build/cmake/CMakeLists.txt zstd-1.5.7/CMakeLists.txt 2>/dev/null || true
else
  echo "✗ CMakeLists.txt not found at zstd-1.5.7/build/cmake/CMakeLists.txt"
fi

Length of output: 3636


Remove redundant ZSTD_BUILD_TESTS=OFF flag per PR policy.

Verification confirms SHA-256 hash integrity and CMAKE_SOURCE_DIR path are correct. However, the ZSTD_BUILD_TESTS CMake option defaults to OFF in zstd v1.5.7 (its default depends on the BUILD_TESTING variable, which itself defaults to OFF in CMake). Per the PR's stated policy of disabling testing flags only when they default to ON, this flag is redundant and should be removed from CMAKE_GEN_ARGS.

🤖 Prompt for AI Agents
In taskfiles/deps/installs/zstd.yaml around lines 1 to 20, remove the redundant
"-DZSTD_BUILD_TESTS=OFF" entry from the CMAKE_GEN_ARGS list because zstd v1.5.7
already defaults tests off; just delete that line and leave the other CMake args
(and keep the existing TARBALL_SHA256, TARBALL_URL and CMAKE_SOURCE_DIR
unchanged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants