Split compose.rs by what it composes - #37
Merged
Merged
Conversation
…dant tests and comments it composes
This was referenced Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #36: its base is
large-file-parts, so the diff here is the move alone. Merge #36 first, then retarget this PR tomain(branches aren't deleted on merge here, so GitHub won't do it).src/units/compose.rswas 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 onlyfollow_ups.rsuses, the measured caps, and the redundant-test and comment grouping are each read and changed apart, and the project already splitsoutcome/andwording/the same way. I agree, so this moves it into a module:compose/mod.rscompose, the per-rule tally, undecided units, dimensions, file status, the findingcompose/answers.rscompose/due.rsfollow_ups.rscalls are re-exported, so their paths are unchangedcompose/caps.rscompose/located.rscompose/redundant.rscompose/comments.rsIt's a pure move. Items and their doc comments are unchanged, apart from
pub(super)visibility,crate::units::paths where the code saidsuper::, andRedundant's fields becomingpub(super).Checked:
compose.rsonce visibility, those paths and formatting are normalized (compared mechanically).cargo +1.90.0 check --lockedpass.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 andSubjectwith 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.rsandanalysis/comments.rsfine as they are.