understanding-hot-reload-limits

Explains which Kotlin and Compose changes hot-reload under HotSwan and which force rebuilds.

1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill understanding-hot-reload-limits-citytexi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: understanding-hot-reload-limits
Source: https://github.com/citytexi/team-yg-pesonal-agent/tree/main/.claude/skills/understanding-hot-reload-limits
Command: npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill understanding-hot-reload-limits-citytexi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android developers using Compose HotSwan often cannot tell why an edit hot-reloaded in under a second while another triggered a full incremental rebuild. This Skill teaches the exact boundary imposed by Android Runtime (ART) class schema immutability, so iteration sessions stay inside the fast path instead of silently falling back to multi-second rebuilds. ## Core Features & Use Cases - Boundary tables: Complete lists of hot-reloadable changes (function bodies, new composables, resource value edits) versus rebuild-forcing changes (signatures, constructors, interfaces, new resource ids, inline functions, lambda count changes). - Diff-then-batch workflow: A step-by-step process for diagnosing a failed reload and ordering edits so schema changes are batched at the end of a session. - Pitfall patterns with code: Concrete Kotlin and XML examples covering inline functions, data class properties (API 30+ exception), and new resource ids. - Use Case: During PR review, a refactor adds a parameter to a composable. Use this Skill to flag that the change forces a rebuild and recommend introducing the parameter with a default value once, then iterating on the body. ## Quick Start Ask the assistant to explain why your last Compose edit triggered a full rebuild instead of hot-reloading.

Frequently Asked Questions about understanding-hot-reload-limits

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

FAQPage Schema
Why did my Compose change trigger a full rebuild instead of hot-reloading?▼

ART only allows method body changes at runtime; any class schema change forces a rebuild. Adding parameters, changing constructors, modifying interfaces, adding new resource ids, editing inline functions, or changing lambda counts all violate the schema constraint and trigger HotSwan's incremental build fallback.

What changes does Compose HotSwan hot-reload support?▼

HotSwan hot-reloads composable and non-composable function bodies, new composables, reordered composables (1.2.0+), resource value edits, extension functions, and data class property additions on API 30+. Only method bodies are mutable at runtime under ART class redefinition rules.

Why don't inline function changes hot-reload in Compose?▼

Inline functions are expanded at every call site at compile time, leaving no discrete unit to swap at runtime. Editing an inline body forces a full rebuild of every call site. Drop the inline modifier during iteration and restore it before commit.

Does adding a new string resource hot-reload on Android?▼

No. Adding a new resource id grows the generated R class, which is a schema change ART cannot redefine in place. Editing the value of an existing string resource hot-reloads, but new ids require a rebuild on every API level.

Can I add data class properties without a rebuild?▼

Only on API 30 and above, where HotSwan supports adding data class properties. Below API 30 the constructor schema change forces a rebuild, so batch property additions together and accept one rebuild per batch.

How do I keep a hot-reload session in the fast path during a refactor?▼

Make body-only edits first to reach a working visual state, then batch signature, constructor, interface, or new-resource-id changes into a final save that accepts one rebuild. Introduce new parameters once with default values, then iterate on bodies.