diff --git a/Sources/ScipioKit/DescriptionPackage.swift b/Sources/ScipioKit/DescriptionPackage.swift index 8b4a3281..03af1903 100644 --- a/Sources/ScipioKit/DescriptionPackage.swift +++ b/Sources/ScipioKit/DescriptionPackage.swift @@ -149,7 +149,7 @@ struct DescriptionPackage { } extension DescriptionPackage { - func resolveBuildProducts() throws -> [BuildProduct] { + func resolveBuildProducts() throws -> OrderedSet { let resolver = BuildProductsResolver(descriptionPackage: self) return try resolver.resolveBuildProducts() } @@ -186,7 +186,6 @@ struct BuildProduct: Hashable, Sendable { } } - private final class BuildProductsResolver { private var buildProductsCache: [BuildProduct: Set] = [:] let descriptionPackage: DescriptionPackage @@ -195,7 +194,7 @@ private final class BuildProductsResolver { self.descriptionPackage = descriptionPackage } - func resolveBuildProducts() throws -> [BuildProduct] { + func resolveBuildProducts() throws -> OrderedSet { let targetsToBuild = try targetsToBuild() var products = try targetsToBuild.flatMap(resolveBuildProduct(from:)) @@ -232,7 +231,7 @@ private final class BuildProductsResolver { } } - return products.reversed() + return OrderedSet(products.reversed()) } private func targetsToBuild() throws -> [ScipioResolvedModule] {