Hive Hive
Sign in

fix(cli): Fix Swift-only package framework modulemaps

GitHub issue · Closed

Metadata
Source
tuist/tuist #10971
Updated
Jun 24, 2026
Domains
Cache Generated projects
Details

Addresses https://github.com/tuist/tuist/issues/10967

This fixes the modulemap failure hit by tuist cache for pure-Swift SwiftPM products promoted to frameworks.

The root cause was that Swift-only package framework targets had no Tuist-provided modulemap, so Xcode synthesized one that referenced <Module>-Swift.h. Under Xcode 26 explicit module scanning, that synthesized modulemap could be scanned before Swift emitted the compatibility header.

This change:

  • Generates a minimal modulemap for Swift-only SwiftPM framework products and disables Xcode’s synthesized modulemap for those targets.
  • Avoids adding header search paths for Swift-only modulemaps.
  • Leaves simulator architecture settings unchanged. Architecture filtering is intentionally not propagated through the generated project or cache consumption path because that can make supported architectures inconsistent across the graph.

How to test locally

  • git diff --check
  • TUIST_EE=1 xcodebuild test -workspace Tuist.xcworkspace -scheme TuistUnitTests -only-testing TuistLoaderTests/SwiftPackageManagerModuleMapGeneratorTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
  • TUIST_EE=1 xcodebuild test -workspace Tuist.xcworkspace -scheme TuistUnitTests -only-testing TuistLoaderTests/PackageInfoMapperTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
Comments