Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions proposals/0450-swiftpm-package-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let package = Package(
enabledTraits: [ // Other traits that are enabled when this trait is being enabled
"Foo",
]
)
),
.trait(
name: "FooBar",
enabledTraits: [
Expand All @@ -92,7 +92,7 @@ let package = Package(
When depending on a package the `default` trait is enabled. However, the enabled
traits can be customized by passing a set of enabled traits when declaring the
dependency. When specifying the enabled traits of the dependencies the
`.default` trait can be passed which will enable the default trait. The below
`.defaults` trait can be passed which will enable the default trait. The below
example enables the default trait and the additional `SomeTrait` of the package.

```swift
Expand All @@ -101,7 +101,7 @@ dependencies: [
url: "https://github.com/Org/SomePackage.git",
from: "1.0.0",
traits: [
.default,
.defaults,
"SomeTrait"
]
),
Expand Down Expand Up @@ -130,7 +130,7 @@ dependencies: [
url: "https://github.com/Org/SomePackage.git",
from: "1.0.0",
traits:[
.trait("SomeOtherTrait", condition: .when(traits: ["Foo"])),
.trait(name: "SomeOtherTrait", condition: .when(traits: ["Foo"])),
]
),
]
Expand Down