Skip to content

refactor(taskfiles)!: Rename and reorganize utils:cmake:install-remote-tar's parameters. #55

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

Merged
merged 6 commits into from
May 16, 2025

Conversation

davidlion
Copy link
Member

@davidlion davidlion commented May 15, 2025

Description

As title says.

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

Test changes locally with tasks inside log-surgeon.

Summary by CodeRabbit

  • Refactor
    • Improved parameter naming and organization for task configuration, introducing consistent prefixes and grouping for better clarity.
    • Updated documentation within the configuration to reflect new parameter names and groupings.
    • No changes to underlying task logic or functionality.

@davidlion davidlion requested a review from a team as a code owner May 15, 2025 20:12
Copy link
Contributor

coderabbitai bot commented May 15, 2025

## Walkthrough

The change refactors the parameter names and organization for the `install-remote-tar` task in `cmake.yaml`. It introduces consistent prefixes (`TAR_` and `CMAKE_`) for related parameters, updates required variables, and revises comments for clarity. No logic or control flow within the tasks is altered.

## Changes

| File(s)                      | Change Summary                                                                                                                       |
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| exports/taskfiles/utils/cmake.yaml | Refactored parameter names for the `install-remote-tar` task, grouped parameters by function, updated `requires.vars`, revised comments, and reorganized parameter defaults. No changes to task logic or control flow. |

## Possibly related PRs

- y-scope/yscope-dev-utils#22: Refactored and renamed parameters for the same `install-remote-tar` task, directly modifying its parameter structure.  
- y-scope/yscope-dev-utils#41: Added functionality to write CMake settings and manage dependencies, including updates to the `install-remote-tar` task and its parameters.  
- y-scope/yscope-dev-utils#27: Renamed tasks and restructured namespaces in the same taskfile, affecting the `install-remote-tar` task from a structural perspective.  

## Suggested reviewers

- kirkrodrigues

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 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 7c0160d and b5336fd.

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

132-136: Required parameters section updated correctly
The newly added parameters TAR_SHA256, TAR_URL, and WORK_DIR are clearly documented with concise descriptions, matching the breaking-change renaming.


138-145: CMake parameter docs are clear and complete
All CMAKE_* args now have their own @param entries with appropriate types and descriptions, including the optional CMAKE_TARGETS.

Also applies to: 149-149


152-158: Directory parameters documented as expected
BUILD_DIR, INSTALL_PREFIX, and SOURCE_DIR descriptions clearly express their default values relative to WORK_DIR.


161-161: Task label updated to use TAR_URL
The label now references .TAR_URL instead of the old .URL, ensuring it reflects the renamed parameter.


164-175: vars block correctly references new CMAKE_* variables
Each CMake runtime variable is wired to its new CMAKE_* counterpart with appropriate defaults.


179-183: Directory vars default correctly relative to WORK_DIR
BUILD_DIR, INSTALL_PREFIX, and SOURCE_DIR defaults are built from WORK_DIR and NAME as intended.


186-186: requires.vars updated to include new parameters
The task now requires NAME, TAR_SHA256, TAR_URL, and WORK_DIR, matching the signature change.


188-192: Download dependency wired to renamed parameters
The remote:download-and-extract-tar subtask now takes FILE_SHA256 from TAR_SHA256 and URL from TAR_URL.


197-200: Generate subtask uses CMAKE_GEN_ARGS
The invocation of generate now pulls EXTRA_ARGS from the renamed CMAKE_GEN_ARGS variable.


203-207: Build step updated to new CMake variables
build now uses CMAKE_BUILD_ARGS, CMAKE_JOBS, and CMAKE_TARGETS as intended.


213-215: Install subtask invocation aligned with refactor
The install task receives CMAKE_INSTALL_ARGS, INSTALL_PREFIX, and NAME correctly.


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

🔭 Outside diff range comments (1)
exports/taskfiles/utils/cmake.yaml (1)

192-206: ⚠️ Potential issue

Reference new CMake argument variables in generate and build calls.
The invocations of the generate and build subtasks still map to old variables (.GEN_ARGS, .BUILD_ARGS, .JOBS, .TARGETS). They should use .CMAKE_GEN_ARGS, .CMAKE_BUILD_ARGS, .CMAKE_JOBS, and .CMAKE_TARGETS.

