Skip to content

Commit

Permalink
[PackageDescription] Add proper resources parameter in PackageDescrip…
Browse files Browse the repository at this point in the history
…tion

The proposal was accepted so we can remove the underscore now.

<rdar://problem/56589483>
  • Loading branch information
aciidgh committed Jan 15, 2020
1 parent 4030940 commit d539e58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Fixtures/Resources/Simple/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ let package = Package(
targets: [
.target(
name: "SwiftyResource",
__resources: [
resources: [
.copy("foo.txt"),
]
),

.target(
name: "SeaResource",
__resources: [
resources: [
.copy("foo.txt"),
]
),
Expand Down
5 changes: 2 additions & 3 deletions Sources/PackageDescription/Target.swift
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ public final class Target {
path: String? = nil,
exclude: [String] = [],
sources: [String]? = nil,
// FIXME: Underscored until the evolution process is finished.
__resources: [Resource]? = nil,
resources: [Resource]? = nil,
publicHeadersPath: String? = nil,
cSettings: [CSetting]? = nil,
cxxSettings: [CXXSetting]? = nil,
Expand All @@ -364,7 +363,7 @@ public final class Target {
path: path,
exclude: exclude,
sources: sources,
resources: __resources,
resources: resources,
publicHeadersPath: publicHeadersPath,
type: .regular,
cSettings: cSettings,
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageLoadingTests/PD5LoadingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class PackageDescription5LoadingTests: PackageDescriptionLoadingTests {
targets: [
.target(
name: "Foo",
__resources: [
resources: [
.copy("foo.txt"),
.process("bar.txt"),
]
Expand Down

0 comments on commit d539e58

Please sign in to comment.