@@ -75,7 +75,7 @@ let package = Package(
75
75
enabledTraits : [ // Other traits that are enabled when this trait is being enabled
76
76
" Foo" ,
77
77
]
78
- )
78
+ ),
79
79
.trait (
80
80
name : " FooBar" ,
81
81
enabledTraits : [
@@ -92,7 +92,7 @@ let package = Package(
92
92
When depending on a package the ` default ` trait is enabled. However, the enabled
93
93
traits can be customized by passing a set of enabled traits when declaring the
94
94
dependency. When specifying the enabled traits of the dependencies the
95
- ` .default ` trait can be passed which will enable the default trait. The below
95
+ ` .defaults ` trait can be passed which will enable the default trait. The below
96
96
example enables the default trait and the additional ` SomeTrait ` of the package.
97
97
98
98
``` swift
@@ -101,7 +101,7 @@ dependencies: [
101
101
url : " https://github.com/Org/SomePackage.git" ,
102
102
from : " 1.0.0" ,
103
103
traits : [
104
- .default ,
104
+ .defaults ,
105
105
" SomeTrait"
106
106
]
107
107
),
@@ -130,7 +130,7 @@ dependencies: [
130
130
url : " https://github.com/Org/SomePackage.git" ,
131
131
from : " 1.0.0" ,
132
132
traits :[
133
- .trait (" SomeOtherTrait" , condition : .when (traits : [" Foo" ])),
133
+ .trait (name : " SomeOtherTrait" , condition : .when (traits : [" Foo" ])),
134
134
]
135
135
),
136
136
]
@@ -386,7 +386,7 @@ extension Package.Dependency {
386
386
traits : Set <Package.Dependency.Trait>
387
387
) -> Package.Dependency
388
388
389
- // MARK: Registry
389
+ // MARK: Registry
390
390
391
391
public static func package (
392
392
id : String ,
@@ -579,7 +579,7 @@ API is only available if a certain trait is set.
579
579
580
580
> Cargo currently [ treats this
581
581
similar] ( https://users.rust-lang.org/t/is-disabling-features-of-a-dependency-considered-a-breaking-change/94302/2 )
582
- and doesn't consider disabling a cargo feature a breaking change.
582
+ and doesn't consider disabling a cargo feature a breaking change.
583
583
584
584
### Different default traits depending on platform
585
585
0 commit comments