I've been using Xcode 11.4 betas for Vapor4 development since Xcode 11.4-beta1 was released and I've run into an issue with SPM in the jump from beta3 (I think this was the last beta) to the GM.
From the beginning of the beta process I've been using the following Package.swift
:
// swift-tools-version:5.2
import PackageDescription
let package = Package(
name: "PSVaporV4",
platforms: [
.macOS(.v10_15)
],
dependencies: [
// 💧 A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0-beta"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.0.0-beta"),
.package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.0.0-rc"),
.package(url: "https://github.com/daSkier/ZIPFoundation.git", from: "0.9.10"),
.package(url: "https://github.com/nmdias/FeedKit.git", from: "9.0.0"),
.package(url: "https://github.com/IBM-Swift/CCurl.git", from: "1.0.0"),
.package(url: "https://github.com/skelpo/CSV.git", from: "1.0.0"),
.package(url: "https://github.com/swift-aws/aws-sdk-swift.git", from: "4.0.0")
],
targets: [
.target(name: "App", dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "FluentPostgresDriver", package: "fluent-postgres-driver"),
.product(name: "Vapor", package: "vapor"),
.product(name: "ZIPFoundation", package: "ZIPFoundation"),
.product(name: "FeedKit", package: "FeedKit"),
.product(name: "CCurl", package: "CCurl"),
.product(name: "CSV", package: "CSV"),
.product(name: "S3", package: "aws-sdk-swift")
]),
.target(name: "Run", dependencies: [
.target(name: "App")
]),
.testTarget(name: "AppTests", dependencies: [
.target(name: "App"),
.product(name: "XCTVapor", package: "vapor")
])
],
swiftLanguageVersions: [.v5]
)
In the migration to the Xcode 11.4 GM the aws-sdk-swift
dependency broke. I've since found out that this is due to the repo name being different from the package name. To fix this I've changed to the following:
.package(name: "AWSSDKSwift", url: "https://github.com/swift-aws/aws-sdk-swift.git", from: "4.0.0")
...
.product(name: "S3", package: "AWSSDKSwift")
All of that said, was this change intentional and expected to be a breaking change for users migrating from the betas to the GM? It caught me by surprise.
cc: @johannesweiss