Skip to content
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

feat: Make models Sendable #1771

Merged
merged 12 commits into from
Sep 24, 2024
Merged

feat: Make models Sendable #1771

merged 12 commits into from
Sep 24, 2024

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Sep 21, 2024

Issue #

#1768

Description of changes

smithy-lang/smithy-swift#829 makes generated models Sendable.

This PR fixes some affected codegen tests and a couple of Swift 6 compile warnings.

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jbelkins jbelkins changed the title Empty commit feat: Make models Sendable Sep 22, 2024
@jbelkins jbelkins marked this pull request as ready for review September 23, 2024 14:31
@@ -15,22 +15,21 @@ class S3ExpiresTest {
val context = setupTests("s3-expires.smithy", "com.amazonaws.s3#S3", "S3")
val contents = TestUtils.getFileContents(context.manifest, "Sources/Example/models/FooOutput.swift")
contents.shouldSyntacticSanityCheck()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests fixed below, which were affected by the changes made in smithy-swift.

// Use of fully-qualified type names in this extension suppresses the Swift 6
// "retroactive conformance" warning in a manner compatible with Swift 5.
// See: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0364-retroactive-conformance-warning.md#source-compatibility
extension SmithyWaitersAPI.WaiterConfiguration.Acceptor.Match: Swift.Equatable where Input: Swift.Equatable, Output: Swift.Equatable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using fully-qualified names in an extension declaration suppresses "retroactive conformance" warnings while still being compatible with Swift 5.x (using @retroactive in Swift 5 results in a compile error.)

@jbelkins jbelkins merged commit f20ede5 into main Sep 24, 2024
29 checks passed
@jbelkins jbelkins deleted the jbe/sendable_document_and_streams branch September 24, 2024 20:47
jbelkins added a commit that referenced this pull request Oct 28, 2024
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