Skip to content

refactor: remove six private declarations nothing references - #1956

Draft
trac3r00 wants to merge 1 commit into
vorssaint:mainfrom
trac3r00:chore/remove-ai-slops
Draft

trac3r00 wants to merge 1 commit into
vorssaint:mainfrom
trac3r00:chore/remove-ai-slops

Conversation

@trac3r00

Copy link
Copy Markdown

Summary

Removes six private / fileprivate declarations that nothing references. Swift does not warn about unused private functions or constants, so these were left behind when their callers changed:

File Removed Notes
App/MenuBarRenderer.swift metricItems(for:metrics:preset:) (128 lines) Superseded by the per-metric rendering. MetricItem stays in use.
Services/Switcher/WindowActivator.swift restoreSourceAfterTargetMinimize(_:) Replaced by restoreSourceAfterTargetMinimizeIntent. SwitcherSupport.shouldRestoreSourceAfterTargetMinimize is still used there.
App/StatusItemController.swift maxPlacementGeneration Only StatusItemPlacementSupport.maxPlacementGeneration is read.
UI/Settings/HomebrewSettings.swift updateHelp(_:) The used copy lives in PanelHomebrewView.
UI/Media/MediaWorkspaceView.swift setInput(_:) Every caller uses setInputs(_:).
UI/Settings/RadialMenuVisualCanvas.swift chipSize The wheel uses RadialMenuLayout.chipSize.

No behavior changes: each removed symbol was private to its file, and the build shows nothing referenced them. Net: 160 lines deleted, nothing added.

I found these by scanning Sources/ for private declarations whose name appears only once in their file, then checked Tests/ and generate_sources.py for references by name. A second scan after the removal found no newly orphaned private declarations.

Verification

  • ./build.sh --dev: 0 warnings. ./build/VorssaintDeveloper --selftest: SELFTEST OK, on MacBookPro18,3, macOS 26.6.2.
  • ./build.sh --test: 61,538 checks, the same count as main, with 17 failures. They are the same 17 cases (NotchCompactTests.swift:251 and SwitcherScrollTests.swift:163) that fail on an untouched main while this Mac's screen is locked. main passed all of them before the lock.
  • git diff --check: clean.

Swift does not warn about unused private functions and constants, so these
were left behind when their callers moved to other helpers.

This branch has not been deployed

No deployments
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