swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.65k stars 1.31k forks source link

[Traits] Package trait description and serialization #7669

Closed FranzBusch closed 2 weeks ago

FranzBusch commented 2 weeks ago

Motivation:

This PR is the first one to land the package traits feature in SwiftPM. It focuses on the new public APIs and serialization of them.

Modifications:

This PR contains:

I gated the new APIs behind both the 999 availability and an SPI(Traits) to allow us to land this on main before the proposal is accepted.

Result:

We can now define a package with traits 🚀

FranzBusch commented 2 weeks ago

@swift-ci please test

FranzBusch commented 2 weeks ago

@swift-ci please test

FranzBusch commented 2 weeks ago

@swift-ci please test

FranzBusch commented 2 weeks ago

@swift-ci please test

FranzBusch commented 2 weeks ago

@swift-ci please test

MaxDesiatov commented 2 weeks ago

@swift-ci test windows

MaxDesiatov commented 2 weeks ago

@bnbarham do you think that @_spi is sufficient here, or do we need a separate CLI flag with experimental- prefix to enable it?

FranzBusch commented 2 weeks ago

@MaxDesiatov @bnbarham This is both gated by a new availability and SPI. So it's really hard to access.

MaxDesiatov commented 2 weeks ago

@swift-ci test

bnbarham commented 2 weeks ago

@bnbarham do you think that @_spi is sufficient here, or do we need a separate CLI flag with experimental- prefix to enable it?

LGTM after the ExperimentalTraits SPI change 👍

FranzBusch commented 2 weeks ago

@swift-ci please test

FranzBusch commented 2 weeks ago

@MaxDesiatov Fixed up your comments. Thanks for catching the bad merge w.r.t. moduleAlias stuff

MaxDesiatov commented 2 weeks ago

@swift-ci test windows