Skip to content

Commit a783f11

Browse files
authored
Don't trap on empty resource lists (#3284)
Throwing an error on aesthetic issues like this makes it difficult to conditionally generate these arguments. (This is a followup to #2880.)
1 parent 1334e97 commit a783f11

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Sources/PackageLoading/PackageDescription4Loader.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,6 @@ enum ManifestJSONParser {
174174

175175
private static func parseResources(_ json: JSON) throws -> [TargetDescription.Resource] {
176176
guard let resourcesJSON = try? json.getArray("resources") else { return [] }
177-
if resourcesJSON.isEmpty {
178-
throw ManifestParseError.runtimeManifestErrors(["resources cannot be an empty array; provide at least one value or remove it"])
179-
}
180-
181177
return try resourcesJSON.map { json in
182178
let rawRule = try json.get(String.self, forKey: "rule")
183179
let rule = TargetDescription.Resource.Rule(rawValue: rawRule)!

0 commit comments

Comments
 (0)