Skip to content

Conversation

@djmango
Copy link

@djmango djmango commented Mar 19, 2025

This is required to use NIOHTTPClient in Swift 6 w/ Connect for gRPC.

For example

        let protocolClient = ProtocolClient(
            httpClient: NIOHTTPClient(host: host, port: port),
            config: ProtocolClientConfig(
                host: host,
                networkProtocol: .grpc,
                codec: ProtoCodec()
            )
        )

Co-Authored-By: Grok noreply@grok.com

…oncurrency patterns

🤖 Generated with Grok CLI
Co-Authored-By: Grok <noreply@grok.com>
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Unfortuantely this type isn't actually Sendable. I'm currently working on a patch to make this package compile cleanly with strict concurrency enabled which will include appropriately annotating all public types so you're probably better off waiting for that to land instead.

@djmango
Copy link
Author

djmango commented Mar 24, 2025

Thanks for the PR! Unfortuantely this type isn't actually Sendable. I'm currently working on a patch to make this package compile cleanly with strict concurrency enabled which will include appropriately annotating all public types so you're probably better off waiting for that to land instead.

That's great, will subscribe, looking forward to that patch!

@djmango djmango closed this Mar 24, 2025
@ripplexyz
Copy link

@djmango / @glbrntt is this fixed? Is there any workaround since I am facing above error while using Connect package.

Error Message:
Type 'HTTP2StreamMultiplexer' does not conform to the 'Sendable' protocol

@glbrntt
Copy link
Contributor

glbrntt commented Apr 7, 2025

It hasn't been released yet. We'll try to get a release out soon.


This error will remain though, the HTTP2StreamMultiplexer isn't Sendable.

Type 'HTTP2StreamMultiplexer' does not conform to the 'Sendable' protocol

This is the relevant change #506 -- once released you'll need to use the SendableView on the multiplexer.

@djmango
Copy link
Author

djmango commented Apr 9, 2025

@djmango / @glbrntt is this fixed? Is there any workaround since I am facing above error while using Connect package.

Error Message: Type 'HTTP2StreamMultiplexer' does not conform to the 'Sendable' protocol

I've been using it in Swift 6 by just forcing it Sendable. Technically not, but so far hasn't caused any problems. Here are the a relevant forks https://github.com/djmango/swift-nio-http2 https://github.com/djmango/connect-swift

@Lukasa
Copy link
Contributor

Lukasa commented Apr 9, 2025

What are you trying to actually do with the multiplexer that triggers the error?

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.

4 participants