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.22k stars 1.42k forks source link

Cannot build the current version with CI, ComputeTargetDependencyGraph #3254

Closed stachurski2 closed 1 month ago

stachurski2 commented 1 month ago

Description

Hello, While building app on CI (dev-azure agent), with Xcode 15.4 on Mac OS Sonoma, I got the hazy error The following build commands failed: ComputeTargetDependencyGraph It occurs for my project, solely if swift-composable-architecture is added. I try to build my app with version 1.12 of swift-composable-architecture. Otherwise, locally everything seems to work fine.

Checklist

Expected behavior

The library is expected to build while project compilation

Actual behavior

Building of my project fails, due to : The following build commands failed: ComputeTargetDependencyGraph

Steps to reproduce

Just archive the app. Screenshot 2024-07-24 at 16 10 03

The Composable Architecture version information

1.12

Destination operating system

iOS 17.5

Xcode version information

Xcode 15.4

Swift Compiler version information

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
stephencelis commented 1 month ago

@stachurski2 Without a repro I'm not sure we can consider this a bug. Can you share a minimal project that reproduces the issue?

It looks like many of the packages are on the latest version. Does your project check in its Package.resolved file? Generally you want to check this file in to maintain a stable CI environment.

stachurski2 commented 1 month ago

Thank you for the response @stephencelis

Actually, It started occurring with version 1.2, but attempts of update didn't help. I can share my Package.resolved file. My project doesn't check it, I updated it with Xcode manually (by click Update to latests package version locally) Package.json <- it is package.resolved, extension changed due to GitHub policy.

funkyboy commented 1 month ago

Seems suspiciously similar to https://github.com/pointfreeco/swift-composable-architecture/issues/3255 but not sure.

stephencelis commented 1 month ago

@stachurski2 Can you try updating and reresolving your dependencies again to see if it's fixed? We just rolled out new versions of dependencies that stick with the original package URL and it seems to help in the remaining problematic situations we know of.

stachurski2 commented 1 month ago

Hello @stephencelis , I tried to update to latest version, unfortunately without success. I got more logs, I believe they could be helpful: log.txt

The one part is concerning me:

Screenshot 2024-07-25 at 11 53 46
mbrandonw commented 1 month ago

Hi @stachurski2, in the logs it shows you that you haven't enabled macros for a few targets:

ComposableArchitectureMacros: error: Target 'ComposableArchitectureMacros' must be enabled before it can be used.
CasePathsMacros: error: Target 'CasePathsMacros' must be enabled before it can be used.
DependenciesMacrosPlugin: error: Target 'DependenciesMacrosPlugin' must be enabled before it can be used.

Hopefully once you do that it will build just fine.

mbrandonw commented 1 month ago

I think this issue has now been fixed so I am going to close this out. Please feel free to open a discussion if you have more questions!

stachurski2 commented 1 month ago

Hello there, Adding -skipMacroValidation to xcodebuild invocation resolves the problem. Regards and thank you, Stan