xmake-debug-package-source
Installation
SKILL.md
Debugging Package Source Code
Packages installed via add_requires / xrepo fail for many reasons — upstream bug on your toolchain, outdated patch, missing flag. This skill is about the iteration loop for fixing a broken package recipe or upstream source without losing work between attempts.
Default recipe flow:
add_requires("foo") → fetch tarball → apply patches → on_install → on_test
Each time the recipe runs, xmake blows away the extracted source and re-applies patches. That's fine for stable packages, terrible for debugging — every change you make to the unpacked source is lost on the next run.
1. Fast-path: -d <local-source-dir> with scripts/test.lua
Inside an xmake-repo clone (your own or the official one):
xmake l scripts/test.lua -vD --shallow -d /tmp/zlib-1.2.11 zlib