-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix requirements on values in NSSet
and keys in NSDictionary
#505
Merged
Conversation
This file contains 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
madsmtm
added
enhancement
New feature or request
A-objc2
Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates
A-framework
Affects the framework crates and the translator for them
I-unsound
A soundness hole
labels
Sep 7, 2023
madsmtm
force-pushed
the
ensure-stable-hash
branch
8 times, most recently
from
September 7, 2023 09:21
c518730
to
7508af1
Compare
madsmtm
force-pushed
the
ensure-stable-hash
branch
from
September 7, 2023 11:53
7508af1
to
60963e3
Compare
madsmtm
force-pushed
the
ensure-stable-hash
branch
from
September 10, 2023 14:51
ee9d9f5
to
cfb2b9d
Compare
Add CounterpartOrSelf instead of CopyHelper, which lives in objc2 and is much nicer to use. This also allows us to move NSCopying and NSMutableCopying back to reside in Foundation (note: We might have to at some point implement a small hack for these traits acting as if they contain the `copy` method, while it's actually `NSObject` that does).
Almost at least, some generic types like `NSArray<NSView>` is still incorrectly allowed as a key
madsmtm
force-pushed
the
ensure-stable-hash
branch
from
September 10, 2023 15:27
cfb2b9d
to
7c9ff46
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-framework
Affects the framework crates and the translator for them
A-objc2
Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates
enhancement
New feature or request
I-unsound
A soundness hole
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.
Introduce
HasStableHash
and use that to restrict the keys inNSSet
andNSMutableDictionary
, such that you cannot use e.g.NSView
as a key (since thehash
andisEqual:
implementations of that may change if the view changes).Addtionally, refactor and clean up the
NSCopying
/NSMutableCopying
trait definitions.Fixes #306 and fixes #337 - the remaining parts are moved to #507.