Hive Hive
Sign in

Missing SPM traits in tuist generated xcodeproject from Registry Style

GitHub issue · Open

Metadata
Source
tuist/tuist #12338
Updated
Aug 14, 2026
Domains
Generated projects Registry
Details

What happened?

Missing the Swift Custom Flags in tuist generated xcodeproject with –replace-scm-with-registry on library https://github.com/pointfreeco/swift-dependencies

How do we reproduce it?

  1. Use tuist verson 4.203.1
  2. Add the dependency https://github.com/pointfreeco/swift-dependencies under Tuist/Package.swift
  3. add it as git url (remoteSourceControl) style with version 1.14.1
  4. add installOptions in Tuist.swift with input “–replace-scm-with-registry”
  5. Use Xcode26.5 or Xcode27beta
  6. For my case I have my own swift registry server provided by JFrog artifacts. I donot try tuist registry server(It should be same I think)
  7. tuist install&&tuist generate with a demo Tuist managed project
  8. check the swift-dependencies project generated by tuist
  9. Check Swift Compiler-Custom Flags of the Build Settings tab from Dependencies target
  10. The Flags Clocks CombineSchedulers etc are not ther
  11. But with git url as dependency reference, the Flags will be there with same version Xcode and tuist
  12. the Key part from library swift-dependencies Package.swift (If I remove Package.swift and rename Package@Swift-6.0.swift as Package.swift It will work also) https://github.com/pointfreeco/swift-dependencies traits: [ “Clocks”, “CombineSchedulers”, “Foundation”, “FoundationNetworking”, .default(enabledTraits: [ “Clocks”, “CombineSchedulers”, “Foundation”, “FoundationNetworking”, ]), ],

Error log

Xcode build error without enough Swift Custom Flags

macOS version

Tahoe 26.8

Tuist version

4.203.1

Xcode version

27.0 beta4

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
D
dosubot[bot] Aug 14, 2026

Hi @jinaiyuanbaojie! I’m Dosu and I’m helping the Tuist team.

This matches a bug that already has an open PR to fix it: #12248 — fix(cli): resolve SPM package traits for registry dependencies [1].

Root cause: When a package is resolved through the registry (via --replace-scm-with-registry), it gets a scoped identity like pointfreeco.swift-dependencies instead of the plain name swift-dependencies used in SCM resolution. The enabledTraits lookup in SwiftPackageManagerGraphLoader was keyed by the raw identity, so it never matched registry packages — causing SWIFT_ACTIVE_COMPILATION_CONDITIONS (which carries the trait flags like Clocks, CombineSchedulers, etc.) to be silently dropped from the generated project [1].

The fix normalizes identities to a canonical form (scope-stripped, lowercased) before correlating traits. The PR was opened on August 9 and is currently under review [1].

Workaround until the fix lands: Fall back to SCM resolution by removing --replace-scm-with-registry from your installOptions in Tuist.swift. The traits will resolve correctly via the git URL path, as you’ve already confirmed.

You could also try installing the debug-generated-project skill following the steps in this repo and using a coding agent to apply the patch from PR #12248 locally while you wait for it to be merged.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about tuist Share Dosu with your team