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 against 2024-09-25 nightly toolchain -- error: cannot inherit from class 'Thread' (compiled with Swift 6.1) because it has overridable members that could not be loaded in Swift 5.10 #615
root@7481e59c0960:/project/opentelemetry-swift# /home/dev-toolchain/swift-DEVELOPMENT-SNAPSHOT-2024-09-25-a-ubuntu22.04-aarch64/usr/bin/swift build
...
/project/opentelemetry-swift/Sources/OpenTelemetrySdk/Logs/Processors/BatchLogRecordProcessor.swift:41:15: error: cannot inherit from class 'Thread' (compiled with Swift 6.1) because it has overridable members that could not be loaded in Swift 5.10
39 | }
40 |
41 | private class BatchWorker : Thread {
| `- error: cannot inherit from class 'Thread' (compiled with Swift 6.1) because it has overridable members that could not be loaded in Swift 5.10
42 | let logRecordExporter : LogRecordExporter
43 | let scheduleDelay : TimeInterval
From what I've seen in the other cases, it looks like would be feasible to workaround the issue by making a Thread property within BatchWorker, and then wrapping the start and cancel calls with matching BatchWorker funcs.
But the problem here is the override on Thread.main(). I don't think there's a way to do this without inheriting from Thread.
Configuration:
OS: Linux Ubuntu 22.04
Toolchain: swift-DEVELOPMENT-SNAPSHOT-2024-09-25-a-ubuntu22.04-aarch64