I got a little excited about package trait support in Xcode 26.4. So I did some experimenting and ... I think it's great!

https://www.massicotte.org/blog/package-traits-in-xcode/

Package Traits in Xcode

At long last, package traits are now supported in Xcode and I think it's a big deal.

massicotte.org
@mattiem in your first example, how is the FancyStructures trait enabled? I get the conditional dependency but not immediately clear what controls the condition
@ScottBerrevoets it is under the control of the package consumer. In Xcode, there's a UI to enable/disable traits for packages that support them. You can also do so programmatically via a Package.swift file if you aren't using Xcode.
@mattiem ah excellent. Thanks for the write up!
@ScottBerrevoets thanks for the feedback! I should clarify this, you aren’t the first to ask.