diff-apply

Apply diff files to the ace_engine codebase with conflict resolution and build validation.

14|8|Updated Oct 29, 2024
One-click install
npx skills add https://github.com/openharmony/arkui_ace_engine --skill diff-apply
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diff-apply
Source: https://github.com/openharmony/arkui_ace_engine/tree/main/.claude/skills/arkoala_diff_apply
Command: npx skills add https://github.com/openharmony/arkui_ace_engine --skill diff-apply

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Applying generated diff files to the ace_engine codebase can be error-prone due to merge conflicts and potential logic changes. This Skill ensures diffs are applied safely with proper backups and validation.

Core Features & Use Cases

  • Diff/Application Workflow: Analyze, backup, apply, and resolve conflicts using standard tools (git apply, patch) and the project's conflict-resolution guidelines.
  • Conflict Resolution: Resolve diffs while preserving original behavior, guided by references/conflict_resolve.md.
  • Build Validation: Compile the project after applying diffs to ensure successful integration and detect regressions.
  • Use Case: When you need to apply a patch to ace_engine across TS/C++ sources with potential conflicts, and ensure compilation passes afterward.

Quick Start

  1. Place your patch file (diff or patch) in your working directory under ROOT/code/foundation/arkui/ace_engine.
  2. Execute the diff-apply workflow to apply the patch to the ace_engine tree.
  3. If .rej files appear, resolve conflicts using references/conflict_resolve.md and re-run the apply step.

Frequently Asked Questions about diff-apply

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply a patch to ace_engine without breaking the TypeScript or C++ build?

To apply a patch to ace_engine safely, place the diff file in the workspace, run the application workflow, resolve any conflicts, and validate the integration by compiling the project to detect regressions.

What should I do when git apply creates .rej files in the ace_engine codebase?

When git apply creates .rej files in ace_engine, resolve the rejected changes using conflict resolution guidelines to preserve original logic, then re-run the apply step to complete the patch integration.

Does this diff application process create backups before modifying the ace_engine source code?

Yes, the diff application process performs backups of original files before applying patches, ensuring you can safely revert if the merge conflicts cannot be resolved or the build validation fails.

How can I resolve merge conflicts when applying a diff across hybrid TS and C++ sources?

You can resolve merge conflicts in hybrid TS and C++ sources by following project-specific conflict resolution guidelines that ensure original behavior is preserved while integrating the new patch changes.

What is the best way to verify a patch integrates successfully into ace_engine?

The best way to verify successful patch integration is to run the build script after applying the diff and resolving conflicts, which compiles the project to ensure no regressions were introduced.