Repository navigation
Fix unkeyed decoding cursor and colliding custom keys - #61
Open
letko-dmitry wants to merge 7 commits into
Open
letko-dmitry wants to merge 7 commits into
letko-dmitry wants to merge 7 commits into
Conversation
letko-dmitry
marked this pull request as ready for review
October 5, 2026 15:29
letko-dmitry
marked this pull request as draft
October 5, 2026 15:49
letko-dmitry
force-pushed
the
bugfix/fixes-and-cleanup
branch
from
October 5, 2026 18:26
aee93c0 to
3ef3683
Compare
letko-dmitry
marked this pull request as ready for review
October 5, 2026 18:34
Contributor
Author
|
Should I split this PR into smaller ones or just close it for good? 😅 |
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.
One commit per change, so any of them can be dropped:
decodeNil()moved to the next element even when it found a value, sodecodeIfPresentread the element after the one it checked. A faileddecode,nestedContainerorsuperDecodermoved on as well, unlikeJSONDecoder. And coding paths in errors pointed one element too far: a bad second element of[1, "x"]was reported at index 2..customkey strategy maps several keys to one, the value came from whichever key the dictionary iterated first, so the result changed from run to run. The smallest original key now wins, as documented on.custom.prefer_self_in_static_referencesininvalidFloatingPointValue.unused_importanalyzer rule, and these files use nothing from Foundation.isEmptyOrNil. Nothing calls it.WithConfigurationoverloads duplicated it.iOS 10checks and theirfatalErrorbranches can't run.Only the first two change observable behavior, and only for code that relied on the old cursor or key order. None of the changes makes encoding or decoding slower.
Measured as retired instructions in release builds on an M4, alternating A/B runs; differences within ±0.3% are noise.