-      - task: "generate"
-        vars:
-          BUILD_DIR: "{{.BUILD_DIR}}"
-          EXTRA_ARGS:
-            ref: ".GEN_ARGS"
-          SOURCE_DIR: "{{.SOURCE_DIR}}"
+      - task: "generate"
+        vars:
+          BUILD_DIR: "{{.BUILD_DIR}}"
+          EXTRA_ARGS:
+            ref: ".CMAKE_GEN_ARGS"
+          SOURCE_DIR: "{{.SOURCE_DIR}}"

-      - task: "build"
-        vars:
-          BUILD_DIR: "{{.BUILD_DIR}}"
-          EXTRA_ARGS:
-            ref: ".BUILD_ARGS"
-          JOBS: "{{.JOBS}}"
-          TARGETS:
-            ref: ".TARGETS"
+      - task: "build"
+        vars:
+          BUILD_DIR: "{{.BUILD_DIR}}"
+          EXTRA_ARGS:
+            ref: ".CMAKE_BUILD_ARGS"
+          JOBS: "{{.CMAKE_JOBS}}"
+          TARGETS:
+            ref: ".CMAKE_TARGETS"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1e219ed and 392663f.

📒 Files selected for processing (1)
  • exports/taskfiles/utils/cmake.yaml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: unit-tests (ubuntu-22.04)

@davidlion davidlion requested a review from kirkrodrigues May 15, 2025 20:56
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:

refactor(taskfiles)!: Rename and reorganize `utils:cmake:install-remote-tar`'s parameters.

Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
@davidlion davidlion changed the title refactor(taskfiles)!: Rename and organize the parameters of utils:cmake:install-remote-tar. refactor(taskfiles)!: Rename and reorganize utils:cmake:install-remote-tar's parameters. May 16, 2025
@davidlion davidlion requested a review from kirkrodrigues May 16, 2025 04:53
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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 742a580 and 7c0160d.

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

132-136: Well-documented required parameters

The newly required parameters NAME, TAR_SHA256, TAR_URL, and WORK_DIR are annotated with concise JSDoc comments, improving discoverability and reducing onboarding friction.


139-151: Clear CMake parameter annotations

All CMake-related parameters (CMAKE_BUILD_ARGS, CMAKE_GEN_ARGS, CMAKE_INSTALL_ARGS, CMAKE_JOBS, CMAKE_SETTINGS_DIR, CMAKE_TARGETS) now carry consistent prefixes, default values, and descriptive comments, enhancing clarity and preventing ambiguity.


153-158: Directory parameter defaults

The directory parameters (BUILD_DIR, INSTALL_PREFIX, SOURCE_DIR) are sensibly defaulted relative to WORK_DIR and NAME, reducing boilerplate and potential misconfigurations.


161-161: Updated task label

The task label now correctly uses {{.TAR_URL}} in place of the old {{.URL}}, ensuring generated labels match the renamed parameter.


164-175: Refactored vars block for optional parameters

The vars section cleanly references the new CMAKE_* variables for defaults, aligning task internals with the renamed parameters and avoiding stale references.


178-183: Proper grouping of directory vars

The BUILD_DIR, INSTALL_PREFIX, and SOURCE_DIR defaults leverage printf with WORK_DIR and NAME, making directory layout predictable and consistent.


185-186: Accurate required variables list

The requires.vars array now accurately lists the breaking-change parameters (NAME, TAR_SHA256, TAR_URL, WORK_DIR), reflecting the updated signature.


188-192: Corrected download dependency parameter mapping

The remote:download-and-extract-tar dependency is updated to pull FILE_SHA256 from TAR_SHA256 and URL from TAR_URL, ensuring the download step gets the right inputs.


194-200: Generate subtask invocation updated

The generate call correctly maps EXTRA_ARGS from .CMAKE_GEN_ARGS, maintaining consistency with the renamed generate parameters.


208-216: Install subtask aligns with renamed parameters

The install call now leverages EXTRA_ARGS from .CMAKE_INSTALL_ARGS and correctly references other updated variables, completing the parameter rename across all subtasks.

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.

2 participants