From bf1c27928c3f7f93fcdca570d7514727fa23e14e Mon Sep 17 00:00:00 2001 From: Joannis Orlandos Date: Mon, 26 Sep 2022 16:57:40 +0200 Subject: [PATCH] Add Swift Algorithms as an explicit dependency (#217) Explicitly depend on Swift-algorithms, rather indirectly through Vapor Some users were running into issues compiling leaf against an older version of Vapor (pre 4.61.0) --- Package.swift | 4 ++++ Sources/Leaf/LeafEncoder.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/Package.swift b/Package.swift index f5ad47c..81a5187 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,11 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/vapor/leaf-kit.git", from: "1.3.1"), + .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"), + + // Swift collection algorithms + .package(url: "https://github.com/apple/swift-algorithms.git", from: "1.0.0"), ], targets: [ .target(name: "Leaf", dependencies: [ diff --git a/Sources/Leaf/LeafEncoder.swift b/Sources/Leaf/LeafEncoder.swift index 9e95e0e..2584769 100644 --- a/Sources/Leaf/LeafEncoder.swift +++ b/Sources/Leaf/LeafEncoder.swift @@ -1,4 +1,5 @@ import LeafKit +import Algorithms internal struct LeafEncoder { /// Use `Codable` to convert an (almost) arbitrary encodable type to a dictionary of key/``LeafData`` pairs