@Eggsy94 could you include a reproducible project
Hive
error: external macro implementation type ‘ComposableArchitectureMacros.ReducerMacro’ could not be found for macro ‘Reducer()’
GitHub issue · Open
What happened?
xcodebuild -workspace App.xcworkspace
-scheme App-DEVELOPMENT
-sdk iphoneos
-skipMacroValidation
-archivePath $PWD/build/App.xcarchive
-destination ‘generic/platform=iOS’
-configuration DEVELOPMENT
-verbose
-derivedDataPath $PWD/build/DerivedData
clean build archive | tee build.log
If you type the above command, it will fail because it can’t find the macro. But Xcode builds and runs the app just fine… Looking at the error log, I see that Other swift flags refer to the path Debug-iphoneos path is referenced in the Other swift flags of the module. The path where the actual macro files are downloaded is DEVELOPMENT-iphoneos, so it seems that the macro is not there and cannot be referenced.
When Xcode is built locally, it gets it from DEVELOPMENT-iphoneos, and when it is built from only the macro files are moved to the Debug-iphoneos path
Translated with DeepL.com (free version)
How do we reproduce it?
When I use macros with a project with TCA and type the above command, I get an error
Error log
error: external macro implementation type ‘ComposableArchitectureMacros.ReducerMacro’ could not be found for macro ‘Reducer()’
macOS version
14.4.1
Tuist version
4.15.0
Xcode version
15.3
I found didn’t link the TCA package into my dynamic framework. After I set the package all issues are solved.
Hi. Could you tell me the solution you did? I’m suffering with this now.
I just connect the TCA dependency with my framework. There’s no critical issues with Reducer() or ReducerMacro.
why don’t you remove TCA dependency and check all tuist code work well?
if it has no problem, retry the process to import TCA.
Are you using non-standard configuration names in Xcode? Something other than Release or Debug? Then this may explain things https://github.com/pointfreeco/swift-composable-architecture/discussions/3292#discussioncomment-10592013
I just solved this error as below.
.package(url: "https://github.com/pointfreeco/swift-case-paths", exact: "1.5.6")
*This is just a temporary way to fix the version. Release Note: https://github.com/pointfreeco/swift-case-paths/releases