Skip to content

Commit

Permalink
Fix duplicate names in entitlements
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-cain13 committed Nov 27, 2019
1 parent bcd5057 commit c2edc63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/RswiftCore/Generators/PropertyListGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,20 @@ struct PropertyListGenerator: ExternalOnlyStructGenerator {

let qualifiedName = prefix + name

let groupedContents = contents.grouped(bySwiftIdentifier: { $0.key })
groupedContents.printWarningsForDuplicatesAndEmpties(source: name.description, result: name.description)
let uniqueContents = Dictionary(uniqueKeysWithValues: groupedContents.uniques)

return Struct(
availables: [],
comments: ["This `\(qualifiedName)` struct is generated, and contains static references to \(contents.count) properties."],
accessModifier: externalAccessLevel,
type: Type(module: .host, name: name),
implements: [],
typealiasses: [],
properties: propertiesFromInfoPlist(contents: contents, path: [], at: externalAccessLevel),
properties: propertiesFromInfoPlist(contents: uniqueContents, path: [], at: externalAccessLevel),
functions: [],
structs: structsFromInfoPlist(contents: contents, path: [], at: externalAccessLevel),
structs: structsFromInfoPlist(contents: uniqueContents, path: [], at: externalAccessLevel),
classes: [],
os: []
)
Expand Down

0 comments on commit c2edc63

Please sign in to comment.