From 5d9f6d9c2e5e183f60b0de907e7bf98ec6e936b2 Mon Sep 17 00:00:00 2001 From: Michael Rawdon Date: Fri, 21 Nov 2025 14:09:35 -0800 Subject: [PATCH] Change call to Core.delegate.error() to self.errors.append() The Core's diagnostics delegate has been made immutable by this point, so if an error were ever emitted here it would crash the build service. --- Sources/SWBCore/Settings/Settings.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SWBCore/Settings/Settings.swift b/Sources/SWBCore/Settings/Settings.swift index 28860c08..ae0baa25 100644 --- a/Sources/SWBCore/Settings/Settings.swift +++ b/Sources/SWBCore/Settings/Settings.swift @@ -4590,7 +4590,7 @@ private class SettingsBuilder { ] { let macroName = "\(BuiltinMacros.ENABLE_DEFAULT_SEARCH_PATHS.name)_IN_\(searchPathMacro.name)" guard let macro = userNamespace.lookupMacroDeclaration(macroName) as? BooleanMacroDeclaration else { - core.delegate.error("internal error: Build setting \(macroName) is not of boolean type") + self.errors.append("internal error: Build setting \(macroName) is not of boolean type") continue } // Note that this implies if the macro is unset or set to empty then it defaults to YES, which is the opposite of most macros, but probably fine for this very niche functionality. If this becomes an issue then we should declare all of these macros in CoreBuildSystem.xcspec with default values of YES, or maybe $(ENABLE_DEFAULT_SEARCH_PATHS).