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] Replace `isDefault` with `default` trait #7703

Closed FranzBusch closed 5 days ago

FranzBusch commented 1 week ago

Motivation

The current spelling uses isDefault per trait to declare the default traits. This makes it hard to see which traits are actually the default traits.

Modification

Instead of using an explicit isDefault per trait this PR now uses a .defaults(enabledTraits:) overload which just uses the "default" trait under the hood. This simplifies the logic tremendously to handle default traits.

Result

Nicer spelling for default traits and easier implementation.

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 6 days ago

@swift-ci please test

FranzBusch commented 5 days ago

@swift-ci please test

FranzBusch commented 5 days ago

@swift-ci please test

FranzBusch commented 5 days ago

@swift-ci test windows

FranzBusch commented 5 days ago

@swift-ci test windows