Skip to content

Commit

Permalink
Merge pull request #4 from sergeykhliustin/develop
Browse files Browse the repository at this point in the history
Hotfix for flaky generated nodes
  • Loading branch information
sergeykhliustin authored Sep 22, 2022
2 parents f2047f4 + ee222a0 commit 8eb4c09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Sources/PodToBUILD/BuildFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public struct PodBuildFile: StarlarkConvertible {
.compactMap({ $0 as? BazelTarget })
.map({ $0.loadNode })
.filter({ !$0.isEmpty })
)
.map({ StarlarkNode.starlark($0) })
)
.sorted(by: <)
.map({ StarlarkNode.starlark($0) })
)
}

Expand Down Expand Up @@ -89,6 +90,7 @@ public struct PodBuildFile: StarlarkConvertible {

let extraDeps: [BazelTarget] = makeResourceBundles(spec: podSpec, subspecs: subspecs, options: buildOptions)
let frameworks = AppleFrameworkImport.vendoredFrameworks(withPodspec: podSpec, subspecs: subspecs, options: buildOptions)
.sorted(by: { $0.name < $1.name })
let conditionalDeps = frameworks.reduce([String: [Arch]]()) { partialResult, target in
guard let target = target as? AppleFrameworkImport else { return partialResult }
var result = partialResult
Expand Down
2 changes: 1 addition & 1 deletion Sources/PodToBUILD/Targets/AppleFramework.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ struct AppleFramework: BazelTarget {
result[conditon] = arr
})
return result
}
}.mapValues({ $0.sorted(by: <) })

let deps: StarlarkNode
if conditionalDepsMap.isEmpty {
Expand Down

0 comments on commit 8eb4c09

Please sign in to comment.