Skip to content

Split compose.rs by what it composes - #37

Merged
tauanbinato merged 3 commits into
large-file-partsfrom
split-compose
Sep 27, 2026
Merged

tauanbinato merged 3 commits into
large-file-partsfrom
split-compose

Conversation

@tauanbinato

Copy link
Copy Markdown
Contributor

Stacked on #36: its base is large-file-parts, so the diff here is the move alone. Merge #36 first, then retarget this PR to main (branches aren't deleted on merge here, so GitHub won't do it).

src/units/compose.rs was the largest source file (1,915 lines after #36). A blind labeler, reading it with the rest of the codebase, called it a review-level split. Three reasons: the follow-up selectors that only follow_ups.rs uses, the measured caps, and the redundant-test and comment grouping are each read and changed apart, and the project already splits outcome/ and wording/ the same way. I agree, so this moves it into a module:

File Lines What it holds
compose/mod.rs 682 compose, the per-rule tally, undecided units, dimensions, file status, the finding
compose/answers.rs 187 the answers an outcome rests on (first pass, rechecks, traces, settles, locates)
compose/due.rs 352 which units each follow-up stage asks next; the functions follow_ups.rs calls are re-exported, so their paths are unchanged
compose/caps.rs 303 the measured limits on a finding's level
compose/located.rs 208 where a finding points: block, value, constant, group or part
compose/redundant.rs 148 redundant tests grouped in threes or more
compose/comments.rs 99 a unit's comments reported together

It's a pure move. Items and their doc comments are unchanged, apart from pub(super) visibility, crate::units:: paths where the code said super::, and Redundant's fields becoming pub(super).

Checked:

Not done, for later if you want them. The same labeler called four more files consider-level splits:

  • analysis/clones.rs: the directory predicates that three other modules import, and the walk-frame recognizer.
  • units/security.rs: the settle catalog and Subject with its constructors.
  • units/test_units.rs: the setup-text scanning layer.
  • units/questions/security.rs: the confirm Choices and the Django checks.

It called file_kind.rs, test_map.rs, transport.rs, docs/load.rs and analysis/comments.rs fine as they are.

@tauanbinato
tauanbinato merged commit 8ee3609 into large-file-parts Sep 27, 2026
8 checks passed
@tauanbinato
tauanbinato deleted the split-compose branch September 27, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant