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] Integrate traits into module loading #7689

Closed FranzBusch closed 1 week ago

FranzBusch commented 1 week ago

Motivation

In my previous PR I landed the APIs for package traits. We now have to take this information into consideration when evaluating the module graph.

Modification

This PR implements the various trait features in the module graph loading stage. Including resolving optional dependencies, enabled traits of dependencies, build settings based on traits and passing defines for traits.

This PR also contains an exhaustive test fixtures which we can use to check if all trait functionality is working as expected.

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci test windows

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci test windows

MaxDesiatov commented 1 week ago

@swift-ci test windows

FranzBusch commented 1 week ago

@swift-ci please test

FranzBusch commented 1 week ago

@swift-ci test windows

MaxDesiatov commented 1 week ago

@swift-ci test windows