Skip to content

Remove dead code: unused helpers, fields, accessors and test hooks - #213

Merged
bcourbage merged 1 commit into
mainfrom
cleanup/dead-code
Nov 8, 2026
Merged

bcourbage merged 1 commit into
mainfrom
cleanup/dead-code

Conversation

@bcourbage

Copy link
Copy Markdown
Owner

Behavior-preserving deletion of code with no callers. 17 files, +26/-152.

Removed (each checked by grepping Sources and Tests for references)

  • ArchiveHash: the single-root wrappers compute and computeFromProfileText (no product callers), and the unread hashInput and allRootsLocal fields. The digest and multi-root tests are kept; the single-root ones now go through computeAllFromProfileText with a small test helper, so the same inputs and assertions run.
  • Unwired helpers: SettingsModel.resetReconcileDisplay and suggestedLogfile, CommandLineSetupBound.evaluateAbsentFile, and the Setup path-care helper commandPathNeedsCare with its commandPathCareNote copy. Tests that existed only for resetReconcileDisplay (2) and commandPathNeedsCare (1) are removed with them.
  • Orphaned test accessors (6, no callers in Tests): includesDetailsForTesting, checkIsRunningForTesting, conflictSelectionIndexForTesting, checkStatusFitsForTesting, keyNavAdvanceForTesting, outlineViewForTesting. The live layout and menu hooks, including the auto-presentation assertion and checkStatusGeometryForTesting, stay.
  • Unreferenced accessors (7): didAcquire, isAcquiring, outstandingOwner, ProfileFileOpsError.localizedMessage, ProfileDocument.hasPassThroughDirectives, UnisonPreferenceCatalog.allNames, and the private commandLineSyncDecisionActive (its comment said the window-close path consults it; nothing does).

Deliberately left

  • Log categories lifecycle, bridge, ocamlStatus and remoteCheck have no uses, but MANUAL.md documents bridge and ocaml-status as filters. Removing the constants would only hide that the documented categories log nothing; whether to log to them or fix the manual is a separate decision.
  • isValidPermsMask (removing it changes when the user sees an error), the delegate and protocol methods that appear once by design, and the hashing used by abandoned-staging recovery.

Verification

Builds clean. Full suite locally: 1594 tests, 0 failures (3 fewer than before, the three tests of removed helpers). Not run: a Release build.

🤖 Generated with Claude Code

Delete symbols with no callers: the single-root ArchiveHash wrappers and the
unread hashInput and allRootsLocal fields, the unwired
resetReconcileDisplay, suggestedLogfile and evaluateAbsentFile, the Setup
path-care helper and note, six orphaned test accessors, and seven unused
accessors. The hash digest tests now go through the multi-root function.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bcourbage
bcourbage merged commit b179e5e into main Nov 8, 2026
2 checks passed
@bcourbage
bcourbage deleted the cleanup/dead-code branch November 8, 2026 20:05
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