pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.35k stars 1.44k forks source link

Xcode Cloud can't build projects that uses Composable Architecture v1.4.0 #2571

Closed darrarski closed 11 months ago

darrarski commented 11 months ago

Description

After updating an Xcode project to use Composable Architecture v1.4.0, Xcode Cloud can no longer build it. CI fails with the following errors:

Target 'CasePathsMacros' must be enabled before it can be used.

Target 'ComposableArchitectureMacros' must be enabled before it can be used.

The project does not use any of the newly introduced macros. It builds fine with Xcode Cloud when using previous releases of Composable Architecture.

I'm aware that third-party macros should be enabled in Xcode before use. I'm unsure how to set it up to work when using Xcode Cloud.

Checklist

Expected behavior

Xcode Cloud can build a project that depends on Composable Architecture

Actual behavior

Xcode Cloud fails to build a project that depends on Composable Architecture

Steps to reproduce

  1. Create a new Xcode project.
  2. Add Composable Architecture dependency (make sure you use v1.4.0).
  3. Setup Xcode Cloud.
  4. Run Xcode Cloud build.

The Composable Architecture version information

1.4.0

Destination operating system

iOS 17, macOS 14

Xcode version information

Xcode 15.1 beta 2 (15C5042i)

Swift Compiler version information

No response

stephencelis commented 11 months ago

@darrarski This is a general new step required by macros. A quick web search led me to this page with a few ways of addressing the error:

https://forums.swift.org/t/is-there-a-way-to-programmatically-allow-trust-the-compiler-plugin-to-run-from-the-command-line/65690

Command line default you can set:

defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool

Argument you can pass to xcodebuild

-skipMacroValidation

Since this isn't a bug I'm going to convert it to a discussion.