Skip to content

[New Output] Macro Target must be enabled before it can be used #341

@aksh1t

Description

@aksh1t

What's the uncaptured output?

For Swift package targets containing macros, if they have not been enabled, xcodebuild gives this error when computing the target dependency graph:

...
/Users/runner/Library/Developer/Xcode/DerivedData/DeveloperAutomation-ayrroxrhfzoyoxdehmcuuwlcbuqz/SourcePackages/checkouts/Swallow/Package.swift:PACKAGE-TARGET:SwallowMacros: error: Target 'SwallowMacros' must be enabled before it can be used.
...

This error is suppressed by xcbeautify so it is not obvious at all why the build failed.

Suggested Regex

"must be enabled before it can be used" seems like a stable string to match for.

Suggested Output

No response

Additional Context

To test this, perform the following steps:

  1. Create a new macOS project called Test.
  2. Add the following repository as a package dependency: Swallow.
  3. Run the following command to prevent skipping macro validation:
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool NO
  1. Run xcodebuild build -scheme Test.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions