Skip to content

rdar://127199021, fix compatibility with apps that accidentally do [[[aSwiftArray class] new] mutableCopy] #73755

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

Conversation

Catfish-Man
Copy link
Contributor

Explanation: At least one app is managing to call +new on our private NSArray subclass, which doesn't work. This change makes it return a regular NSArray to maintain compatibility
Original PR: #73728
Reviewed by: @parkera
Risk: Low. This method is never supposed to be called, and cannot be called from Swift code, so normal usage will never execute it. It also never worked in the past, so the set of potentially impacted applications is "ObjC apps that are doing very unusual things with certain objects that used to be ObjC but are now Swift under the hood"
Resolves: rdar://127199021
Tests: Adds a test

…[aSwiftArray class] new] mutableCopy] to work

(cherry picked from commit 0110340)
@Catfish-Man Catfish-Man requested a review from a team as a code owner May 20, 2024 19:15
@Catfish-Man
Copy link
Contributor Author

Sorry about automatically adding so many of y'all as reviewers, the base branch was wrong so there were a ton of commits in the PR briefly

@Catfish-Man
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight removed their request for review May 20, 2024 19:18
@Catfish-Man Catfish-Man self-assigned this May 20, 2024
@QuietMisdreavus QuietMisdreavus removed their request for review May 20, 2024 19:31
@Catfish-Man
Copy link
Contributor Author

Linux failure is being addressed by #73463, it's unrelated to this change

@etcwilde
Copy link
Member

This will actually be addressed by #73757... turns out CI was checking out the driver from the wrong branch in Swift 6.0 builds.

@ahoppen ahoppen removed their request for review May 21, 2024 00:05
@Catfish-Man
Copy link
Contributor Author

@swift-ci Please test Linux platform

@Catfish-Man
Copy link
Contributor Author

@swift-ci Please test Windows platform

@Catfish-Man Catfish-Man merged commit da95749 into swiftlang:release/6.0 May 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants