Hive
Tuist Cache fails when using macros in combination with Workspace test covearge
GitHub issue · Open
What happened?
I’ve discussed this on Slack briefly with Marek, where with a recent change to our project to enable code coverage reports to be generated explicitly for both the app and Feature module targets we care about, in combination with enabling Tuist Cloud caused our app to fail on cache.
I noticed that removing the entirety of autogeneratedWorkspaceSchemes in Workspace.swift resolves it. The fact we are using Mockable in combination with two of our own Macros seems to play a part in it, as the caching will resolve correctly if Tuist does not reference any of our own macros.
I’d be grateful for any insight in this, and any pointers to how the caching works that I could try giving a fix a go. Thanks!
How do we reproduce it?
- Download the attached sample project
- Configure a tuist cloud setup with your org.
tuist installtuist cache-> you will see the error
The workaround is to remove the entire use of autogeneratedWorkspaceSchemes in Workspace.swift which will enable caching to successfully completre.
Error log
Loading and constructing the graph
It might take a while if the cache is empty
Hashing cacheable targets
Fetching remote binaries. Hold tight...
Finished fetching remote binaries
Targets to be cached: ExampleOne, ExampleOneMacros, ExampleTwo, ExampleTwoMacros, SwiftBasicFormat, SwiftCompilerPlugin, SwiftCompilerPluginMessageHandling, SwiftDiagnostics, SwiftOperators, SwiftParser, SwiftParserDiagnostics, SwiftSyntax, SwiftSyntax509, SwiftSyntaxBuilder, SwiftSyntaxMacroExpansion, SwiftSyntaxMacros
Loading and constructing the graph
It might take a while if the cache is empty
Using cache binaries for the following targets:
Target 'TuistWorkspaceCacheIssue' at '/Users/kelvinharron/IdeaProjects/TuistWorkspaceCacheIssue' doesn't exist
Fatal linting issues found
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
macOS version
14.5
Tuist version
4.15.0
Xcode version
15.4
No GitHub comments yet.