agents/skills/header-cycle-breaker/SKILL.md
This skill outlines the systematic approach to breaking cyclic dependencies in
V8 headers, specifically focusing on moving heavy inline includes to more
localized .cc files or non-inline headers, and resolving the resulting cascade
of "undefined inline function" errors (IWYU - Include What You Use style).
Use this skill when:
-inl.h include from another -inl.h or .h file.[-Werror,-Wundefined-inline] errors after modifying
a heavy header.-inl.h can be replaced with
its non-inline counterpart (.h) or where an include can be moved entirely
to implementation files.Breaking a heavy include chain will cause many implementation files (.cc) and
even generated files to fail because they were relying on transitive includes
for inline definitions.
-inl.h file defines it.-inl.h file directly in the failing .cc file, preferably
within appropriate guards (e.g., #if V8_ENABLE_WEBASSEMBLY).If a generated file (e.g., objects-printer.cc) fails with undefined inline
methods:
src/torque/).#include statements in the files it generates.#if V8_ENABLE_WEBASSEMBLY.