TobiasMende / alfred-audio-switcher

Alfred Workflow for Quickly Switching Audio Input and Output Devices
12 stars 1 forks source link

Error loading sources #8

Open fredcallaway opened 5 days ago

fredcallaway commented 5 days ago

First time using the workflow, either both the in and out command throws an error:

error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK.

I'm running Sequoia 15.1 (24B2082) on an M4.

Stack Trace [10:13:46.954] Audio Switcher[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.C5024345-0446-49E0-A7C3-FBF8F17DC7C0%3E1450496C-74BC-4EDE-930B-ADC6027C5449)] Queuing argument '(null)' [10:13:49.551] Audio Switcher[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.C5024345-0446-49E0-A7C3-FBF8F17DC7C0%3E1450496C-74BC-4EDE-930B-ADC6027C5449)] Script with argv '(null)' finished [10:13:49.555] ERROR: Audio Switcher[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.C5024345-0446-49E0-A7C3-FBF8F17DC7C0%3E1450496C-74BC-4EDE-930B-ADC6027C5449)] Code 1: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name "\"FoundationPreview\"" 4 | import Combine 5 | import CoreFoundation | `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 6 | import Darwin 7 | import Dispatch /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0: /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0: main.swift:2:8: error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 1 | #!/usr/bin/swift 2 | import Foundation | `- error: failed to build module 'Foundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 3 | import CoreAudio 4 | /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13: 11 | #define CATapDescription_h 12 | 13 | #import | `- note: while building module 'Foundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13: 14 | #import 15 | #import :1:9: note: in file included from :1: 1 | #import "Headers/Foundation.h" | `- note: in file included from :1: 2 | #import "Headers/NSDebug.h" 3 | /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95:9: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95: 93 | #import 94 | #import 95 | #import | `- note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:95: 96 | #import 97 | #import /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:9: error: could not build module 'CoreServices' 13 | #endif 14 | #else 15 | #import | `- error: could not build module 'CoreServices' 16 | #endif 17 | :6:9: note: in file included from :6: 4 | #import "Headers/AudioHardwareBase.h" 5 | #import "Headers/AudioHardwareTapping.h" 6 | #import "Headers/CATapDescription.h" | `- note: in file included from :6: 7 | /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CATapDescription.h:13:9: error: could not build module 'Foundation' 11 | #define CATapDescription_h 12 | 13 | #import | `- error: could not build module 'Foundation' 14 | #import 15 | #import /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/swift/CoreAudio.swiftmodule/arm64e-apple-macos.swiftinterface: 0: /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap:13:8: error: redefinition of module 'SwiftBridging' 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- error: redefinition of module 'SwiftBridging' 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap:13:8: note: previously defined here 11 | //===----------------------------------------------------------------------===// 12 | 13 | module SwiftBridging { | `- note: previously defined here 14 | header "bridging" 15 | /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-macos.swiftinterface:5:8: error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 3 | // swift-module-flags: -target arm64e-apple-macos15.1 -target-variant arm64e-apple-ios18.1-macabi -enable-objc-interop -autolink-force-load -enable-library-evolution -module-link-name swiftFoundation -swift-version 5 -enforce-exclusivity=unchecked -O -library-level api -enable-upcoming-feature InferSendableFromCaptures -enable-bare-slash-regex -user-module-version 3107 -module-name Foundation -package-name "\"FoundationPreview\"" 4 | import Combine 5 | import CoreFoundation | `- error: failed to build module 'CoreFoundation'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.43 clang-1600.0.25.3)', while this compiler is 'Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)'). Please select a toolchain which matches the SDK. 6 | import Darwin 7 | import Dispatch /Library/Developer/CommandLineTools/usr/include/swift/module.modulemap: 0: /Library/Developer/CommandLineTools/usr/include/swift/bridging.modulemap: 0:
TobiasMende commented 5 days ago

Hi @fredcallaway, this is unfortunately an Apple bug. Somebody else mentioned this behavior as well and the answer here has fixed it for them: https://github.com/orgs/Homebrew/discussions/5723#discussioncomment-11185411

Please let me know if that works.

Thanks, Tobi