mickeyl
(Dr. Mickey Lauer)
October 24, 2024, 3:47pm
1
Some of my packages are erroring out on Linux with errors like that:
/home/mickey/Documents/late/CornucopiaCore/Sources/CornucopiaCore/Extensions/RunLoop/RunLoop+CFRunLoopSource.swift:11:33: error: 'getCFRunLoop' is inaccessible due to 'internal' protection level
9 | /// Add a `CFRunLoopSource` to this `RunLoop`.
10 | func CC_addSource(_ source: CFRunLoopSource, mode: CFRunLoopMode = .commonModes) {
11 | CFRunLoopAddSource(self.getCFRunLoop(), source, mode)
| `- error: 'getCFRunLoop' is inaccessible due to 'internal' protection level
12 | }
13 |
Why is getCFRunLoop
now internal
instead of public
? Is this documented anywhere? Any idea how I could work around this?
ksluder
(Kyle Sluder)
October 24, 2024, 6:11pm
2
ksluder
(Kyle Sluder)
October 24, 2024, 6:17pm
3
@mickeyl can we look more into why you need to use CFRunLoop directly instead of NSRunLoop? Is it the availability of CFRunLoopSource API?
mickeyl
(Dr. Mickey Lauer)
October 25, 2024, 8:42am
5
@Tony_Parker Yes, that's correct. Apart from CFRunLoopAddSource
and CFRunLoopRemoveSource
, I'm using CFRunLoopWakeUp
and CFRunLoopStop
, which are not available through the RunLoop
API.
As I've commented in source compatibility project Deferred fails with a compiler error · Issue #75498 · swiftlang/swift · GitHub , I don't see why this was changed. It's an undocumented API change, introduces a regression, and expands the difference between Foundation
for Apple platforms and the rest of the world (which already is huge).