Reported as both an RxSwift issue, as well as a swift-corelibs-foundation issue.
repro.swift:3:7: error: cannot inherit from class 'NSLock' (compiled with Swift 6.0) because it has overridable members that could not be loaded in Swift 5.10
1 | import Foundation
2 |
3 | class FooLock: NSLock {}
| `- error: cannot inherit from class 'NSLock' (compiled with Swift 6.0) because it has overridable members that could not be loaded in Swift 5.10
4 |
We've hit this for a while on nightly toolchains, and I've verified that it also reproduces with the Swift 6.0 release. Bisecting between past nightly toolchains shows that the regression was introduced with the 2024-07-22 nightly. For a while I was skeptical of our build environment, but it seems that the Linux build of RxSwift in the Swift Package Index independently confirms the issue.
I'm shouting a bit more widely now that this has escaped to a release, looking for a way forward and answers to a few questions. Happy to assist with any triage or legwork here.
Is this source breakage intentional? If so, we can focus on a refactor away from the NSLock inheritance.
Is this some non-Darwin fallout from the Foundation re-core? I've seen mention of the re-core, and the dates of the known good (07-15) and known bad (07-22) toolchains do seem to align with that effort, although I don't know enough about it to make any solid conclusions. Would it be worthwhile to try bisecting swift-corelibs-foundation between those tags?