Skip to content

Commit 030b9aa

Browse files
authored
Workaround compiler crashes seen by some toolchains (#110)
Motivation: The toolchains installed via swiftly seem to trip over some compilation issues related to lifetimes in release builds. This has been reported upstream but for now we should workaround this to unblock users installing toolchains with Swiftly. Modifications: - Remove the `~Copyable`s from the `WrappedChannel` state machine Result: - Compiles in release mode with Swiftly installed toolchains
1 parent 7733a8e commit 030b9aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/GRPCNIOTransportCore/Client/WrappedChannel/WrappedChannel+State.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ internal import NIOHTTP2
1919

2020
@available(gRPCSwiftNIOTransport 1.2, *)
2121
extension HTTP2ClientTransport.WrappedChannel {
22-
enum State: ~Copyable {
22+
enum State {
2323
case idle(Idle)
2424
case configuring(Configuring)
2525
case configured(Configured)
2626
case ready(Ready)
2727
case shuttingDown
2828
case shutDown
2929

30-
struct Idle: ~Copyable {
30+
struct Idle {
3131
var queue: RequestQueue<NIOHTTP2Handler.AsyncStreamMultiplexer<Void>>
3232

3333
init() {
3434
self.queue = RequestQueue()
3535
}
3636
}
3737

38-
struct Configuring: ~Copyable {
38+
struct Configuring {
3939
var queue: RequestQueue<NIOHTTP2Handler.AsyncStreamMultiplexer<Void>>
4040

4141
init(from state: consuming Idle) {
4242
self.queue = state.queue
4343
}
4444
}
4545

46-
struct Configured: ~Copyable {
46+
struct Configured {
4747
var queue: RequestQueue<NIOHTTP2Handler.AsyncStreamMultiplexer<Void>>
4848
var multiplexer: NIOHTTP2Handler.AsyncStreamMultiplexer<Void>
4949

@@ -56,7 +56,7 @@ extension HTTP2ClientTransport.WrappedChannel {
5656
}
5757
}
5858

59-
struct Ready: ~Copyable {
59+
struct Ready {
6060
var multiplexer: NIOHTTP2Handler.AsyncStreamMultiplexer<Void>
6161

6262
init(from state: consuming Configured) {

0 commit comments

Comments
 (0)