Skip to content

Make PackageCollectionModel.V1.Collection and PackageCollectionModel.V1.SignedCollection Sendable #8633

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

Closed

Conversation

finestructure
Copy link
Contributor

Motivation:

We are using SwiftPM as a dependency to vend signed package collections on the Swift Package Index website.

(There are some more details around why we do this and don't think we have an alternative laid out in this issue.)

After updating to Swift 6, we've had to introduce a @retroactive @unchecked Sendable on SignedCollection in order to conform it to Vapor.Content and send it in web responses.

Modifications:

This change marks the related types as Sendable.

Result:

With this change, we can drop the retroactive unchecked conformance. We've tested this with our project on a fork here:

https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/actions/runs/14808870777

NB: I'm pretty sure release/6.1 is not the proper target to land these changes (if they are acceptable) but it was the easiest place for us to test them and keep the change set minimal.

@MaxDesiatov
Copy link
Contributor

MaxDesiatov commented May 8, 2025

NB: I'm pretty sure release/6.1 is not the proper target to land these changes (if they are acceptable) but it was the easiest place for us to test them and keep the change set minimal.

The process in general is to submit changes on main first. After ensuring those work on main well, they can be cherry-picked to release branches, if those are accepting changes in the first place (for 6.1 it's highly unlikely at this point). Cherry-picks for release branches also require a specific template that provides risk evaluation for nominating the change: https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md

@finestructure
Copy link
Contributor Author

Thanks for taking a look, Max!

Since I can't change the source branch in this PR here, I've cherry-picked the change to a new one against main that I've opened here: #8635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants