TCA's Macros and CI/CD

Hi everyone!
After I integrated the version of TCA which utilises the new Swift's Macros - I've ended up with failed build with errors as such in my CI:

ComputeTargetDependencyGraph ... ... Package@swift-5.9.swift:PACKAGE-TARGET:CasePathsMacros: error: Target 'CasePathsMacros' must be enabled before it can be used. ... ... Package@swift-5.9.swift:PACKAGE-TARGET:DependenciesMacrosPlugin: error: Target 'DependenciesMacrosPlugin' must be enabled before it can be used. ... ... DependenciesMacrosPlugin/DependencyClientMacro.swift: note: Macro "DependenciesMacrosPlugin" is implemented here SourcePackages/checkouts/swift-perception/Package.swift:PACKAGE-TARGET:PerceptionMacros: error: Target 'PerceptionMacros' must be enabled before it can be used.

to adress this issue I tried to:

  1. run a script which skips the plugin validation in the step before "Xcode build"
    defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
    it didn't work out.
  2. I tried to build a project -skipMacroValidation. The result is the same as with a script

locally I can build it without issues though
maybe someone had have any similar issues before?

We use -skipMacroValidation in our CI and it seems to work OK, want to provide more information as to what's not working when you use it?

I believe you have a typo here, but the above is also for more general package plug-ins, not macros. I believe the macro version is the following:

defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
3 Likes

Thank you!
You just saved me after hours of code-debugging, SPM fishing, cache-clearing and rebooting.

You are a gentleman and a scholar, good sir.

1 Like

Hello @stephencelis @hawke84 , Would you mind sharing where you added this —skipMarcoValidation? I'm trying to set up the Xcode Cloud, and it always fails, as in the attached snapshot.

Hi @pushsoftdev, just as a courtesy I'd recommend not @-mentioning folks directly. We'll be notified on this thread automatically since we're already here :slight_smile:

The answer to what you're looking for is already above in this thread, and elsewhere on the forums if you search for the failure message, and if you search our docs we also have instructions there:

https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/reducer/#CI-build-failures

Hope this helps! We're not Xcode Cloud users so we can't really provide more explicit instructions, but one of the solutions above should work.

Oh! Apologies for that! I'm new to this forum and follow that in the future!

thank you for your answer!

Could you share if you were able to solve it for Xcode cloud?