Skip to content

Conversation

@jackluo923
Copy link
Member

@jackluo923 jackluo923 commented Jul 14, 2025

Description

This PR introduces foundational low-level functionality to support a broader initiative: migrating the libarchive dependency to be downloaded and compiled via task, pinned to a secure version across all platforms. For the transitive dependencies zstd and lz4, the CMake source directory is located at <project root>/build/cmake. These changes are essential for enabling robust, platform-consistent behavior in the CLP repository’s task files

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

Validation was performed by compiling libarchive along with all its transitive dependencies—lz4, xz, zlib, and zstd—using the functionality introduced in this PR.

Summary by CodeRabbit

  • New Features
    • Added support for specifying a custom CMake source directory when using the install-remote-tar task. This allows builds to be generated from a subdirectory within the extracted source tree.

@jackluo923 jackluo923 requested a review from a team as a code owner July 14, 2025 15:44
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

Walkthrough

The install-remote-tar task in exports/taskfiles/utils/cmake.yaml was updated to include an optional CMAKE_SOURCE_DIR parameter, allowing users to specify a custom subdirectory for the CMake source relative to the extracted source directory. The default behaviour remains unchanged if the parameter is not provided.

Changes

File(s) Change Summary
exports/taskfiles/utils/cmake.yaml Added optional CMAKE_SOURCE_DIR parameter to install-remote-tar task; renamed SOURCE_DIR to EXTRACTION_DIR; updated source directory construction and documentation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TaskRunner
    participant CMake

    User->>TaskRunner: Run install-remote-tar (with optional CMAKE_SOURCE_DIR)
    TaskRunner->>TaskRunner: Extract remote tar to EXTRACTION_DIR
    TaskRunner->>TaskRunner: Set SOURCE_DIR = EXTRACTION_DIR/CMAKE_SOURCE_DIR (default ".")
    TaskRunner->>CMake: Run generate task with SOURCE_DIR
    CMake-->>TaskRunner: Generation complete
Loading

Possibly related PRs

Suggested reviewers

  • davidlion
  • kirkrodrigues

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a090859 and 3756cc8.

📒 Files selected for processing (1)
  • exports/taskfiles/utils/cmake.yaml (3 hunks)
🔇 Additional comments (5)
exports/taskfiles/utils/cmake.yaml (5)

145-147: Clearer description for WORK_DIR

The updated comment precisely states that the directory now hosts the build, install and extraction artefacts—nice clarity boost.


159-160: Accurate docstring for CMAKE_SOURCE_DIR

The new parameter is documented with its default value and purpose, and its placement keeps the list alphabetically ordered. Looks good.


185-186: EXTRACTION_DIR naming is clearer than the old SOURCE_DIR

Renaming eliminates ambiguity between extracted source and build directories—good improvement.


194-195: OUTPUT_DIR now points to EXTRACTION_DIR

The dependency now writes into the renamed directory, ensuring consistency across tasks.


202-202: Straightforward join of extraction and CMake source sub-dir

The simple concatenation keeps the template readable and aligns with the team’s preference to avoid conditional logic for the “/.” case.

✨ Finishing Touches
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6bfbd and 4ffb80b.

📒 Files selected for processing (1)
  • exports/taskfiles/utils/cmake.yaml (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: sitaowang1998
PR: y-scope/yscope-dev-utils#64
File: exports/taskfiles/utils/boost.yaml:31-37
Timestamp: 2025-06-08T17:55:11.362Z
Learning: For Boost builds in yscope-dev-utils, symlinking only the top-level directories from SOURCE_DIR to BUILD_DIR is sufficient for the build to succeed. Recursive symlinking of all nested files and directories is not necessary.
Learnt from: AVMatthews
PR: y-scope/yscope-dev-utils#13
File: taskfiles/utils.yml:149-149
Timestamp: 2024-10-28T19:02:02.131Z
Learning: In `taskfiles/utils.yml`, avoid using GNU-specific options like `-r` and `--no-run-if-empty` with `xargs` for better portability; instead, use `find`'s `-exec` option.
exports/taskfiles/utils/cmake.yaml (1)
Learnt from: sitaowang1998
PR: y-scope/yscope-dev-utils#64
File: exports/taskfiles/utils/boost.yaml:31-37
Timestamp: 2025-06-08T17:55:11.362Z
Learning: For Boost builds in yscope-dev-utils, symlinking only the top-level directories from SOURCE_DIR to BUILD_DIR is sufficient for the build to succeed. Recursive symlinking of all nested files and directories is not necessary.
⏰ 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: unit-tests (ubuntu-22.04)
  • GitHub Check: unit-tests (ubuntu-24.04)
🔇 Additional comments (1)
exports/taskfiles/utils/cmake.yaml (1)

160-162: Good addition – new parameter clearly documented
The explanatory block for CMAKE_SOURCE_DIR is concise and puts the parameter in the correct context.

Bill-hbrhbr
Bill-hbrhbr previously approved these changes Jul 14, 2025
@jackluo923 jackluo923 requested a review from kirkrodrigues July 15, 2025 09:06
Copy link
Member

@kirkrodrigues kirkrodrigues left a 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: Add `CMAKE_SOURCE_DIR` parameter to `install-remote-tar` to support installing projects whose `CMakeLists.txt` isn't in the root directory.

@Bill-hbrhbr Bill-hbrhbr changed the title feat: Add CMAKE_SOURCE_DIR variable to install-remote-tar task. feat: Add CMAKE_SOURCE_DIR parameter to install-remote-tar to support installing projects whose CMakeLists.txt isn't in the root directory. Jul 25, 2025
@Bill-hbrhbr Bill-hbrhbr merged commit b965f19 into y-scope:main Jul 25, 2025
7 checks passed
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.

3 participants