Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
27186AE32D538A76009E05F9 /* AttributeGraph.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27E6C4D12D2842740010502F /* AttributeGraph.xcframework */; };
278EF52D2E2272F2009C32EB /* Equatable in Frameworks */ = {isa = PBXBuildFile; productRef = 278EF52C2E2272F2009C32EB /* Equatable */; };
278EF52F2E227304009C32EB /* Equatable in Frameworks */ = {isa = PBXBuildFile; productRef = 278EF52E2E227304009C32EB /* Equatable */; };
279080A52E8E601B0082B5B6 /* Testing.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 279080912E8E5E7B0082B5B6 /* Testing.framework */; };
279284972DFF136E00234D64 /* AttributeGraph.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27E6C4D12D2842740010502F /* AttributeGraph.xcframework */; };
2792849F2DFF137400234D64 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 2792849E2DFF137400234D64 /* SnapshotTesting */; };
279FED052DF4566D00320390 /* AttributeGraph.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27E6C4D12D2842740010502F /* AttributeGraph.xcframework */; };
Expand All @@ -32,14 +33,7 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
279283BD2DFF11CE00234D64 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 27CD0B412AFC8D37003665EB /* Project object */;
proxyType = 1;
remoteGlobalIDString = 27CD0B482AFC8D37003665EB;
remoteInfo = Example;
};
279283E32DFF11F900234D64 /* PBXContainerItemProxy */ = {
279080A32E8E600A0082B5B6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 27CD0B412AFC8D37003665EB /* Project object */;
proxyType = 1;
Expand All @@ -51,6 +45,7 @@
/* Begin PBXFileReference section */
271D81642BB1E8E300A6D543 /* OpenAttributeGraph */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAttributeGraph; path = ../../OpenAttributeGraph; sourceTree = "<group>"; };
275751E32DEE1441003E467C /* TestingHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestingHost.app; sourceTree = BUILT_PRODUCTS_DIR; };
279080912E8E5E7B0082B5B6 /* Testing.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Testing.framework; path = Platforms/MacOSX.platform/Developer/Library/Frameworks/Testing.framework; sourceTree = DEVELOPER_DIR; };
279283B92DFF11CE00234D64 /* OpenSwiftUIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenSwiftUIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
27AF22B12E758F0F00D534AB /* BacklightServices.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BacklightServices.xcframework; path = ../../DarwinPrivateFrameworks/BLS/2024/BacklightServices.xcframework; sourceTree = "<group>"; };
27B7FC802BB31FF500272BA5 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -103,6 +98,7 @@
buildActionMask = 2147483647;
files = (
279FED0D2DF4567B00320390 /* OpenSwiftUI in Frameworks */,
279080A52E8E601B0082B5B6 /* Testing.framework in Frameworks */,
27AF22B82E758F2E00D534AB /* BacklightServices.xcframework in Frameworks */,
27AF22B42E758F2900D534AB /* CoreUI.xcframework in Frameworks */,
27AF22BC2E758F3700D534AB /* RenderBox.xcframework in Frameworks */,
Expand Down Expand Up @@ -185,6 +181,7 @@
27D49E0C2BA60AF600F6E2E2 /* Frameworks */ = {
isa = PBXGroup;
children = (
279080912E8E5E7B0082B5B6 /* Testing.framework */,
27AF22B12E758F0F00D534AB /* BacklightServices.xcframework */,
27EE91722DD0C753006C85FD /* CoreUI.xcframework */,
27E6C4D42D2842810010502F /* RenderBox.xcframework */,
Expand Down Expand Up @@ -230,8 +227,7 @@
buildRules = (
);
dependencies = (
279283BE2DFF11CE00234D64 /* PBXTargetDependency */,
279283E42DFF11F900234D64 /* PBXTargetDependency */,
279080A42E8E600A0082B5B6 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
275751F62DEE1456003E467C /* OpenSwiftUIUITests */,
Expand Down Expand Up @@ -407,15 +403,10 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
279283BE2DFF11CE00234D64 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 27CD0B482AFC8D37003665EB /* Example */;
targetProxy = 279283BD2DFF11CE00234D64 /* PBXContainerItemProxy */;
};
279283E42DFF11F900234D64 /* PBXTargetDependency */ = {
279080A42E8E600A0082B5B6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 275751E22DEE1441003E467C /* TestingHost */;
targetProxy = 279283E32DFF11F900234D64 /* PBXContainerItemProxy */;
targetProxy = 279080A32E8E600A0082B5B6 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

Expand Down
24 changes: 19 additions & 5 deletions Sources/OpenSwiftUICore/Log/Logging.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
//
// Logging.swift
// OpenSwiftUI
// OpenSwiftUICore
//
// Audited for 6.0.87
// Status: Complete

#if DEBUG
import Foundation
#else
public import Foundation
#if canImport(Testing)
public import Testing
#endif

#if OPENSWIFTUI_SWIFT_LOG
Expand Down Expand Up @@ -162,13 +161,28 @@ package enum Log {
_ message: @autoclosure () -> StaticString,
_ args: @autoclosure () -> [CVarArg] = []
) {
#if canImport(Testing)
if Test.current != nil {
let comment: Comment = #"[Runtime Issue]: message - "\#(message().description)" args: \#(args())"#
#if swift(>=6.3)
Issue.record(comment, severity: .warning)
#else
// TODO: Wait for Swift 6.2 Issue handler
// Issue.record(comment)
#endif
}
#endif

#if DEBUG
unsafeBitCast(
os_log as (OSLogType, UnsafeRawPointer, OSLog, StaticString, CVarArg...) -> Void,
to: ((OSLogType, UnsafeRawPointer, OSLog, StaticString, [CVarArg]) -> Void).self
)(.fault, dso, runtimeIssuesLog, message(), args())
#else
os_log(.fault, log: runtimeIssuesLog, message(), args())
unsafeBitCast(
os_log as (OSLogType, UnsafeRawPointer, OSLog, StaticString, CVarArg...) -> Void,
to: ((OSLogType, UnsafeRawPointer, OSLog, StaticString, [CVarArg]) -> Void).self
)(.fault, #dsohandle, runtimeIssuesLog, message(), args())
#endif
}

Expand Down
Loading