-
Notifications
You must be signed in to change notification settings - Fork 10.7k
WIP CSBindings improvements #87064
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
Draft
slavapestov
wants to merge
31
commits into
swiftlang:main
Choose a base branch
from
slavapestov:add-binding-cleanup-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP CSBindings improvements #87064
+991
−658
Conversation
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
ce269f5 to
9a5b69c
Compare
9a5b69c to
0afa1c0
Compare
Contributor
Author
|
@swift-ci Please test source compatibility |
0afa1c0 to
d30914d
Compare
Contributor
Author
|
@swift-ci Please test |
Contributor
Author
|
@swift-ci Please test source compatibility |
The mock SDK didn't have the right overloads of CGRect.init().
…wer score We drop all favored choices except for those with the best score. If we had other favored choices with a lower score, they might still match, but require a subtype conversion, perhaps. Count these choices, and when comparing two disjunctions with the same number of favored choices, prefer the one with fewer less favored choices, all else being equal, before comparing the number of active choices.
5fd6e57 to
7d63fe3
Compare
Contributor
Author
|
@swift-ci Please test source compatibility |
…zableConformance Instead of SK_Unavailable. This is so that test/Constraints/rdar139812024.swift will continue to pass with an upcoming change. The problem was that in this test, an unsound optimization meant that we would find a worse solution, by not considering the better solution, according to our scoring rules. The worse solution involved an unavailable conformance to Sendable, while the better one used a missing synthesized one. Note that this is only an issue in Swift 5 mode, where unavailable Sendable conformance is a warning. Both are an error in Swift 6 mode, so it doesn't matter which solution we pick there anyway.
We would sometimes replace a binding whose type contains type variables with one that does not. This is unsound in the general case, but we need to to avoid performance problems and ambiguous solutions in certain pathological cases. I found two test cases in the test suite that exercised this specific behavior. Extract them into their own file, and generalize at the test case. At the same time, tweak the hack to narrow it down a bit.
These cases were using Exact incorrectly.
7d63fe3 to
d732d57
Compare
Contributor
Author
|
@swift-ci Please test source compatibility |
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.
No description provided.