mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
* Revert "Back out new typed HTTP protocol upgrader (#2579)" # Motivation We have reverted the typed HTTP protocol upgrader pieces since adopters were running into a compiler bug (https://github.com/apple/swift/pull/69459) that caused the compiler to emit strong references to `swift_getExtendedExistentialTypeMetadata`. The problem is that `swift_getExtendedExistentialTypeMetadata` is not available on older runtimes before constrained existentials have been introduced. This caused adopters to run into runtime crashes when loading any library compiled with this NIO code. # Modifications This PR reverts the revert and guard all new code in a compiler guard that checks that we are either on non-Darwin platforms or on a new enough Swift compiler that contains the fix. # Result We can offer the typed HTTP upgrade code to our adopters again. * Add compiler guards