Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build always fails because of macros cannot be enabled before a build. #967

Closed
fumiyasac opened this issue Jun 6, 2024 · 1 comment
Closed

Comments

@fumiyasac
Copy link

Summary:

I keep failing to build a project that uses a library that uses Macro.
In my case, I use swift-testing for unit test.
I think "swift-testing" uses Macro.

Unknown Item:

  1. How to set defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES. (In bitrise control panel, I can't find input area.)
  2. How to write -skipPackagePluginFingerprintValidatation settings if project uses fastlane.

Error Message:

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:46C95008-E0C7-49E6-A4C1-8EFF7538A1C1, OS:17.5, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:46C95008-E0C7-49E6-A4C1-8EFF7538A1C1, OS:17.5, name:iPhone SE (3rd generation) }
** BUILD FAILED **
The following build commands failed:
	ComputeTargetDependencyGraph
(1 failure)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:46C95008-E0C7-49E6-A4C1-8EFF7538A1C1, OS:17.5, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:46C95008-E0C7-49E6-A4C1-8EFF7538A1C1, OS:17.5, name:iPhone SE (3rd generation) }
Testing failed:
	Target 'TestingMacros' must be enabled before it can be used.
	Target 'TestingMacros' must be enabled before it can be used.
	Testing cancelled because the build failed.
** TEST FAILED **
The following build commands failed:
	ComputeTargetDependencyGraph
(1 failure)
[17:47:40]: Exit status: 65
[17:47:41]: test failed!!

FYI:

I think #935 is a similar phenomenon, so I hope it will be fixed as soon as possible.

@fumiyasac
Copy link
Author

Resolve:

We were able to resolve the issue using the methods shown below.

  1. Make "Update Default Setting" workflow and write default settings.
  2. Sort "Update Default Setting" workflow after "Git Clone Repository".
# Script content
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES

Reference(Japanese):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant