From d3ab98dc2887d1cc3bed676f6fa354da4cb22b3c Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Fri, 14 Jun 2024 16:22:52 -0700 Subject: [PATCH] Fix CI (#84) * Fix CI * rule out change * revert * invert * wip * one more thing * Revert "one more thing" This reverts commit e8dfd3ed603f1f90902ff0d02d1e96a9be5a1e60. --- Sources/Perception/Internal/RuntimeWarning.swift | 15 ++++----------- .../Perception/Internal/UncheckedSendable.swift | 6 +++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Sources/Perception/Internal/RuntimeWarning.swift b/Sources/Perception/Internal/RuntimeWarning.swift index a2f10da..bdad673 100644 --- a/Sources/Perception/Internal/RuntimeWarning.swift +++ b/Sources/Perception/Internal/RuntimeWarning.swift @@ -16,7 +16,7 @@ func runtimeWarn( #if canImport(os) os_log( .fault, - dso: dso, + dso: dso.value, log: OSLog(subsystem: "com.apple.runtime-issues", category: category), "%@", message @@ -39,15 +39,8 @@ func runtimeWarn( // To work around this, we hook into SwiftUI's runtime issue delivery mechanism, instead. // // Feedback filed: https://gist.github.com/stephencelis/a8d06383ed6ccde3e5ef5d1b3ad52bbc - #if swift(>=5.10) - @usableFromInline - nonisolated(unsafe) let dso = getSwiftUIDSO() - #else - @usableFromInline - let dso = getSwiftUIDSO() - #endif - - private func getSwiftUIDSO() -> UnsafeMutableRawPointer { + @usableFromInline + let dso = UncheckedSendable({ let count = _dyld_image_count() for i in 0..: @unchecked Sendable { - let value: Value - init(_ value: Value) { +@usableFromInline struct UncheckedSendable: @unchecked Sendable { + @usableFromInline let value: Value + @usableFromInline init(_ value: Value) { self.value = value } }