Repository navigation
Clear the mechanical AppKit deprecation warnings - #580
Merged
Merged
Conversation
goneng
marked this pull request as ready for review
August 21, 2026 21:18
goneng
force-pushed
the
clear-appkit-deprecation-warnings
branch
from
August 21, 2026 23:05
de1f2d7 to
27e8e2f
Compare
Replace AppKit constants that Apple renamed with the spellings the SDK documents today, so the build stops reporting them. - Swap NSFileHandlingPanelOKButton, NSKeyDown, NSRightMouseDown, NSBorderlessWindowMask, NSCompositeCopy, NSRoundLineCapStyle, NSCenterTextAlignment and NSBackgroundStyleDark for their current names; the SDK declares each old name as an exact alias of the new one, so behaviour is unchanged - Drop the setOneShot: call on the search rewind panel, which the SDK documents as having no effect - Hold the git version comparison in an NSComparisonResult rather than an int
Declare the three classes that implement validateMenuItem: as conforming to NSMenuItemValidation, which is where AppKit moved the method in macOS 11. - Add the protocol to the existing private class extensions, matching how each class already declares the protocols it conforms to - Leave the implementations alone; AppKit already finds them by selector, so this only tells the compiler what it is looking at
goneng
force-pushed
the
clear-appkit-deprecation-warnings
branch
from
August 22, 2026 00:31
27e8e2f to
7da8163
Compare
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.
Clear 17 deprecation warnings in GitX's own source by moving to the
API spellings the macOS SDK documents today, with no behaviour change.
declares each old name as an exact alias of the new one
(
NSBackgroundStyleDark = NSBackgroundStyleEmphasized, and so on),so every site is value-identical
setOneShot:call on the search rewind panel, which the SDKdocuments as having no effect
NSMenuItemValidationon the three classes implementingvalidateMenuItem:, which is where AppKit moved the method inmacOS 11
PBGitBinaryin anNSComparisonResultrather than anintThese were picked out of a wider warning triage as the group that needs no judgement:
every changed line is a rename or a protocol declaration.
The remaining deprecations in GitX (WebKit, pasteboard types, keyed archiving,
NSConnection, FSEvents) all need real decisions and are left alone.The WebKit ones in particular belong to PR #535,
and nothing here touches the files it changes.
Compatibility
The deployment target is unaffected.
Every constant here is a compile-time enum value or
static constalias,so nothing is resolved at runtime; compiling both spellings to assembly and diffing
gives identical output.
Building with
-Werror=unguarded-availabilityat a minimum of macOS 10.9flags none of them, including the
NSMenuItemValidationconformance.For older toolchains, the new spellings were compile-verified against
the MacOSX 12.1, 13.3, 14.4 and 15.4 SDKs, all of which accept the full set.
That is already below the floor the project sets for itself, since
MACOSX_DEPLOYMENT_TARGET = 13.0rules out any SDK older than macOS 13with or without this change.
Test plan
xcodebuild build -workspace GitX.xcworkspace -scheme GitX -destination "platform=macOS,arch=arm64"succeeds;
GitX's own warning count drops from 85 to 67
xcodebuild test -workspace GitX.xcworkspace -scheme GitX -only-testing:GitXTestspasses, 35 tests, unchanged from master
declared as an alias of the new one, and compiled against the MacOSX 12.1 through 15.4 SDKs
to confirm the new name exists there too