# Changelog
## Unreleased
## 0.2.2 - 2026-10-31
- `explode`: a comment set off from the previous item by a blank line, such
as a section banner, now leads the following item instead of trailing the
previous one. The previous item keeps comment lines directly below it and
a same-line trailing comment. The round trip stays byte-exact.
- `split`: a module is named after the first section banner heading one of
its items, else its largest named item. Names that would shadow a crate
(`core`, `std`, `alloc`, `proc_macro`, `test`), keywords and names bound by
the root's imports get a `_` suffix; `mod core;` no longer breaks `core::`
paths in the split module.
- `split --module` and nested-split groups raise moved private items, fields
and methods to `pub(super)` instead of `pub(crate)`, and re-export
private-only modules with a private `use m::*;`. Crate-root output is
unchanged.
- Copied imports that start at a module or enum of the split file are
anchored (`use super::model::*;`, `use crate::Kind::*;`) instead of
resolving through the sibling glob.
- `split`: keep local structs, enums and unions with inherent impls verbatim
in the parent, with their imports and private fields intact. Recognize
unqualified and `self::Type` owners, including generics and oversized impls.
Section banners now bound grouping; reference edges cannot join different
sections, while references still determine cohesion within a section. Shared
types no longer pull otherwise independent impls into the same child.
Reserve retained type names when choosing generated module names, and keep
adding suffixes until the name is free. Root LOC overflows remain explicit.
Document these syntactic rules and the remaining manual grouping workflow.
- T6 review corrections: retain complete declaration imports (bounds, defaults,
where clauses and attribute tokens); keep impls with explicit owner-local
members in the parent; preserve required local macro definitions, helper
macros and their syntactic consumers in source order; and reserve retained
names when allocating recursive groups. Existing adjacency metadata stays
unchanged. Conservative lexical retention can leave the parent over budget.
- Include retained aliases and traits in generated-module name reservations,
including names retained as lexical macro consumers, at every split level.
Validation: 103 tests passed, none ignored; formatting and Clippy checks passed.
Independent Code and State reviews accepted the implementation after two
remediation rounds. Grouping remains syntactic; conservative parent retention
can leave the owning module above budget, which is reported explicitly.
## 0.2.1 - 2026-09-18
- Preserve oversized declarations in their original module instead of silently
omitting them from split output, including oversized `main` functions and
declarations inside recursively split modules.
- Preserve imports and module preambles needed by retained declarations.
- Keep `cfg`/`cfg_attr` inline modules braced and intact so same-named platform
implementations cannot overwrite one another in an extracted file.
- Exit non-zero when the line budget remains unmet, including module-wiring
overhead. Preserved output is still written for review. Scripts that previously
relied on exit 0 for incomplete splits must handle this failure status.
- Large conditional modules remain inline and may require manual extraction.
Existing conditional attributes on other declarations are not migrated.
Validation: 67 tests, including compilation of both conditional alternatives,
plus formatting and Clippy checks.