Skip to content
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

Linux regression -- error: cannot inherit from class 'NSLock' because it has overridable members that could not be loaded #76039

Closed
clackary opened this issue Aug 22, 2024 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@clackary
Copy link

Description

On Ubuntu 22.04, the following code snippet builds successfully against 2024-07-15 nightly toolchain, but fails against 2024-07-22 toolchain. It builds successfully against both toolchains on macOS.

import Foundation

class FooLock: NSLock {}

Reproduction

import Foundation

class FooLock: NSLock {}

With this code snippet in FooLock.swift, attempting to build that single file fails -- ./path-to-toolchain/swift-DEVELOPMENT-SNAPSHOT-2024-08-21-a-ubuntu22.04-aarch64/usr/bin/swiftc -O FooLock.swift -o FooLock.

It also seems to reproduce with some other classes like NSNumber.

Expected behavior

The code snippet should build successfully on Linux/Ubuntu 22.04.

Environment

OS: Linux / Ubuntu 22.04

Latest known good tag: swift-DEVELOPMENT-SNAPSHOT-2024-07-15-a
Earliest known bad tag: swift-DEVELOPMENT-SNAPSHOT-2024-07-22-a

Additional information

This affects RxSwift (ReactiveX/RxSwift#2621), and all downstream projects. I also filed an issue over in swift-corelibs-foundation in case it's specific to non-Darwin Foundation functionality (https://github.com/apple/swift-corelibs-foundation/issues/5076).

@clackary clackary added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Aug 22, 2024
@clackary
Copy link
Author

The swiftlang/swift-corelibs-foundation issue was transferred to swiftlang/swift, so this issue is now redundant.

From here on out, the issue will be tracked in swiftlang/swift-corelibs-foundation#5108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant