I'm using MetaCodable macro in my project, installed via SwiftPM, when I try to build the project using Microsoft Azure's Pipeline using my local machine as a run agent (MBP M1 Max - Sonoma - XCode 15), I get this error message:
error: external macro implementation type 'CodableMacroPlugin.CodedAt' could not be found for macro 'CodedAt'
Some folks here suggest to add -external-plugin-path to other Swift flags in build settings, but that doesn't solve the issue.
And in this thread some also suggests to add -load-plugin-library, or -plugin-path, or -load-plugin-executable to other Swift flags, I tried every option of these using the value: $(BUILT_PRODUCTS_DIR)#MetaCodable but I got the same error with every CI build.
I also get this warning in the Azure's Pipeline build log:
"output": "<unknown>:0: warning: compiler plugin not loaded: '/Users/my_user_name/Library/Developer/Xcode/DerivedData/MyProject/Build/Products/Release/CodableMacroPlugin; failed to initialize /Users/my_user_name/vsts-agent-osx-x64-2.183.1/_work/9/MyProject/Data/Models/SomeModel.swift
Any thoughts about this are appreciated.
xcodebuildcommand runs without problems on my machine:xcodebuild -project /Users/xxxxx/MyProject.xcodeproj -scheme MyScheme -configuration Release -destination 'generic/platform=iOS' buildbut the Microsoft Azure's Pipeline still fails. I even tried to add this command as a CI step (of type Terminal) in Microsoft Azure (in replacement of the original CI build step) but it didn't go through due to the same error