From 61f1aff4cf5f310fe2d89ae4fdcb17b431906418 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Mon, 21 Sep 2026 07:32:33 +0200 Subject: [PATCH 1/2] fix: guard the Network import in DebugClient with canImport(Network) DebugClient's TCP client is gated on canImport(Darwin), but it imports Network, which is not present on every Darwin-targeting SDK. Building for an arm64-apple-macosx target whose SDK has no Network.framework fails with "no such module 'Network'" before any of the debug code is reached. Widen the guard to the module the file actually needs. (cherry picked from commit 23d0ca07515ff5bfe5fd596548a82fb77e1d7911) --- Sources/OpenAttributeGraphShims/DebugClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/OpenAttributeGraphShims/DebugClient.swift b/Sources/OpenAttributeGraphShims/DebugClient.swift index 5ba7cee9..5bd3f6c0 100644 --- a/Sources/OpenAttributeGraphShims/DebugClient.swift +++ b/Sources/OpenAttributeGraphShims/DebugClient.swift @@ -2,7 +2,7 @@ // DebugServerTests.swift // OpenAttributeGraphShims -#if canImport(Darwin) +#if canImport(Darwin) && canImport(Network) public import Foundation public import Network From 55cd87ba39d28dd6503db24934239881eb01ab75 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Wed, 4 Nov 2026 16:31:51 +0100 Subject: [PATCH 2/2] test: guard DebugServerTests with canImport(Network) too The test target compiles DebugClient.swift through a symlink and uses DebugClient, which now compiles out when Network is unavailable. Use the same guard in the test file so the target still builds on such SDKs. --- .../DebugServer/DebugServerTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/OpenAttributeGraphCxxTests/DebugServer/DebugServerTests.swift b/Tests/OpenAttributeGraphCxxTests/DebugServer/DebugServerTests.swift index cc5a0c01..799399ee 100644 --- a/Tests/OpenAttributeGraphCxxTests/DebugServer/DebugServerTests.swift +++ b/Tests/OpenAttributeGraphCxxTests/DebugServer/DebugServerTests.swift @@ -2,7 +2,7 @@ // DebugServerTests.swift // OpenAttributeGraphCxxTests -#if canImport(Darwin) +#if canImport(Darwin) && canImport(Network) import Foundation import OpenAttributeGraphCxx_Private.DebugServer import Testing