Kitura/Kitura-OpenAPI

Update to Kitura 2.6

Closed this issue · 8 comments

swift package update hung when using with Kitura 2.6.

I forked and tried to bump Package.swift to
.package(url: "https://github.com/IBM-Swift/Kitura.git", from: "2.6.0")

swift package update then seemed to go fine.

My Package.swift contains
.package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.6.0")),

What is the process to get this Kitura 2.6?

Can you paste your full Package.swift? Thanks!

let package = Package(
    name: "SwiftServer",
    dependencies: [
        .package(url: "https://github.com/IBM-Swift/Kitura.git",
                 .upToNextMinor(from: "2.6.0")),
        .package(url: "https://github.com/IBM-Swift/HeliumLogger.git",
                 .upToNextMinor(from: "1.8.0")),
        .package(url: "https://github.com/IBM-Swift/CloudEnvironment.git",
                 .upToNextMinor(from: "9.0.0")),
        .package(url: "https://github.com/RuntimeTools/SwiftMetrics.git",
                 .upToNextMinor(from: "2.5.0")),
        .package(url: "https://github.com/IBM-Swift/Health.git",
                 .upToNextMinor(from: "1.0.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-Kuery-ORM.git",
                 .upToNextMinor(from: "0.4.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-Kuery-PostgreSQL.git",
                 .upToNextMinor(from: "2.1.0")),
        .package(url: "https://github.com/NocturnalSolutions/Kitura-CredentialsLocal.git",
                 .upToNextMinor(from: "2.0.0")),
        .package(url: "https://github.com/IBM-Swift/Configuration.git",
                 .upToNextMinor(from: "3.0.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-JWT.git",
                 .upToNextMinor(from: "3.0.0")),
        .package(url: "https://github.com/ibm-cloud-security/Swift-JWK-to-PEM.git",
                 .upToNextMinor(from: "0.4.0")),
    ],
    targets: [
        .target(name: "SwiftServer", dependencies:
            [
                .target(name: "Application"),
                "Kitura",
                "HeliumLogger"
            ]
        ),
        .target(name: "Application", dependencies:
            [
                "Kitura",
                "CloudEnvironment",
                "SwiftMetrics",
                "Health",
                "SwiftKueryORM",
                "SwiftKueryPostgreSQL",
                "CredentialsLocal",
                "Configuration",
                "SwiftJWT",
                "SwiftJWKtoPEM"
            ]
        ),
        .testTarget(name: "ApplicationTests", dependencies:
            [
                .target(name: "Application"),
                "Kitura",
                "HeliumLogger"
            ]
        )
    ]
)

Thanks. Is there a reason you are using upToNextMinor for everything?

Also, your Package.swift doesn't include Kitura-OpenAPI. Can you paste the version that shows the hang? Thanks.

I do upToNextMinor cause it felt like I needed to know when I was going to next minor. IDK... What you thinking?

Oh, sorry, was on a different branch. All I did was append
.package(url: "https://github.com/IBM-Swift/Kitura-OpenAPI.git", .upToNextMinor(from: "1.1.2"))
and add "KituraOpenAPI" in the target dependencies...

I don't know what happened here. Yesterday it would hang every time at

Updating https://github.com/IBM-Swift/CommonCrypto.git

Maybe something had a new release. It is not hanging at this moment in time.

let package = Package(
    name: "SwiftServer",
    dependencies: [
        .package(url: "https://github.com/IBM-Swift/Kitura.git",
                 .upToNextMinor(from: "2.6.0")),
        .package(url: "https://github.com/IBM-Swift/HeliumLogger.git",
                 .upToNextMinor(from: "1.8.0")),
        .package(url: "https://github.com/IBM-Swift/CloudEnvironment.git",
                 .upToNextMinor(from: "9.0.0")),
        .package(url: "https://github.com/RuntimeTools/SwiftMetrics.git",
                 .upToNextMinor(from: "2.5.0")),
        .package(url: "https://github.com/IBM-Swift/Health.git",
                 .upToNextMinor(from: "1.0.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-Kuery-ORM.git",
                 .upToNextMinor(from: "0.4.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-Kuery-PostgreSQL.git",
                 .upToNextMinor(from: "2.1.0")),
        .package(url: "https://github.com/NocturnalSolutions/Kitura-CredentialsLocal.git",
                 .upToNextMinor(from: "2.0.0")),
        .package(url: "https://github.com/IBM-Swift/Configuration.git",
                 .upToNextMinor(from: "3.0.0")),
        .package(url: "https://github.com/IBM-Swift/Swift-JWT.git",
                 .upToNextMinor(from: "3.0.0")),
        .package(url: "https://github.com/ibm-cloud-security/Swift-JWK-to-PEM.git",
                 .upToNextMinor(from: "0.4.0")),
    	.package(url: "https://github.com/IBM-Swift/Kitura-OpenAPI.git",
                 .upToNextMinor(from: "1.1.2"))
    ],
    targets: [
        .target(name: "SwiftServer", dependencies:
            [
                .target(name: "Application"),
                "Kitura",
                "HeliumLogger"
            ]
        ),
        .target(name: "Application", dependencies:
            [
                "Kitura",
                "CloudEnvironment",
                "SwiftMetrics",
                "Health",
                "SwiftKueryORM",
                "SwiftKueryPostgreSQL",
                "CredentialsLocal",
                "Configuration",
                "SwiftJWT",
                "SwiftJWKtoPEM",
                "KituraOpenAPI"
            ]
        ),
        .testTarget(name: "ApplicationTests", dependencies:
            [
                .target(name: "Application"),
                "Kitura",
                "HeliumLogger"
            ]
        )
    ]
)

Now it doesn't try to get https://github.com/IBM-Swift/CommonCrypto.git

I do upToNextMinor cause it felt like I needed to know when I was going to next minor. IDK... What you thinking?

You should be fine with just from: as new minor versions should not include breaking changes, according to SemVer.

Glad it's working for you now. I suspect there might have been something in your Package.resolved which was tying to a previous version. In future try deleting Package.resolved and .build/.