Skip to content

build(taskfiles): Update to latest version of yscope-dev-utils; Replace cmake operations with cmake tasks; Add clean-core task.#734

Merged
davidlion merged 11 commits into
y-scope:mainfrom
davidlion:dev-utils-update
Feb 27, 2025
Merged

Conversation

@davidlion

@davidlion davidlion commented Feb 26, 2025

Copy link
Copy Markdown
Member

Description

Bumps the version of yscope-dev-utils and fixes the breaking changes:

  • Update task naming to new namespace convention in dev-utils.
  • Update cmake task calls.
  • Update cpp-lint task calls.
  • Add simple clean-core task that runs the cmake clean target.

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

Run tasks locally and passing CI.

Summary by CodeRabbit

  • New Features
    • Introduced a new command to streamline the cleanup of the core build directory.
  • Refactor
    • Renamed and reorganized task commands to enhance consistency across checksum validation, virtual environment creation, and C++ linting operations.
  • Chores
    • Updated build and linting procedures using improved utility commands, and refreshed a dependency to a newer version for better stability.

@coderabbitai

coderabbitai Bot commented Feb 26, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request implements updates to task definitions and naming conventions across various YAML configuration files. It introduces a new clean-core task, modifies paths and variable assignments in the core build process, and renames several utility tasks (checksum, text replacement, virtual environment creation) to use more specific namespaces. Additionally, the subproject commit hash in the tools/yscope-dev-utils directory has been updated.

Changes

Files Change Summary
Taskfile.yml - Updated the utils task file path to .../utils/utils.yaml
- Added new task clean-core executing utils:cmake:clean
- Modified the core task's SRC_DIR to include ROOT_DIR
- Refactored core build commands to use utils:cmake:generate and utils:cmake:build
- Renamed checksum tasks from utils:validate-checksum/utils:compute-checksum to utils:checksum:validate/utils:checksum:compute
- Updated text replacement task from utils:replace-text to utils:misc:replace-text
deps-tasks.yml, docs/tasks.yml - Renamed checksum tasks from :utils:validate-checksum/:utils:compute-checksum to :utils:checksum:validate/:utils:checksum:compute
- In docs/tasks.yml, changed virtual environment creation from :utils:create-venv to :utils:misc:create-venv
lint-tasks.yml - Added variable G_CORE_DIR
- Updated lint tasks by renaming cpp to cpp-format-check and cpp-format-fix
- Renamed checksum tasks to checksum:validate and checksum:compute
- Updated venv task to reference :utils:misc:create-venv
tools/yscope-dev-utils - Updated the subproject commit hash from c8b5d5c26506a1db8d5ec0f183f4e5fa7417fb66 to 869fa53339630402fa354d93cbc2a1e24364a645

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TaskRunner
    participant CMakeUtils
    User->>TaskRunner: Initiate core build
    TaskRunner->>CMakeUtils: Generate build files (utils:cmake:generate)
    TaskRunner->>CMakeUtils: Build core component (utils:cmake:build)
    User->>TaskRunner: Trigger core clean-up (clean-core)
    TaskRunner->>CMakeUtils: Clean build directory (utils:cmake:clean)
Loading
sequenceDiagram
    participant Developer
    participant TaskRunner
    participant ClangFormatUtil
    participant ChecksumUtil
    participant MiscUtil
    Developer->>TaskRunner: Run lint check
    TaskRunner->>ClangFormatUtil: Execute check (cpp-format-check using G_CORE_DIR)
    Developer->>TaskRunner: Request checksum validation
    TaskRunner->>ChecksumUtil: Validate checksum (checksum:validate)
    Developer->>TaskRunner: Execute text replacement
    TaskRunner->>MiscUtil: Replace text (utils:misc:replace-text)
Loading

Possibly related PRs

Suggested reviewers

  • kirkrodrigues

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@davidlion davidlion marked this pull request as ready for review February 26, 2025 23:32
@davidlion davidlion requested a review from a team as a code owner February 26, 2025 23:32

@kirkrodrigues kirkrodrigues left a comment

Copy link
Copy Markdown
Member

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:

build(taskfiles): Update to latest version of yscope-dev-utils; Replace cmake operations with cmake tasks; Add `clean-core` task.

Comment thread lint-tasks.yml Outdated
Comment thread lint-tasks.yml
Comment thread lint-tasks.yml
Comment thread lint-tasks.yml
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lint-tasks.yml (1)

4-4: Core Directory Variable Declaration
The new G_CORE_DIR variable neatly encapsulates the core component’s directory path. Ensure that you maintain consistency across the repository—if any other variable (such as G_CORE_COMPONENT_DIR) exists, consider consolidating them for clarity.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 06abe68 and 3d538e2.

