Skip to content

Commit 07c38c3

Browse files
committed
deprecate validation that a resource localization exists when english is the default langauge
motivatoin: the warning is redundant changes: * remove the validation when english is the default langauge * adjst test * refactor TargetSourcesBuilderTests so we can test for no diagnostics rdar://86297221
1 parent 25dd417 commit 07c38c3

File tree

2 files changed

+154
-120
lines changed

2 files changed

+154
-120
lines changed

Sources/PackageLoading/TargetSourcesBuilder.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ public struct TargetSourcesBuilder {
330330
return
331331
}
332332

333+
// rdar://86297221
334+
// There is no need to validate for english, because the string key is already in english
335+
if self.defaultLocalization == "en" {
336+
return
337+
}
338+
333339
let localizedResources = resources.lazy.filter({ $0.localization != nil && $0.localization != "Base" })
334340
let resourcesByBasename = Dictionary(grouping: localizedResources, by: { $0.path.basename })
335341
for (basename, resources) in resourcesByBasename {

0 commit comments

Comments
 (0)