Skip to content

Widen swift-crypto version range #8680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

@@ -1065,7 +1065,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
// dependency version changes here with those projects.
.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants