SPM Issues Migrating from Xcode 11.4-beta3 to Xcode 11.4 GM

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: [
        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

1 Like

This is a consequence of the SE-0226 proposal that was finally implemented in 5.2. If I'm not mistaken, it was available since the first betas, but it only kicks in once you upgrade to swift-tools-version:5.2. Perhaps you made that change between some betas?

I'm pretty sure I had migrated to the swift-tools-version:5.2 with the start of the betas because I was having other issues and had migrated my whole Package.swift to v5.2, but it is conceivably possible.

CC @Aciid/@NeoNacho

@hartbit For the record, I tried building my updated package.swift with the 11.4-beta3 command line tools (11N132i) and that caused SPM/the compiler to throw errors.