Skip to content

Conversation

@finestructure
Copy link
Contributor

.upToNextMinor(from: "3.0.0") on swift-crypto prevents updating of dependent packages that need swift-crypto >= 3.1.0.

Motivation:

We need to depend on SwiftPM (for reasons laid out here) and the narrow version range on swift-crypto (which is at version 3.12.3) prevents us from updating to a newer version of PostgresNIO, which requires swift-crypto >= 3.9.0.

error: Dependencies could not be resolved because root depends on 'swift-crypto' 3.9.0..<4.0.0 and 'swift-package-manager' depends on 'swift-crypto' 3.0.0..<3.1.0. 

Modifications:

This opens the range to 3.0.0 ..< 3.13.0, although perhaps simply upToNextMajor would also be acceptable? It would certainly prevent future instances of this happening.

Result:

Dependents are able to update to the latest swift-crypto.

.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.4.0")),
.package(url: "https://github.com/swiftlang/swift-driver.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "3.0.0")),
.package(url: "https://github.com/apple/swift-crypto.git", "3.0.0" ..< "3.13.0"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d go so far that this should be a from statement

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, IIRC this would exclude 3.13.1 for example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I want to make the change as close to the original while also opening up to include the latest current release. As I said in the description, would upToNextMajor (of from:) be best here? I assumed there was a reason it's not that already 🤔

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov MaxDesiatov added the dependencies Changes to dependencies and relevant checks label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Changes to dependencies and relevant checks

3 participants