📒 Files selected for processing (1)
  • lint-tasks.yml (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (12)
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: ubuntu-focal-static-linked-bins
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: ubuntu-focal-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: build-macos (macos-14, false)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: build-macos (macos-13, true)
  • GitHub Check: build (macos-latest)
  • GitHub Check: lint-check (macos-latest)
🔇 Additional comments (10)
lint-tasks.yml (10)

28-30: Enhanced Source File References in cpp-check
Introducing source paths using {{.G_CORE_DIR}} improves maintainability and clarity by centralising the core file references. Please verify that these glob patterns correctly capture all relevant files (e.g., the clang-format configuration, source files, and test files) for your linting requirements.


32-32: Task Call Update for cpp-check
Changing the command from a direct cpp invocation to the cpp-format-check task streamlines the workflow and aligns with the updated naming conventions.


37-37: Refined Fix Task Implementation
The update to use cpp-format-fix in place of the previous cpp task improves clarity and modularity. This change is consistent with aligning all formatting tasks under the new naming standard.


108-118: Implementation of cpp-format-check Task
This new task block defines the cpp-format-check process effectively by:

  • Using the shared source files (*cpp_source_files)
  • Setting the proper dependencies such as cpp-lint-configs and venv
  • Configuring a dry-run check with --dry-run and the appropriate filename patterns
    Please verify that the file patterns fully encompass all necessary files.

119-128: Implementation of cpp-format-fix Task
The corresponding cpp-format-fix task is well configured with:

  • The in-place fix flag -i
  • Consistent use of the shared source files and variable settings
    Ensure that this task does not inadvertently modify files outside the intended scope.

184-188: Checksum Validate Task Update
Integrating the :utils:checksum:validate task in the linter-node-modules section is a good move for verifying file integrity. Please confirm that the CHECKSUM_FILE and INCLUDE_PATTERNS variables are set correctly to target the desired directories.


193-197: Checksum Compute Task Update in Linter Section
The task call to :utils:checksum:compute is configured consistently with the validation task, ensuring that file integrity is re-verified after module operations.


210-214: Venv Checksum Validate Task
Within the venv block, using the :utils:checksum:validate task upholds the checksum verification process. This aligns well with the overall consistency improvements across tasks.


215-219: Refinement of Virtual Environment Creation
Transitioning to the :utils:misc:create-venv task reflects the updated naming convention and utility standardisation. This update should improve clarity and maintain the modular approach evident throughout the tasks.


221-224: Virtual Environment Checksum Computation
The final checksum computation within the venv block finalises the environment’s integrity check perfectly. Please double-check that the inclusion patterns are sufficiently comprehensive.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lint-tasks.yml (1)

99-115: Configuration of the cpp-format-check Task
The definition of the cpp-format-check task is well structured. Using the alias *cpp_source_files for the source file list enhances maintainability. One minor note: the inclusion of "*.inc" in the INCLUDE_FILENAME_PATTERNS should be verified. If support for .inc files is not required by your coding standards, consider removing them; otherwise, it is fine as is.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3d538e2 and 4c9da5c.

📒 Files selected for processing (1)
  • lint-tasks.yml (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: build-macos (macos-14, false)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-13, true)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: lint-check (macos-latest)
🔇 Additional comments (6)
lint-tasks.yml (6)

22-25: Task Naming Update for C++ Check Task
The cpp-check task now delegates to the updated cpp-format-check task. This change aligns with the new namespace convention introduced in yscope-dev-utils. Please ensure that all references to the old task name are updated uniformly across the codebase.


26-29: Task Naming Update for C++ Fix Task
The cpp-fix task now calls the updated cpp-format-fix task. This modification improves consistency with the new naming conventions. Confirm that any documentation or downstream configurations referencing the old task name are updated accordingly.


116-125: Configuration of the cpp-format-fix Task
The cpp-format-fix task mirrors the structure of its check counterpart and correctly uses the new task naming. As with the check task, please verify that the file extension patterns (including "*.inc") are intentional. This consistency is essential for ensuring that both tasks operate on the intended file set.


181-184: Checksum Validation Task Rename
The task call for checksum validation under the linter-node-modules section now uses :utils:checksum:validate, which is consistent with the new naming scheme. This update improves clarity and should be checked for consistency across any other modules that depend on this task.


190-194: Checksum Compute Task Rename
The update from the old checksum compute task to :utils:checksum:compute is correctly applied here, ensuring that the new naming conventions are consistently used in checksum operations.


207-221: Virtual Environment Task Update in venv Section
Within the venv task, the changes reflect the new naming conventions:

  • The checksum validation now correctly uses :utils:checksum:validate.
  • The task has been updated to call :utils:misc:create-venv instead of the old create-venv, which enhances modularity and clarity.
  • The subsequent checksum compute step using :utils:checksum:compute is also in line with the new framework.

Overall, these updates improve the organizational structure and consistency across tasks.

@davidlion davidlion changed the title build(taskfiles): Update yscope-dev-utils and fix breaking changes; Add clean-core task. build(taskfiles): Update to latest version of yscope-dev-utils; Replace cmake operations with cmake tasks; Add clean-core task. Feb 27, 2025
@davidlion davidlion changed the title build(taskfiles): Update to latest version of yscope-dev-utils; Replace cmake operations with cmake tasks; Add clean-core task. build(taskfiles): Update to latest version of yscope-dev-utils; Replace cmake operations with cmake tasks; Add clean-core task. Feb 27, 2025
@davidlion davidlion merged commit 78c1c3f into y-scope:main Feb 27, 2025
@davidlion davidlion deleted the dev-utils-update branch February 27, 2025 02:13
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
…ce cmake operations with cmake tasks; Add `clean-core` task. (y-scope#734)

Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
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