Repository navigation
Clear the keyed-archiver deprecation warnings - #584
Merged
Merged
Conversation
goneng
force-pushed
the
clear-keyed-archiver-warnings
branch
from
August 23, 2026 07:48
82c0c27 to
cd60813
Compare
goneng
marked this pull request as ready for review
August 23, 2026 09:40
Move the drag-and-drop pasteboard payloads onto the secure-coding archiver API that replaced the pre-10.14 entry points, and handle the failure the new API reports by returning instead of raising. - Archive the file-change and ref drags requiring secure coding - Decode them through unarchivedObjectOfClass(es):fromData:error: - Name NSNumber alongside NSArray so the ref payload decodes fully - Refuse the drag when encoding or decoding fails, which the previous API signalled by raising rather than by returning nil
goneng
force-pushed
the
clear-keyed-archiver-warnings
branch
from
August 23, 2026 14:46
cd60813 to
f6c8a17
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.
Move the drag-and-drop pasteboard payloads onto the secure-coding keyed
archiver API that replaced the entry points deprecated in 10.14, and
handle the failure the replacement reports rather than letting it fall-through.
unarchivedObjectOfClass(es):fromData:error:NSNumberalongsideNSArrayso the ref payload decodes fullyThe last point matters beyond the warnings.
The previous API raised on malformed data, while the replacement returns
nil, andneither drop handler was written for a
nilpayload.On the file-change side that would have reached
objectsAtIndexes:withnil- and crashed;on the ref side it was quieter and worse, since messaging
nilyields an index of 0 andthe drop would have moved the wrong ref.
Both paths now log and return
NO.Warnings go from 69 to 65 in GitX's own sources.
The remainder come from the vendored ObjectiveGit and libgit2 headers and
are not addressable from this repository.
Test plan
xcodebuild test -only-testing:GitXTestspasses 39/39 - unchanged(confirmed by diffing the deduplicated warning sets)
dragging a file from unstaged to staged and back,
dragging a multiple-file selection, and
dragging a branch label onto another commit,
(which the
reflogrecords as the expected ref update)including the index set class a real table-view supplies, and a
wrong allowed class was confirmed to return
nilwith an errorrather than a partly-decoded object