You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux build failure -- 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
#2621
Open
4 of 18 tasks
clackary opened this issue
Aug 19, 2024
· 2 comments
RxSwift fails to build on Ubuntu 22.04 against 2024-07-22 nightly Swift toolchains (and newer).
Expected outcome:
Top of RxSwift main (also reproduced with 6.5.0) builds successfully against 2024-07-15 toolchain, but starting failing against newer toolchains, as of 2024-07-22 and later.
What actually happens:
/project/RxSwift/Sources/RxSwift/AtomicInt.swift:11:13: 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
9 | import Foundation
10 |
11 | final class AtomicInt: 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
12 | fileprivate var value: Int32
13 | public init(_ value: Int32 = 0) {
Self contained code example that reproduces the issue:
Build errors are thrown out of Sources/RxSwift/AtomicInt.swift, but it also reproduces with a simple inherit from NSLock.
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
easy, 100% repro
sometimes, 10%-100%
hard, 2% - 10%
extremely hard, %0 - 2%
Xcode version:
N/A
⚠️ Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. ⚠️
Installation method:
CocoaPods
Carthage
Git submodules
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
yes (which ones)
no
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
just starting
I have a small code base
I have a significant code base
The text was updated successfully, but these errors were encountered:
I figured there's a chance this is a regression out of swift-corelibs-foundation, so I filed a similar issue over there -- apple/swift-corelibs-foundation#5076
If that doesn't go anywhere, this could in theory be resolved within RxSwift by refactoring away from AtomicInt: NSLock inheritance.
Short description of the issue:
RxSwift fails to build on Ubuntu 22.04 against 2024-07-22 nightly Swift toolchains (and newer).
Expected outcome:
Top of RxSwift main (also reproduced with 6.5.0) builds successfully against 2024-07-15 toolchain, but starting failing against newer toolchains, as of 2024-07-22 and later.
What actually happens:
Self contained code example that reproduces the issue:
Build errors are thrown out of
Sources/RxSwift/AtomicInt.swift
, but it also reproduces with a simple inherit from NSLock.RxSwift/RxCocoa/RxBlocking/RxTest version/commit
6491a16
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
Installation method:
I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)
Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
The text was updated successfully, but these errors were encountered: